
function confirmLink(theLink,confirmMsg)
{    
    var is_confirmed = confirm(confirmMsg); 
    return is_confirmed;
} 


function emptyFormElements(theForm, theFieldName)
{
    var isEmpty  = 1;
    var theField = theForm.elements[theFieldName];
    // Whether the replace function (js1.2) is supported or not
    var is_replygExp = (typeof(theField.value.replace) != 'undefined');

    if (!is_replygExp) {
        isEmpty      = (theField.value == '') ? 1 : 0;
    } else {
        var space_re = new RegExp('\\s+');
        isEmpty      = (theField.value.replace(space_re, '') == '') ? 1 : 0;
    }
    if (isEmpty) {
        theForm.re_set();
        theField.select();
        alert(errorMsg0);
        theField.focus();
        return false;
    }

    return true;
} 


function openwin(wname)
{
	window.open('', wname ,"width=350,height=400,top=0,left=0,location=no,menubar=no,scrollbars=yes,resizable=yes,status=no,toolbar=no")
}


function chgCol(site_id)
{
	document.write.img.url.value='inc/inc_get_col.php?'+'site_id='+site_id;
}


function aClass(Pid, Cname) {

	if (aClass.arguments.length < 2)

		alert("传入的参数错误！")

	else {

		this.Data  = Pid;

		this.Text  = Cname;

	}

}

function chgbox(aSrc, aDes, aClass, aRemain){

	if (chgbox.arguments.length < 3)

		alert("传入的参数错误！")

	else if (aSrc.type != "select-one")

		alert("传入的参数错误！")

	else if (aClass == null)

		alert("aClass未定义错误！")

	else {

		if (aRemain==null)

			aRemain = 1;

		chgItem(aSrc.options[aSrc.selectedIndex].value, aDes, aClass, aRemain);

	}

}

function chgItem(aValue, aDes, aClass, aRemain){

	if (chgItem.arguments.length<3)

		alert("参数传入错误！")

	else if (aClass==null)

		alert("错误！aClass没有定义！")

	else{

		if (aRemain==null)

			aRemain = 1;

		deleteAllItem(aDes, aRemain);
		
		var j=0;

		for (var i=0; i<aClass.length; i++)

			if (aClass[i].Data==aValue)
			{			    
				if (aClass[i].Data!="")
				{	 
				  j++;			  
				  addItem(aDes, aClass[i].Text, j);
				 
				}
			}
	}

}

function deleteAllItem(aList, aRemain) {

	if(aList==null) return;

	for (var i=aList.options.length; i > aRemain-1; i--)

		aList.options[i] = null;

}    


function addItem(aList, aText, aValue) {

	var aOption = new Option(aText, aValue);

	eval("aList.options[aList.options.length]=aOption");

}

function addItem2(aList, aText, aValue) {

	var aOption = new Option(aText, aValue,0,1);

	eval("aList.options[aList.options.length]=aOption");

}

function change_area(aForm) {

	chgbox(aForm.place, aForm.city, f_Set0 , 0);

}

function getcityindex(place,cityname){

	var j=0;

	for (var i=0; i<f_Set0.length; i++){

		if (f_Set0[i].Data==place){

			j++;

			if (f_Set0[i].Text==cityname)

				return j-1;

		}

	}

	return 0;

}

function getcityname(place,city,f_Set0){
	var text=0;
	var j=0;
	for (var i=0; i<f_Set0.length; i++){

		if (f_Set0[i].Data==place){
			j++;

			if ((j-1)==city)
				return f_Set0[i].Text;
		}
	}

	return 0;

}


function checkAll(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
	   var e = form.elements[i];
	   if (e.name != 'SELECTALL')
	   e.checked = form.SELECTALL.checked;
	}
}

function submitForm(form)
{
  var rs=window.confirm("是否操作?");
  if(rs==true)form.submit();
 
}


function addInput(type)
{

  switch(type){

		case 'text' :
		var type2='<input name=type[] type=hidden value=text>';
		var attr='<input name=attribute[] size=12 type=text>';		
		var val='<input name=attr_value[] size=41 type=text  ondblClick="open_editor(this.uniqueID)">';
		var ext='<input name=attr_value2[] size=10 type=text><br>';
		break;
		
		case 'textarea' :
		var type2='<input name=type[] type=hidden value=textarea>';
		var attr='<input name=attribute[] size=12 type=text>';
		var val="<textarea name=attr_value[] ondblClick=\"open_editor(this.uniqueID)\" cols=32 rows=3></textarea>";
		var ext='<input name=attr_value2[] size=10 type=text><br>';
		break;


		case 'file' :
		var type2='<input name=type_f[] type=hidden value=file>';
		var attr='<input name=attribute_f[] size=12 type=text>';
		var val="<input name=attr_value_f[] type=hidden><img src=/templates/sys_img/icon_file.gif border=0 hspace=2><input name=\"up_file[]\" type=file><input type='hidden' name='old_up_file[]'>";
		var ext='<input name=attr_value2_f[] size=10 type=text><br>';
		break;
		

		case 'img' :
		var type2='<input name=type_f[] type=hidden value=img>';
		var attr='<input name=attribute_f[] size=12 type=text>';
		var val="<input name=attr_value_f[] type=hidden><img src=/templates/sys_img/icon_img.gif border=0 hspace=2><input name=\"up_file[]\" type=file><input type='hidden' name='old_up_file[]'>";
		var ext='<input name=attr_value2_f[] size=10 type=text><br>';		
		
		break;
  }

 		//alert(val);

		var Tab=document.all.attribute_table;
		var tr=Tab.insertRow();
		tr.align="center";
		var id=tr.rowIndex;

		var do_img="<img src=images/del.gif hspace=5 onClick=move('del','attribute') onMouseOver='javascript:this.border=1;'onMouseOut='javascript:this.border=0;'><img src=images/move_up.gif hspace=3 onClick=move('up','attribute') onMouseOver='javascript:this.border=1;'onMouseOut='javascript:this.border=0;'><img src=images/move_down.gif hspace=3  onClick=move('down','attribute') onMouseOver='javascript:this.border=1;'onMouseOut='javascript:this.border=0;'>";
		
		var td=tr.insertCell();
		td.innerHTML=do_img+type2;
		var td=tr.insertCell();
		td.innerHTML=attr;
		var td=tr.insertCell();
		td.align="left";
		td.innerHTML=val;
		var td=tr.insertCell();
		td.align="left";
		td.innerHTML=ext;
		
		}

function move(act,table){

	if(table=="attribute")var TAB= document.all.attribute_table;
	if(table=="price")var TAB= document.all.price_table;

	var obj=event.srcElement;
	
	var tag=obj.parentNode.tagName

	for(var i=0;i<10;i++){

		if(tag=="TR"){
			id=obj.rowIndex;				
			break;
			}else{
			obj=obj.parentElement;
			tag=obj.tagName
		}
	}

	var rnum=TAB.rows.length;
	var id_up=id-1;
	var id_down=id+1;

	switch (act)
	{
		
		case "del":	
		TAB.deleteRow(id);
		break;

		case "up":
		if(id==1)return;
		TAB.moveRow(id,id_up);
		break;

		case "down":
		if(id==rnum-1)return;
		TAB.moveRow(id,id_down);
		break;

	}

}



function addPrice()
{

	var is_default="<input type=radio name=df_price onClick=check_default_price()>";
	var agent_s=agent_sort_s;
	var lable="<input type=text size=8 name=lable[]><input type=hidden name=old_price_id[] value=''>";
	var price_in="<input type=text size=4 name=price_in[]>";
	var price_old="<input type=text size=4 name=price_old[]>";
	var price="<input type=text size=4 name=price[]>";
	var unit="<input type=text size=4 name=unit[]>";
	var say="<input type=text size=15 name=price_say[]>";
		
	var Tab=document.all.price_table;
	var tr=Tab.insertRow();
	var id=tr.rowIndex;

	var do_img="<img src=images/del.gif hspace=5 onClick=move('del','price')><img src=images/move_up.gif hspace=3 onClick=move('up','price')><img src=images/move_down.gif hspace=3  onClick=move('down','price')>";
	
	var td=tr.insertCell();
	td.innerHTML=do_img;

	var td=tr.insertCell();
	td.innerHTML=is_default;

	var td=tr.insertCell();
	td.innerHTML=agent_s;

	var td=tr.insertCell();
	td.innerHTML=lable;

	var td=tr.insertCell();
	td.innerHTML=price_in;

	var td=tr.insertCell();
	td.innerHTML=price_old;

	var td=tr.insertCell();
	td.innerHTML=price;

	var td=tr.insertCell();
	td.innerHTML=unit;

	var td=tr.insertCell();
	td.innerHTML=say;

}


function select_price_type(type){

	if(type=='1'){
		document.all.price_in.disabled=false;
		document.all.price_advice.disabled=false;

		document.all.price.disabled=true;
		document.all.price_base.disabled=true;
	}
	if(type=='2'){
		document.all.price.disabled=false;
		document.all.price_base.disabled=false;

		document.all.price_in.disabled=true;
		document.all.price_advice.disabled=true;
	}

}

function select_price_type_admin(type){

	if(type=='1'){
		document.all.of_price_in.disabled=false;
		document.all.of_price_advice.disabled=false;

		document.all.of_price.disabled=true;
		document.all.of_price_base.disabled=true;
	}
	if(type=='2'){
		document.all.of_price.disabled=false;
		document.all.of_price_base.disabled=false;

		document.all.of_price_in.disabled=true;
		document.all.of_price_advice.disabled=true;
	}

}


function check_default_price(){

	el=document.all.df_price;
	el2=document.all.default_price;
	
	for(var i=0;i<100;i++){

		if(el[i].checked){
			el2.value=i;
			alert(el2.value);
			break;
		}
	}
}


function set_edit_element(obj){

	document.all.edit_element.value=obj;
}


function open_editor(obj){

	set_edit_element(obj);
	window.open('editor/editor.php',null,"menubar=no,titlebar=no,toolbar=no,scrollbars=yes,resizable=yes");
}


function get_html_var(){

	var url=location.search;
	//alert(url);
	var Request = new Object();
	if(url.indexOf("?")!=-1)
	{
		var str = url.substr(1)  //去掉?号
		strs = str.split("&");
		for(var i=0;i<strs.length;i++)
		{
			Request[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
		}
	}
	//alert(Request["username"]);
	//alert(Request["t"]);
}

function show_element(obj,text){ 	
	
	if(text)obj.innerHTML=text;	
	obj.style.visibility='visible'; 
	obj.style.left=event.x+10;
	obj.style.top=event.y+10;
} 


function hidden_element(obj){ 

	//obj.innerHTML='';	
	obj.style.visibility='hidden';
}



function cost_sum(){
	
	var sum=0;
	var price=0;
	var num=0;

	price=document.all.price.value;
	num=document.all.num.value;
	sum=price*num;
	document.all.cost.value=sum;
	document.all.cost2.value=sum;

}

//获取元素的竖坐标 
function getTop(e){
	var offset=e.offsetTop;
	if(e.offsetParent!=null){ 
		offset+=getTop(e.offsetParent); //递归
		//alert(offset);
	}
	return offset;
}


function getLeft(e){

	var offset=e.offsetLeft;
	if(e.offsetParent!=null) offset+=getLeft(e.offsetParent); //递归
	return offset;

}



function show_view_area(e,e2,msg){ 

	e.innerHTML=msg;	
	e.style.position="absolute";
	
	sw=screen.availWidth;	
	sh=screen.availHeighth;
	t=getTop(e2)+20;
	l=getLeft(e2)+10;
	eh=e.style.height;
	//alert(t);

	if(t+300>sw)t2=sw-(t+300-sw); else t2=t;
	if(l+eh>sh)l2=sh-(l+eh-sh); else l2=l;

	e.style.posTop=t2;
	e.style.posLeft=l2;	
	e.style.width=350;
	e.style.background='#FFCC00';
	e.style.border='5';
	e.style.borderColor='#FFCCFF';
	e.style.visibility="visible";
} 

//获取元素的横坐标 
function hidden_view_area(e){ 

	e.innerHTML="";	
	e.style.visibility="hidden";

} 




//获取元素的横坐标 
function show_price_zone2(price_zone,thisE,msg,url){ 	

	var e=document.getElementById(price_zone);
	//alert(e.tagName);
	sw=screen.availWidth;	
	sh=screen.availHeighth;
	t=getTop(thisE)+15;
	l=getLeft(thisE)+25;
	eh=thisE.style.height;
	
	s1=document.getElementById("product_sort_id");
	s2=document.getElementById("zhong");
	s1.style.visibility="hidden";
	s2.style.visibility="hidden";

	var a=msg.split('||');
	var b="";
	var lk="";

	for(var i=0;i<a.length-1;i++){
		b=a[i].split('|');
		lk+="<div class='one_price_zone' onmouseover=\"this.style.background='red'\" onmouseout=\"this.style.background=''\"><a href="+ url + "/" + b[0] + " style='margin:5;'><span class='12white'>￥" + b[1] + "</span></a></div>";
	}
	e.innerHTML=lk;

	if(lk!=""&&a.length>1){
		e.style.position="absolute"
		e.style.top=t+'px';
		e.style.left=l+'px';
		//alert(t+ '|' +l);
		e.style.visibility="visible";
	}
	else
	{
		 hidden_price_zone(e);
	}

} 


function check_member_name(name,obj){

	
	$.ajax({
	    type: "POST",
	    url: "/php/ajax/check.php",
	    data: "check=member&name="+name,
	    beforeSend: function(){	    	
	    },
	    success: function(msg){	
	   		 alert(msg);	
	   }
	});	
}

function get_member_pass_q(name,check_number,obj){
	
	//var q=agent.call('','member_get_pass_q', '',name,chek_number);
	//obj.innerHTML=q;

	$.ajax({
	    type: "POST",
	    url: "/php/ajax/check.php",
	    data: "check=pass_q&name=" + name + "&check_number=" + check_number,
	    beforeSend: function(){	    	
	    },
	    success: function(msg){	
	   		 obj.innerHTML=msg;	
	   }
	});		
}

function get_member_pass(name,pass_a,check_number,obj){
	
	//var q=agent.call('','member_get_pass', '',name,member_pass_a,chek_number);
	//obj.innerHTML=q;

	$.ajax({
	    type: "POST",
	    url: "/php/ajax/check.php",
	    data: "check=pass&name=" + name + "&pass_a=" + pass_a + "&check_number=" + check_number,
	    beforeSend: function(){	    	
	    },
	    success: function(msg){	
	   		 obj.innerHTML=msg;	
	   }
	});		
	
}


function send_msm(){	
	agent.call('','send_msm', '');	
}


function show_this_product_pic(obj_show,obj,img){	

	var oShow=document.getElementById("product_pic_show");
	var t=getTop(oShow)+100;
	var l=getLeft(oShow)+100;

	//alert(t+"|"+l);

	var oLoading=document.getElementById("pimg_loading");	

	oLoading.style.position='absolute';
	oLoading.style.top=t+'px';
	oLoading.style.left=l+'px';
	oLoading.style.backgroundColor='#FFFFFF';	
	oLoading.style.visibility='visible';

	oShow.src=img;
	//oShow.style.visibility='hidden';

	obj.style.filter ="alpha(opacity=50)";
	obj.style.borderColor='red';
	obj.style.border='1px';

	oShow.onload=function(){
		oLoading=document.getElementById("pimg_loading");		
		oLoading.style.visibility='hidden';			
		oShow.style.visibility="visible";			
	}
}

function show_this_product_pic_print(obj_show,obj,img){	

	var oShow=document.getElementById("product_pic_show");
	var t=getTop(oShow);
	var l=getLeft(oShow);

	var oLoading=document.getElementById("pimg_loading");	

	oLoading.style.position='absolute';
	oLoading.style.top=t+'px';
	oLoading.style.left=l+'px';
	
	oLoading.style.visibility='visible';

	//alert(oShow);
	//alert( t +"|" +l);
	oShow.src=img;
	oShow.style.visibility='hidden';
	obj.style.filter ="progid:DXImageTransform.Microsoft.Alpha(opacity=30)";	

	obj.style.borderColor='red';
	obj.style.border='1px';

	oShow.onload=function(){
		oLoading=document.getElementById("pimg_loading");
		oShow.style.visibility='visible';
		oLoading.style.visibility='hidden';
	}
}

function move_pic_filter(obj){	
	
	obj.style.filter ="";

	
}


function order_query(){

	var email=document.all.email.value;
	var linkman=document.all.linkman.value;

	var q=agent.call('','query_order', '',email,linkman);
	//alert(q);
	document.all.query_result.innerHTML=q;

}


function show_zs_img(thisElm,zs_img){

	document.all.zs_show.style.position="absolute";
	document.all.zs_show.innerHTML="<img src=" + zs_img +" border=0>";
	t=getTop(thisElm)+60;
	l=getLeft(thisElm)+90;
	document.all.zs_show.style.posTop=t;
	document.all.zs_show.style.posLeft=l;

}

function hidden_zs_img(){

	document.all.zs_show.innerHTML="";

}


//------------------------验证表单 开始------------------------//



//check.js开始
//使用方法：在form提交事件里调用：return checkOwnRule(objfrm)；传入参数为当前form对象。使用该函数的前提是页面必须包含check.js

function checkOwnRule(objfrm){

	  var inputObj=objfrm.getElementsByTagName("input");
	  for (i=0;i<inputObj.length;i++){
			 if (inputObj(i).getAttribute("allownull")=="false"){ //证明该输入框不允许为空,allow为自己在文本框中定义的属性。如<input type="text" name="UserName" allownull="false" hint="用户名">表示用户名不允许为空。Hint属性最好设置，因为在alert的时候会包含该值。
					if (inputObj(i).value==""){
						   alert(inputObj(i).getAttribute("hint")+"不能为空！");
						   inputObj(i).focus();
						   return false;
					}
			 }

			 //如果某项的class为digital，表示数字项。则检测是否为数字。
			 if (inputObj(i).getAttribute("className")=="digital"){
					if (inputObj(i).value!=""&&isNaN(inputObj(i).value)){
						   alert(inputObj(i).getAttribute("hint")+"必须为数字！");
						   inputObj(i).focus();
						   return false;
					}
			 }			 

			 
			 if (inputObj(i).getAttribute("isInt")=="true"){ //证明该输入框必须输入整数
					if (inputObj(i).value.indexOf(".")>=0){
						   alert(inputObj(i).getAttribute("hint")+"必须为整数！");
						   inputObj(i).focus();
						   return false;
					}     
			 }
					
			 if (inputObj(i).getAttribute("allowzero")=="false"){ //证明该输入框不允许输入0
					if (inputObj(i).value==0){
						   alert(inputObj(i).getAttribute("hint")+"不能为0！");
						   inputObj(i).focus();
						   return false;
					}     
			 } 
			 
			 //如果isdate为true，表示该项为日期项，则必须输入日期
			 if (inputObj(i).getAttribute("isdate")=="true"){
					if (inputObj(i).value!=""&&!checkdate(inputObj(i).value)){
						   alert(inputObj(i).getAttribute("hint")+"必须为正确的日期格式！");
						   inputObj(i).focus();
						   return false;
					}
			 }
	  
	  }     
   
	  var selectObj=objfrm.getElementsByTagName("select");
	  for (i=0;i<selectObj.length;i++){
			 if (selectObj(i).getAttribute("allownull")=="false"){ //证明该选择框不允许为空
					if (selectObj(i).value==""||selectObj(i).value=="0"){
						   alert(selectObj(i).getAttribute("hint")+"不能为空！");
						   selectObj(i).focus();
						   return false;
					}
			 }
	  }


	  var textareaObj=objfrm.getElementsByTagName("textarea");

	  //alert(textareaObj);
	  for (i=0;i<textareaObj.length;i++){
			 if (textareaObj(i).getAttribute("allownull")=="false"){ //证明该选择框不允许为空
					if (textareaObj(i).value==""){
						   alert(textareaObj(i).getAttribute("hint")+"不能为空！");
						   textareaObj(i).focus();
						   return false;
					}
			 }
	  }

	  return true;

 }


//该函数为检测是否为日期的函数。
function checkdate(str){ 
       var reg = /^(\d+)-(\d{1,2})-(\d{1,2})$/; 
       var r = str.match(reg); 
       if(r==null)return false; 
       r[2]=r[2]-1; 
       var d= new Date(r[1], r[2],r[3]); 
       if(d.getFullYear()!=r[1])return false; 
       if(d.getMonth()!=r[2])return false; 
       if(d.getDate()!=r[3])return false; 
 
       return true; 
}



function checkForm(objform){
		if (checkOwnRule(objform)){
				return true;
		}else{
				return false;
		}
} 


function check_form_with_editor(objform,objcontent,objeidt){
		
		//document.all.hidden_content.value=edit_area.document.body.innerHTML;
		objcontent.value=objeidt.innerHTML;

		if (checkOwnRule(objform)){
				return true;
		}else{
				return false;
		}

		
} 



//-------------------- 验证表单结束 ----------------------------------//



//-------------------- 添加手镯内径 ----------------------------------//

function add_size_nj_to_search_form(objSelect,area,keyword){

	var sindex=objSelect.selectedIndex;
	var objArea=document.getElementById(area);
	var objKwd=document.getElementById(keyword);

	

	if(sindex=="1"||sindex=="11")
	{
		if(sindex==1) var text="&nbsp;内径"; else  var text="&nbsp;内径"; 
		objArea.innerHTML= text + "<input name='size_nj_1' size=2>-<input name='size_nj_2' size=2>mm";
		objKwd.size=3;		
	}
	else
	{
		objArea.innerHTML="";
		objKwd.size="25";
	}

} 


function show_plist(obj,sid)
{
	//$("div[id^='sid_']").removeClass("show");
	//$("div[id='sid_"+sid+"']").addClass("show");
	$("div[id^='sid_']").hide();
	$("div[id='sid_"+sid+"']").show();
	//alert(sid);
}


function dialog(url,param,H,L)
{

	if(!H)var H=200;
	if(!L)var L=300;
	var f="dialogHeight:" + H + "px; dialogLeft:" + L + "px;status:0;scroll:0; "
	var rs=window.showModalDialog(url, param, f);
	return rs;
}


//-------------------- 取得验证码 ----------------------------------//


function get_mobile_check_no(mobile,member_id){

	//var m=document.all.mobile.value;
	//var mb_id=document.all.member_id.value;
	//var q=agent.call('','get_mobile_check_no', '',mobile,member_id);
	//document.all.check_mobile.innerHTML=q;
	

	$.ajax({
	  url: "/php/ajax_member_check.php",
	  data: "act=get_check_no&mobile=" + mobile + "&member_id=" + member_id,
	  success: function(html){
		$("#check_mobile").html(html);		
	  },
	 timeout:10000,
	 error:function(XMLHttpRequest,textStatus,errorThrown)
		{
		  $("#check_mobile").html(XMLHttpRequest);
		  $("#check_mobile").html(textStatus);
		}
	});
}

//-------------------- 删除产品比较的列 ----------------------------------//
function del_tds(id)
{
	var tabObj=document.all.compare_tb;
	var t="document.all." + id;
	var td=eval(t);
	var index=td.cellIndex;
	//alert(id + '|'+ index);

	for(var j=0;j<tabObj.rows.length;j++)
	{		
		var tr=tabObj.rows[j];		
		tr.deleteCell(index);		
	}
}

//------------------------分页处理---------------------------//

function div_page_go(page)
{
	if(page==0)
	{ 
		window.location = "index.html"; 
	}
	else
	{
		window.location = "index_"+page+".html"; 

	}
}


//------------------------分页处理价格区间---------------------------//

function div_page_price_zone_go(page,price1,price2)
{
	if(page==0)
	{ 
		window.location = price1 + "-" + price2 + ".html"; 
	}
	else
	{
		window.location = price1 + "-" + price2 + "_" +page+".html"; 

	}
}


//------------------------分页处理---------------------------//

function addBookmark(url, title) {   
    if (window.sidebar) {    
        window.sidebar.addPanel(title, url,"");    
    } else if (document.all) {   
        var external = window.external;   
        external.AddFavorite(url, title);   
    } else if (window.opera && window.print) {   
        return true;   
    }   
}


//-------------------- ajax 操作 ----------------------------//

function show_price_zone(event,obj,sid){	

	$("#price_zone").html("<img src='/templates/sys_img/loading.gif' border=0>");

	$.ajax({
	  url: "/php/ajax_price_zone.php",
	  data: "product_sort="+sid+"&col=1",
	  success: function(html){
		$("#price_zone").html(html);
	  },
	 timeout:10000,
	 error:function(XMLHttpRequest,textStatus,errorThrown)
		{
		  $("#price_zone").html(XMLHttpRequest);
		  $("#price_zone").html(textStatus);
		}
	});
	
	t=getTop(obj)+28 + 'px';
	l=getLeft(obj)+0 + 'px';
	
	$("#price_zone").css("position","absolute");
	$("#price_zone").css("left",l);
	$("#price_zone").css("top",t);
	$("#price_zone").show();

}


document.onclick =function(){
	if(document.all.price_zone)$("#price_zone").hide();

}


//-------------------- ajax 操作 ----------------------------//