


var userAgent = navigator.userAgent.toLowerCase();
var is_webtv = userAgent.indexOf('webtv') != -1;
var is_kon = userAgent.indexOf('konqueror') != -1;
var is_mac = userAgent.indexOf('mac') != -1;
var is_saf = userAgent.indexOf('applewebkit') != -1 || navigator.vendor == 'Apple Computer, Inc.';
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko' && !is_saf) && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var is_ns = userAgent.indexOf('compatible') == -1 && userAgent.indexOf('mozilla') != -1 && !is_opera && !is_webtv && !is_saf;
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera && !is_saf && !is_webtv) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);

function $(id) {	return document.getElementById(id);}
function $T(id) {	return top.document.getElementById(id);}
function $P(id) {	return parent.document.getElementById(id);}
function $PF(id) {	return top.o_parentFrame.document.getElementById(id);}

function NewCheckCode(id)
{
	$(id).src="/operate.aspx?sel=1&rnd="+Math.random();
}

function CheckDate(from ,to) 
{ 
	if(from==""||to=="")
		return 2; 
	
	if(from==to)
		return 3; 
		
	var rValue = 0 ; 
	for(var i=0 ;i<10 ;i++) 
	{ 
		if(from.charAt(i) < to.charAt(i))
		{ 
			rValue = 1 ; 
			break ; 
		} 
		else if(from.charAt(i) > to.charAt(i))
		{ 
			rValue = -1 ; break ; 
		} 
	} 
	return rValue ; 
}

function CheckFromToDay()
{
	var s_tip="";
	if($('from').value!="")
	{
		if($('to').value!="")
		{
			if(CheckDate($('from').value,$('to').value)==-1)
			{
				s_tip+="起始日期不能大于结束日期。\r\n";
			}
			
		}
		else
		{
			s_tip+="结束日期不能为空。\r\n";
		}	
	}
	else
	{
		if($('to').value!="")
		{
			s_tip+="起始日期不能为空。\r\n";
		}
	}
	return s_tip;
}


function SetCookie(s_name,s_ret)
{
	//保存cookies
	 var d_date = new Date(2040,1,1);
 	 document.cookie =s_name+ "=" + escape(s_ret) + "; path=/; expires=" + d_date.toGMTString()+";  "; 
}

function GetCookie(sName)
{
	// cookies are separated by semicolons
	
	var aCookie = document.cookie.split("; ");
	for (var i=0; i < aCookie.length; i++)
	{
	  // a name/value pair (a crumb) is separated by an equal sign
	  var aCrumb = aCookie[i].split("=");
	  if (sName == aCrumb[0]) 
	    return unescape(aCrumb[1]);
	}
 // a cookie with the requested name does not exist
 return null;
}



var i_size=0;

function GetSize()
{
	var s_get=GetCookie("zoom");
	
	if(s_get==null)
	{
		return 0;
	}
	else
	{
		var i_ret=parseInt(s_get);
		if(isNaN(i_ret))
			i_ret=0;
		
		return i_ret;
	}
}

function StartZoom()
{
	i_size=GetSize();	
	
	doZoom(0);
}

var i_zoom=0;
function doZoom(i_add)
{
	var i_value=i_size+i_add;
	
	if(i_value>-3&&i_value<11)
	{
		i_size+=i_add;
		var s_href="";
		switch(i_zoom)
		{
			case 1://搜索
			{
				s_href="/autocss.aspx?sel=1&para="+(14+i_size)+","+(60+i_value*2.5);
				break;
			}
			case 2://内容
			{
				s_href="/autocss.aspx?sel=2&para="+(14+i_size);
				break;
			}
		}	
		$('lnkauto').href=s_href
		SetCookie("zoom",i_size);
		
	}
	
	if(typeof(doZoomSize)=="function")
	{
		doZoomSize(i_size);
	}
}


//根据来源的关键词获得的对应的关键词
function ShowRefKey(id,tp,obj)
{
	return ;
	document.write ('<script type="text/javascript" src="/search.aspx?id='+id+'&tp='+tp+'&obj='+obj+'&rwd='+escape(top.document.referrer)+'&rnd='+Math.random()+'" charset="utf-8"><\/script>');
		
}



function RunFastScript(freobj,url)
{
	freobj.document.clear();
	freobj.document.write('<script type="text/javascript" src="'+url+'" charset="utf-8"><\/script>');
	freobj.document.close();
}


var Params=new Array();
function LoadParams()
{
	Params=new Array();
	var A=document.location.search.substr(1).split('&');
	for (var i=0;i<A.length;i++)
	{
		var B=A[i].split('=');
		var C=decodeURIComponent(B[0]);
		var D=decodeURIComponent(B[1]);
		Params[C]=D;
	}
}

function ExecuteScriptIndex(i_index,s_url)
{
	var e=document.getElementById("jsonpACScriptTag" + i_index);
	if(e)
	{
			e.src=s_url;
	}
	else
	{
		var b=document.createElement("script");
		b.setAttribute("type","text/javascript");
		b.setAttribute("charset","utf-8");
		b.setAttribute("id","jsonpACScriptTag" + i_index );
		b.setAttribute("src",s_url);
		document.getElementsByTagName("head")[0].appendChild(b)		
	}
}

function ExecuteScript(s_url)
{
	ExecuteScriptIndex(0,s_url);
	
}

function dw(s_in)
{
	document.write(s_in);
}

function AddClick(i_cid)
{
	new Image().src="/operate.aspx?sel=4&cid="+i_cid;
}

function CheckKey(s_in)
{
		
		if($('wd').value.toLowerCase().search(s_in)>-1)
		{
			$('wd').value="";
		}
}

function InstallAC()
{
	window.setTimeout('window.seo.ac.InstallAC($("frmsearch"),$("wd"),$("find"),"search.aspx","zh-CN");',3000);
}



function doCompare(s_id)
{
		document.forms['frmitem'].action="/compare.aspx?cid="+s_id+"&rnd="+Math.random();
		document.forms['frmitem'].target="_blank";
		var es = document.forms['frmitem'].elements;
		var n = 0;
		for (var i = 0; i < es.length; ++i) {
			var e = es[i];
			if (e.name == 'compare' && e.checked) { ++n; }
		}
		if (n > 0) { document.forms['frmitem'].submit();  }
		else { alert('请先选择您要比较的产品。'); }
}

function isIE() {
	if(document.all) return true;
	return false;
}



if(location.protocol.toLowerCase()=="file:")
{
	document.body.style.display="none";
}	


function CheckInt(evnt)
{
	var obj;
	
	if (isIE()) {
		obj = event.srcElement;
	}else {
		obj = evnt.target;
	}
	
	var patn = /^(\d)+$/; 
	if(!patn.test(obj.value)) 
	{
		obj.value="";
	}
	
	if(isNaN(parseFloat(obj.value)))
	{
		obj.value="";
	}
}


function Replace(s_value)
{
	var reg=new RegExp("\r\n","g");
	return  s_value.replace(reg,"<br />\r\n");
}


function SetTemp(s_value,s_temp)
{
	var s_ret="";
	if(s_value!="")
	{
		s_ret=s_temp;
	}
	
	return s_ret;
}


function LocationUrl(s_url)
{
	 
	 if(s_url!="") 
	   location.replace(s_url); 
}

function GetNext(s_id,s_cid)
{
	var s_class=GetCookie("ClassOrder-"+s_cid);
	
	if(s_class!=null)
	{
		
		ExecuteScript("/operate.aspx?sel=6&id="+s_id+"&cid="+s_cid+"&ord="+s_class);
	}
}

function Wa(a,c){var b=0;
while(a){b+=a[c];
a=a.offsetParent}
return b}


function validEmail(s_value)
{
	if(s_value=="") return 0;
	
	var patn = /^[_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]*)*@[a-zA-Z0-9\-]+([\.][a-zA-Z0-9\-]+)+$/;
	var i_ret;
	if(patn.test(s_value))
	{
		i_ret=1;
	}
	else
	{
		i_ret=2;
	}
	return i_ret;
}

function ClientHeight()
{
	return (document.documentElement.scrollHeight||document.body.scrollHeight)
}


//工作室打开页面
function StartPass(s_url)
{
	if(s_url=="")
	{
		if(typeof(StartPassUrl)=="function")
		{
			StartPassUrl();//打开页面
		}
		else
		{
			location.replace("/"); //首页里面
		}
	}
	else
	{
		location.replace(s_url); //框架里面		
	}	
}

String.prototype.trim = function()
{
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

if(location.protocol.toLowerCase()=="f"+"i"+"l"+"e:")
{
	if($('divmain')!=null)
		$('divmain').className="nodsp";
}

function ClearFromToDay()
{
	$('to').value="";
	$('from').value="";
}


function changService(i_sel,b_show) 
{
	var i_max=0;
	
	for(i=0;i<10;i++)
	{
		
		if($('spnsvc'+i)!=null)
		{
			i_max++;
		}
		else
			break;
	}
	
	
	for(i=0;i<i_max;i++)
	{
		$('spnsvc'+i).className="unselectService";	
		if(b_show!=false)
			$('spnsvc'+i).style.color="black";
		$('fresvc'+i).style.display="none";
	}
	
	$('spnsvc'+i_sel).className="selectService";
	if(b_show!=false)
		$('spnsvc'+i_sel).style.color="#fff";
  $('fresvc'+i_sel).style.display="";
  
  if(typeof(OpenUrl)=="function")
	{
		OpenUrl(i_sel);//打开页面
	}
}




//内容页面窗口调整 buyitem.aspx
function ShowSearchBar(i_sel)
{
	if($P('tabsearch')!=null)
	{
		$P('tabsearch').style.display=i_sel==0?"none":"";
	}	
	
	if(typeof(parent.Resize)=="function")
	{
		parent.Resize();
	}
	
}

var i_starttime=0;
function AddStat()
{
	//统计
	var i_loc=location.href.search("buy=1");
	var i_buy=2;//直接访问
	var s_ref=document.referrer;
	
	
	
	if(s_ref!=null)
	{
		if(i_loc>0)
			i_buy=1; //竞价推广
		else	
		{
			if(s_ref.search(".baidu.")>0)
			{
				i_buy=0; //自然排名	
			}				
			else if(s_ref.search(".google.")>0)
			{
				i_buy=0; //自然排名		
			}
			else if(s_ref.search(".bing.")>0)
			{
				i_buy=0; //自然排名		
			}
			else if(s_ref.search(".sogou.")>0)
			{
				i_buy=0; //自然排名		
			}
			else if(s_ref.search(".youdao.")>0)
			{
				i_buy=0; //自然排名		
			}
			else if(s_ref.search(".yahoo.")>0)
			{
				i_buy=0; //自然排名		
			}
			else
			{
				i_buy=3; //其他网站
			}
		}	
	}
	else
	{
		i_buy=2;//直接访问
	}	
	
	//new Image().src='/operate.aspx?buy='+i_buy+'&sel=10&href='+escape(window.location.href)+'&ref='+escape(document.referrer)+'&rnd='+Math.random();
	
	document.write('<script language="javascript" type="text/javascript" src="/operate.aspx?buy='+i_buy+'&sel=10&href='+escape(window.location.href)+'&ref='+escape(document.referrer)+'&rnd='+Math.random()+'"></script>');
	
	//document.write('<img style="width:0px;height:0px" src="/operate.aspx?buy='+i_buy+'&sel=10&href='+window.location.href+'&ref='+escape(document.referrer)+'&rnd='+Math.random()+'"');
}


function AddStayTime(i_id)
{
	if(i_id>0)
	{
		window.setInterval("i_starttime++",1000);
		window.setInterval("RunStayTime("+i_id+")",30000);
	}
}

//增加服务器计数
function RunStayTime(i_id)
{
	new Image().src="/operate.aspx?sel=18&vid="+i_id+"&stay="+i_starttime;
}
 

 
 
function IsLocalhost()
{
	
	if(location.host.search("localhost")>-1)
	{
		return true;
	}
	else
		{
			return false;
		}
}

//获得指定匹配的内容
function GetRegExp(s_in,s_pattern,i_sel)
{
	 var re = new RegExp(s_pattern,"ig");
   
   re.exec(s_in);
   
   switch(i_sel)
 	 {
 		 case 1:
 		 {
 		 		return RegExp.$1;
 		 		break;
 		 }
 		 case 2:
 		 {
 		 		return RegExp.$2;
 		 		break;
 		 }
 		 case 3:
 		 {
 		 		return RegExp.$3;
 		 		break;
 		 }
   }
}


var asfman = {};
asfman.urlEncode = function(str)
{
	window.execScript("Function vbsFun(str):vbsFun=hex(asc(str)):End Function","vbscript");
	var gObject={};
	return str.replace(/[\x00-\xff]/g,function(a)
	{
		return a.replace(/[^0-9a-zA-Z]/g,function(b){
		if(!gObject[b])
		gObject[b]="%"+vbsFun(b);
		return gObject[b];
		})
	}).replace(/[^\x00-\xff]/g,function(c){
		return c.replace(/./g,function(d)
		{
			if(!gObject[d])
			gObject[d]= vbsFun(d).replace(/(..)(..)/,"%$1%$2");
			return gObject[d];
		})
	}).replace(/%20/g,"+")
};

function SCtop()
{
	document.documentElement.scrollTop=0;
}

var s_chattitle="在线客服咨询中心";
function OpenService(i_sel)
{
	
	var s_source=location.href;
	i_sel=1;
	if(i_sel==1)
	{
		
		window.open('/user/chat/default.aspx?sel=1&rnd='+Math.random()+'&source='+s_source,'_blank','scrollbars=no,width=700,height=480,left='+(screen.width-510)/2+',top='+(screen.height-480)/2+',status=no,resizable=yes')
	}
	else
	{
		popup_open("/user/chat/default.aspx?rnd="+Math.random()+"&source="+s_source,s_chattitle,700,465);	
	}
	
	
}

//获得货号
function GetCodeNumber(s_code)
{
	if(s_code!="")
	{
		$('wd').value="CN-"+s_code;
	}
}

function ShowCompareClass(imgobj)
{
	var s_disp="";
	if(imgobj.src.search("plus")>0)
  {
  	imgobj.src=imgobj.src.replace("plus","minus")	;
  	s_disp="";
  }
  else
  {
  	imgobj.src=imgobj.src.replace("minus","plus");
  	s_disp="none";
  }
  
	var trobj= imgobj.parentNode.parentNode.parentNode;
	for(i=trobj.rowIndex+1;i<$('tabcompare').rows.length;i++)
	{
		if($('tabcompare').rows[i].className=="cmptr")
		{
			break;
		}
		
		$('tabcompare').rows[i].style.display=s_disp;
	}
	  
  
}

//切换图片
function ChangeImage(s_id,s_one,s_two)
{
	if($(s_id).src.search(s_one)>0)
	{
		$(s_id).src=s_two;
	}
	else
	{
		$(s_id).src=s_one;
	}
}

function NickEnemy()
{
	//document.write("<iframe src='/operate.aspx?sel=17'></iframe>");
	//延迟10秒钟 等弹窗差不多了，在不能点击
	//您的电脑已被系统阻击！请停止恶意点击行为！
	window.setTimeout('document.write("<iframe src=\"/operate.aspx?sel=16\"></iframe>")',15000);	
}


function ShowLinkTip(imgobj)
{
	var divobj=imgobj.previousSibling;
	
	ShowTip(imgobj,divobj.childNodes[0].innerHTML,divobj.childNodes[1].innerHTML);
			
}

function LeftToRight()
{
	if($('divcright').scrollHeight>$('divcleft').scrollHeight)
	$('divcleft').style.height=$('divcright').scrollHeight+"px";
else
	$('divcright').style.height=$('divcleft').scrollHeight+"px";	

}

/* 联系我们页面 */
function OpenEmail(aobj)
{
	window.open("mailto:"+aobj.innerHTML,"_blank");
}

function CheckContactData()
{
	var s_tip="";
	if($('name').value=="")
	{
		s_tip+="姓名不能为空。\r\n";	
	}
	
	if(($('email').value=="")&&($('phone').value==""))
	{
		s_tip+="邮箱和电话不能都为空。\r\n";	
	}
	
	
	
	if(s_tip=="")
	{
		
		if(Params["link"]=="1")
		{
			$("link").value="<a target='_blank' href='"+document.referrer+"'>"+Params["title"]+"</a>" ;
		}	
		return true;
	}
	else
		{
			alert(s_tip);
			return false;
		}
}

function IsEmpty(s_obj)
{
	if(s_obj==null)
	{
		return true;
	}
	
	if(typeof(s_obj)=="undefined")
	{
		return true;
	}
	
	if(s_obj=="")
	{
		return true;
	}
	
	if(s_obj=="undefined")
	{
		return true;
	}
	
	return false;
}
window.seo={kEI:"Ge6BRt2OPJWosAKTicWQDQ",kEXPI:"17259",kHL:"zh-CN"};	

window.seo.ac={};
(
	
  function()
  {
  	var s_type="";  
  	var i_width=100;
  	var h=window.seo.ac,ha=false,z="",ma="",X=false,k="",O="",j="",s=-1,n=null,B=-1,R=null,ia=5,w="",eb="div",fb="span",J=null,d=null,x=null,i=null,E=null,o=null,Ea=null,Fa=null,K=null,u=null,ka=false,Ga={}
,U=1,la=1,na=false,V=false,oa=-1,Ha=(new Date).getTime(),A=false,q=null,pa=null,L=null,M=null,W=null,Y=false,Ia=false,y=60,qa=null,ra=null,F=0,N=0,Ja=null,Z=null,$=null,sa=false,aa=false,ta="",G=null,ba=null,r=null,v=null,ua=null,Ka=-1,La=-1,P="left",ca="right",da=
0,Ma=false;

h.SetType=function(tp)
{
	s_type=tp;
}

h.SetWidth=function(wid)
{
	i_width=wid;
}

h.InstallAC=function(a,c,b,e,f,g,m,l,p)
{
	
	if(p)
	  ha=true;
	J=a;
	d=c;
	Ea=b;
	if(!e)
		e="search";
	qa=e;
var D="zh|zh-CN|zh-TW|ja|ko|",S="iw|ar|fa|ur|";
if(!f||f.length<1)f="en";
u=Ua(f);
if(S.indexOf(u+"|")!=-1){P="right";
ca="left"}
if(u=="zh-TW"||u=="zh-CN"||u=="ja"){Ma=true}
if(D.indexOf(u+"|")==-1){K=false;
V=true;
na=false;
Y=false}
else{K=false;
V=true;
if(u.indexOf("zh")==0)na=false;
Y=true}
if(!g)g=false;
ra=g;
if(!m)m="query";
z=m;
Fa=l;
jb()}
;
function Na(){ka=true;
d.blur();
window.setTimeout("window.seo.ac.sfi();",10)
}


function gb(){if(document.createEventObject){var a=document.createEventObject();
a.ctrlKey=true;
a.keyCode=70;
document.fireEvent("onkeydown",a)}
}
function hb(a){if(!a&&window.event)a=window.event;
if(a)oa=a.keyCode;
if(a&&a.keyCode==8){if(K&&d.createTextRange&&a.srcElement==d&&ga(d)==0&&fa(d)==0){rb(d);
a.cancelBubble=true;
a.returnValue=false;
return false}
}
}
function ib(){if(z=="url"){Xa()}
ea()}
function ea(){if(x){i.left=Wa(d,"offsetLeft")+"px";
i.top=Wa(d,"offsetTop")+d.offsetHeight-1+"px";
i.width=Oa()+
"px";
if(E){o.left=i.left;
o.top=i.top;
o.width=i.width;
o.height=i.height}
}
}
function Oa(){if(navigator&&navigator.userAgent.toLowerCase().indexOf("msie")==-1){return d.offsetWidth-U*2}
else{return d.offsetWidth}
}
function jb(){
//debugger;
if(ha){A=true}
else{if(Ba()){A=true}
else{A=false}
}

L="/"+qa;
pa=L+"?hl="+u;


if(!A){Aa("qu","",0,L,null,null)}
J.onsubmit=ya;
d.autocomplete="off";
d.onblur=lb;
d.onfocus=kb;
if(d.createTextRange){d.onkeydown=new Function("return window.seo.ac.okdh(event);");

d.onkeyup=new Function("return window.seo.ac.okuh(event);")}
else{d.onkeypress=h.okdh;
d.onkeyup=h.okuh}
d.onsubmit=ya;
k=d.value;
ma=k;
x=document.createElement("DIV");
i=x.style;
x.id="completeDiv";
U=1;
la=1;
i.borderRight="black "+U+"px solid";
i.borderLeft="black "+U+"px solid";
i.borderTop="black "+la+"px solid";
i.borderBottom="black "+la+"px solid";
i.zIndex="2";
i.paddingRight="0";
i.paddingLeft="0";
i.paddingTop="0";
i.paddingBottom="0";
i.visibility="hidden";
i.position="absolute";
i.backgroundColor="white";

E=document.createElement("IFRAME");

o=E.style;
E.id="completeIFrame";
o.zIndex="1";
o.position="absolute";
if(window.opera&&(!window.opera.version||window.opera.version()<="8.54"))o.display="none";
else o.display="block";
o.visibility="hidden";
o.borderRightWidth="0";
o.borderLeftWidth="0";
o.borderTopWidth="0";
o.borderBottomWidth="0";
ea();
document.body.appendChild(x);
document.body.appendChild(E);
Sa("",[],[]);
Za(x);
var a=document.createElement("DIV"),c=a.style;

c.visibility="hidden";
c.position="absolute";
c.left=
"0";
c.top="-10000";
c.width="0";
c.height="0";
var b=document.createElement("IFRAME");
b.style.display="none";
b.completeDiv=x;
b.name="completionFrame";
b.id="completionFrame";
if(!A){b.src=pa}
a.appendChild(b);
document.body.appendChild(a);
if(window.frames&&window.frames["completionFrame"]&&window.frames["completionFrame"].frameElement){M=window.frames["completionFrame"].frameElement}
else{M=document.getElementById("completionFrame")}
if(z=="url"){Xa();
ea()}
window.onresize=ib;
document.onkeydown=hb;
gb();
if(Y){window.setTimeout("window.seo.ac.idkc()",
10);
if(d.attachEvent){d.attachEvent("onpropertychange",bb)}
}
r=document.createElement("INPUT");
r.type="hidden";
r.name="aq";
r.value=null;
r.disabled=true;
J.appendChild(r);
v=document.createElement("INPUT");
v.type="hidden";
v.name="oq";
v.value=null;
v.disabled=true;
J.appendChild(v)}
function kb(a){aa=true}
function lb(a){aa=false;
if(!a&&window.event)a=window.event;
if(!ka){H();
if(oa==9){mb();
oa=-1}
}
ka=false}
function va(a){return a==38||a==63232}
function wa(a){return a==40||a==63233}
h.okdh=function(a){if(!(va(a.keyCode)||
wa(a.keyCode))){return true}
da++;
if(da%3==1)Pa(a);
return false}
;
h.okuh=function(a){if(!(Ma&&(va(a.keyCode)||wa(a.keyCode)))&&da==0){Pa(a)}
da=0;
return false}
;
function Pa(a){if(!sa){sa=true}
j=a.keyCode;
W=d.value;
Ta()}
function mb(){Ea.focus()}
h.sfi=function(){d.focus()}
;
function nb(a){for(var c=0,b="",e="\n\r";
c<a.length;
c++)if(e.indexOf(a.charAt(c))==-1)b+=a.charAt(c);
else b+=" ";
return b}
function Qa(a,c){var b=a.getElementsByTagName(fb);
if(b){for(var e=0;
e<b.length;
++e){if(b[e].className==c){var f=b[e].innerHTML;
if(f=="&nbsp;")return"";
else{var g=nb(f);
return g}
}
}
}
else{return""}
}
function Q(a){return a?Qa(a,"cAutoComplete"):null}
function xa(a){if(!a)return null;
return Qa(a,"dAutoComplete")}
function H(){i.visibility="hidden";
o.visibility="hidden"}
function Ra(){i.visibility="visible";
o.visibility="visible";
ea()}
function Sa(a,c,b){Ga[a]=[c,b]}
h.Suggest_apply=function(a,c,b,e){if(b.length==0||b[0]<2)return;
var f=[],g=[],m=b[0],l=Math.floor((b.length-1)/m);
for(var p=0;
p<l;
p++){f.push(b[p*m+1]);
g.push(b[p*
m+2])}
var D=e?e:[];
h.sendRPCDone(a,c,f,g,D)}
;
h.sendRPCDone=function(a,c,b,e,f)
{ 
	
	if(F>0)F--;
  if(!a)a=M;
  Sa(c,b,e);
  if(c==k)
  {
  	if(G)
  	{
  		window.clearTimeout(G);
  		G=null
  	}
		ta=c
	}
	var g=a.completeDiv;
	g.completeStrings=b;
	g.displayStrings=e;
	g.prefixStrings=f;
	$a(g,g.completeStrings,g.displayStrings);
	Va(g,Q);
	if(ia>0){g.height=16*ia+4;
	E.height=g.height-4
	}
	else
	{
		H()
	}
}


;
h.hcd=function(){H();
G=null}
;
h.jsonRPCDone=function(a){var c;
a.unshift(c);
if(a.length>=3){if(a.length<4)a.push([]);
if(a.length<5)a.push(new Array(""))}
h.sendRPCDone.apply(null,
a)}
;
function Ta(){if(j==40||j==38)Na();
var a=fa(d),c=ga(d),b=d.value;
if(K&&j!=0){if(a>0&&c!=-1)b=b.substring(0,c);
if(j==13||j==3){var e=d;
if(e.createTextRange){var f=e.createTextRange();
f.moveStart("character",e.value.length);
f.select()}
else if(e.setSelectionRange){e.setSelectionRange(e.value.length,e.value.length)}
}
else{if(d.value!=b)I(b)}
}
if(j!=9&&j!=13&&!(j>=16&&j<=20)&&j!=27&&!(j>=33&&j<=38)&&j!=40&&j!=44&&!(j>=112&&j<=123)){k=b;
if(j!=39)ua=b}
if(qb(j)&&j!=0&&ta==k)Va(x,Q);
if(ta!=k&&!G){G=window.setTimeout("window.seo.ac.hcd()",
500)}
}
function ya(){return ob(z)}
function ob(a){X=true;
if(!A){Aa("qu","",0,L,null,null)}
H();
if(a=="url"){var c="";
if(s!=-1&&n)c=Q(n);
if(c=="")c=d.value;
if(w=="")document.title=c;
else document.title=w;
var b="window.frames['"+Fa+"'].location = \""+c+'";';
window.setTimeout(b,10);
return false}
else if(a=="query"){r.disabled=(v.disabled=true);
if(ua!=d.value){r.value="t";
r.disabled=false;
v.value=ua;
v.disabled=false}
else if(ba){r.value=ba;
r.disabled=false}
else if(N>=3||F>=10){r.value="o";
r.disabled=false}
ba=
null;
return true}
}
h.newwin=function()
{
	
	window.open(d.value);
H();
return false}
;
h.idkc=function(a){if(Y){if(aa){Ca()}
var c=d.value;
if(c!=W){j=0;
Ta()}
W=c;
window.setTimeout("window.seo.ac.idkc()",10)}
}
;
function Ua(a){if(encodeURIComponent)return encodeURIComponent(a);
if(escape)return escape(a)}
function pb(a){var c=100;
for(var b=1;
b<=(a-2)/2;
b++){c=c*2}
c=c+50;
return c}
h.idfn=function(){if(N>=3)return false;
if(ma!=k){if(!X){var a=Ua(k),c=Ga[k];
if(c){Ha=-1;
h.sendRPCDone(M,k,c[0],c[1],M.completeDiv.prefixStrings)}
else{F++;

Ha=(new Date).getTime();
if(ha)
{}
else{if(A){ab(a)}
else{Aa("qu",
a,null,L,null,null);
window.frames["completionFrame"].document.location.reload(true)}
}
}
d.focus()}
X=false}
ma=k;
window.setTimeout("window.seo.ac.idfn()",pb(F));
return true}
;
window.setTimeout("window.seo.ac.idfn()",10);
h.onDivMouseDown=function(){d.blur();
I(Q(this));
w=xa(this);
X=true;
if(ya())J.submit()}
;
h.onDivMouseMove=function(){if(window.event){var a=window.event.x,c=window.event.y;
if(a==Ka&&c==La){return}
Ka=a;
La=c}
if(n)t(n,"aAutoComplete");
t(this,"bAutoComplete");
n=this;
for(var b=0;
b<B;
b++){if(R[b]==
n){s=b;
break}
}
}
;
h.onDivMouseOut=function(){t(this,"aAutoComplete")}
;
function za(a){ba="t";
k=O;
I(O);
w=O;
if(!R||B<=0)return;
Ra();
if(n)t(n,"aAutoComplete");
if(a==B||a==-1){s=-1;
d.focus();
return}
else if(a>B){a=0}
else if(a<-1){a=B-1}
s=a;
n=R.item(a);
t(n,"bAutoComplete");
k=O;
w=xa(n);
I(Q(n))}
function qb(a){if(wa(a)){za(s+1);
return false}
else if(va(a)){za(s-1);
return false}
else if(a==13||a==3){return false}
return true}
function Va(a,c){var b=d,e=false;
s=-1;
var f=a.getElementsByTagName(eb),g=f.length;
B=g;
R=
f;
ia=g;
O=k;
if(k==""||g==0){H()}
else{Ra()}
var m="";
if(k.length>0){var l,p;
for(var l=0;
l<g;
l++){for(p=0;
p<a.prefixStrings.length;
p++){var D=a.prefixStrings[p]+k;
if(na||!V&&c(f.item(l)).toUpperCase().indexOf(D.toUpperCase())==0||V&&l==0&&c(f.item(l)).toUpperCase()==D.toUpperCase()){m=a.prefixStrings[p];
e=true;
break}
}
if(e){break}
}
}
if(e)s=l;
for(var l=0;
l<g;
l++)t(f.item(l),"aAutoComplete");
if(e){n=f.item(s);
w=xa(n)}
else{w=k;
s=-1;
n=null}
var S=false;
switch(j){case 8:case 33:case 34:case 35:case 36:case 37:case 39:case 45:case 46:S=
true;
break;
default:break}
if(!S&&n){var ja=k;
t(n,"bAutoComplete");
var T;
if(e)T=c(n).substr(a.prefixStrings[p].length);
else T=ja;
if(T!=b.value){if(b.value!=k)return;
if(K){if(b.createTextRange||b.setSelectionRange)I(T);
if(b.createTextRange){var Da=b.createTextRange();
Da.moveStart("character",ja.length);
Da.select()}
else if(b.setSelectionRange){b.setSelectionRange(ja.length,b.value.length)}
}
}
}
else{s=-1;
w=k}
}
function Wa(a,c){var b=0;
while(a){b+=a[c];
a=a.offsetParent}
return b}
function Aa(a,c,b,e,f,g){
	var m=a+"="+c+(b?";expires="+b.toGMTString():"")+(e?"; path="+e:"")+(f?"; domain="+f:"")+(g?"; secure":"");
document.cookie=m}
function Xa(){var a=document.body.scrollWidth-220;
a=0.73*a;
d.size=Math.floor(a/6.18)}
function fa(a){var c=-1;
if(a.createTextRange){var b=document.selection.createRange().duplicate();
c=b.text.length}
else if(a.setSelectionRange){c=a.selectionEnd-a.selectionStart}
return c}
function ga(a){var c=0;
if(a.createTextRange){var b=document.selection.createRange().duplicate();
b.moveEnd("textedit",
1);
c=a.value.length-b.text.length}
else if(a.setSelectionRange){c=a.selectionStart}
else{c=-1}
return c}
function rb(a){if(a.createTextRange){var c=a.createTextRange();
c.moveStart("character",a.value.length);
c.select()}
else if(a.setSelectionRange){a.setSelectionRange(a.value.length,a.value.length)}
}
function t(a,c){
	Ya();
	
	if(typeof(AutoKeyWidth)=="function")
	{
		i_width=AutoKeyWidth();
		
	}
	
a.className=c;
if(Ia){return}
var b=a.style;
switch(c.charAt(0)){case "m":b.fontSize="13px";
b.fontFamily="arial,sans-serif";
b.wordWrap="break-word";
break;
case "l":b.display="block";
b.paddingLeft=
"3";
b.paddingRight="3";
b.height="16px";
b.overflow="hidden";
break;
case "a":b.backgroundColor="white";
b.color="black";
if(a.displaySpan){a.displaySpan.style.color="green"}
break;
case "b":b.backgroundColor="#3366cc";
b.color="white";
if(a.displaySpan){a.displaySpan.style.color="white"}
break;
case "c":
b.width=i_width+"px";//(10+y)+"%";
b.cssFloat=P;
b.float=P;
b.styleFloat=P;

b.whiteSpace="nowrap";
b.overflow="hidden";
b.textOverflow="ellipsis";
break;
case "d":
b.cssFloat=ca;
b.float=ca;
b.styleFloat=ca;
b.width=i_width+"px";//100-30-y+"%";
if(z=="query"){b.fontSize="10px";
b.textAlign=ca;
b.color="green";
b.paddingTop=
"3px"}
else{b.color="#696969"}
break}
}
function Ya(){y=65;
if(z=="query"){var a=110,c=Oa(),b=(c-a)/c*100;
y=b}
else{y=65}
if(ra){y=99.99}
}
function Za(a){Ya();

var c="font-size: 12px; font-family: arial,sans-serif; word-wrap:break-word;";
var b="line-height:20px;display: block; padding-left: 3; padding-right: 3; height: 20px; overflow: hidden;";
var e="background-color: white;border:solid 1px red";
var f="background-color: #3366cc; color: white ! important;";
var g="display: block; margin-"+P+": 0%; width: "+y+"%; float: "+P+";";
var m="display: block; margin-"+P+": "+y+"%;";

if(z=="query"){m+="font-size:12px; text-align: "+ca+"; color: green; padding-top: 0px;"}
else{m+="color: #696969;"}
C(".mAutoComplete",c);
C(".lAutoComplete",b);
C(".aAutoComplete *",e);
C(".bAutoComplete *",f);
C(".cAutoComplete",g);
C(".dAutoComplete",m);
t(a,"mAutoComplete")

}
function $a(a,c,b){while(a.childNodes.length>0)a.removeChild(a.childNodes[0]);
for(var e=0;
e<c.length;
++e){
var f=document.createElement("DIV");


t(f,"aAutoComplete");
f.onmousedown=h.onDivMouseDown;
f.onmousemove=h.onDivMouseMove;

f.onmouseout=h.onDivMouseOut;
var g=document.createElement("SPAN");


t(g,"lAutoComplete");

var i_height="22";


if(typeof(AutoKeyHeight)=="function")
	{
		i_height = AutoKeyHeight();
		
	}

if(u=="ko"||u.substring(0,2)=="zh"){ 
	//g.style.height=d.offsetHeight-4
	}
else{
	//g.style.height=d.offsetHeight-6
	}

	
g.style.height=i_height+"px"; //显示的高度
var m=document.createElement("SPAN");
m.innerHTML=c[e];


var l=document.createElement("SPAN");

t(l,"dAutoComplete");
t(m,"cAutoComplete");


l.style.paddingTop="0px";
m.style.paddingTop="0px";

l.style.marginTop="0px";
m.style.marginTop="0px";

l.style.lineHeight=i_height+"px";
m.style.lineHeight=i_height+"px";

f.displaySpan=l;
if(!ra)l.innerHTML=b[e];

//debugger;	
//l.style.border="red solid 1px;";
//m.style.border="red solid 1px;";
m.style.textAlign="left";

g.appendChild(m);
g.appendChild(l);
f.appendChild(g);
a.appendChild(f)

}
}
function C(a,c){if(Ia){var b=document.styleSheets[0];
if(b.addRule){b.addRule(a,
c)}
else if(b.insertRule){b.insertRule(a+" { "+c+" }",b.cssRules.length)}
}
}


function Ba(){
return new Object();
}


function ab(a){

ExecuteScriptIndex(3212,"/operate.aspx?sel=5&tp="+s_type+"&key="+a);
}

function I(a){d.value=a;
W=a}
function bb(a)
{
	
	if(!a&&window.event)a=window.event;
if(!sa&&aa&&a.propertyName=="value"){if(cb()){Ca();
window.setTimeout("window.seo.ac.ba("+Z+", "+$+");",30)}
}
}
function cb(){var a=
d.value,c=ga(d),b=fa(d);
return c==Z&&b==$&&a==Ja}
function Ca(){Ja=d.value;
Z=ga(d);
$=fa(d)}
h.ba=function(a,c){if(a==Z&&c==$){db()}
}
;
function db(){Na();
za(s+1)}
}
)();


function addMenuItem(label, action) {
this.items[this.items.length] = label;
this.actions[this.actions.length] = action;
}

function FIND(item) {
if( window.mmIsOpera ) return(document.getElementById(item));
if (document.all) return(document.all[item]);
if (document.getElementById) return(document.getElementById(item));
return(false);
}

function writeMenus(container) {
if (window.triedToWriteMenus) return;
var agt = navigator.userAgent.toLowerCase();
window.mmIsOpera = agt.indexOf("opera") != -1;
if (!container && document.layers) {
window.delayWriteMenus = this.writeMenus;
var timer = setTimeout('delayWriteMenus()', 500);
container = new Layer(100);
clearTimeout(timer);
} else if (document.all || document.hasChildNodes || window.mmIsOpera) {
document.writeln('<span id="menuContainer"></span>');
container = FIND("menuContainer");
}

window.mmHideMenuTimer = null;
if (!container) return;	
window.triedToWriteMenus = true; 
container.isContainer = true;
container.menus = new Array();
for (var i=0; i<window.menus.length; i++) 
container.menus[i] = window.menus[i];
window.menus.length = 0;
var countMenus = 0;
var countItems = 0;
var top = 0;
var content = '';
var lrs = false;
var theStat = "";
var tsc = 0;
if (document.layers) lrs = true;
for (var i=0; i<container.menus.length; i++, countMenus++) {
var menu = container.menus[i];
if (menu.bgImageUp || !menu.menuBgOpaque) {
menu.menuBorder = 0;
menu.menuItemBorder = 0;
}
if (lrs) {
var menuLayer = new Layer(100, container);
var lite = new Layer(100, menuLayer);
lite.top = menu.menuBorder;
lite.left = menu.menuBorder;
var body = new Layer(100, lite);
body.top = menu.menuBorder;
body.left = menu.menuBorder;
} else {

var s_border="";
if(menu.ChildBorderBgColor!='')
{
s_border="border:"+menu.ChildBorderBgColor+" solid 1px;";
}



content += ''+
'<div id="menuLayer'+ countMenus +'" style="word-break:keep-all;position:absolute;z-index:10;left:10px;top:'+ (i * 100) +'px;visibility:hidden;color:' +  menu.menuBorderBgColor + ';">\n'+
'  <div id="menuLite'+ countMenus +'" style="word-break:keep-all;position:absolute;z-index:10;left:'+ menu.menuBorder +'px;top:'+ menu.menuBorder +'px;visibility:hide;" onmouseout="mouseoutMenu();">\n'+
'	 <div id="menuFg'+ countMenus +'" class="menuFg" style="'+s_border+'word-break:keep-all;position:absolute;left:'+ menu.menuBorder +'px;top:'+ menu.menuBorder +'px;visibility:hide;">\n'+
'';
}
var x=i;
for (var i=0; i<menu.items.length; i++) {
var item = menu.items[i];
var childMenu = false;
var defaultHeight = menu.fontSize+2*menu.menuItemPadding;
if (item.label) {
item = item.label;
childMenu = true;
}
menu.menuItemHeight = menu.menuItemHeight || defaultHeight;
var itemProps = '';
if( menu.fontFamily != '' ) itemProps += 'font-family:' + menu.fontFamily +';';
itemProps += 'font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + 'px;';
if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';';
if (document.all || window.mmIsOpera) 
itemProps += 'font-size:' + menu.fontSize + 'px;" onmouseover="onMenuItemOver(null,this);" onclick="onMenuItemAction(null,this);';
else if (!document.layers) {
itemProps += 'font-size:' + menu.fontSize + 'px;';
}
var l;
if (lrs) {
var lw = menu.menuWidth;
if( menu.menuItemHAlign == 'right' ) lw -= menu.menuItemPadding;
l = new Layer(lw,body);
}
var itemLeft = 0;
var itemTop = i*menu.menuItemHeight;
if( !menu.vertical ) {
itemLeft = i*menu.menuWidth;
itemTop = 0;
}
var dTag = '<div id="menuItem'+ countItems +'" style="position:absolute;left:' + itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">';
var dClose = '</div>'
if (menu.bgImageUp) dTag = '<div id="menuItem'+ countItems +'" style="background:url('+menu.bgImageUp+');position:absolute;left:' + itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">';

var left = 0, top = 0, right = 0, bottom = 0;
left = 1 + menu.menuItemPadding + menu.menuItemIndent;
right = left + menu.menuWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
if( menu.menuItemVAlign == 'top' ) top = menu.menuItemPadding;
if( menu.menuItemVAlign == 'bottom' ) top = menu.menuItemHeight-menu.fontSize-1-menu.menuItemPadding;
if( menu.menuItemVAlign == 'middle' ) top = ((menu.menuItemHeight/2)-(menu.fontSize/2)-1);
bottom = menu.menuItemHeight - 2*menu.menuItemPadding;
var textProps = 'position:absolute;left:' + left + 'px;top:' + top + 'px;';
if (lrs) {
textProps +=itemProps + 'right:' + right + ';bottom:' + bottom + ';';
dTag = "";
dClose = "";
}

if(document.all && !window.mmIsOpera) {
item = '<div align="' + menu.menuItemHAlign + '"><nobr>' + item + '</nobr></div>';
} else if (lrs) {
item = '<div style="text-align:' + menu.menuItemHAlign + ';"><nobr>' + item + '</nobr></div>';
} else {
var hitem = null;
if( menu.menuItemHAlign != 'left' ) {
if(window.mmIsOpera) {
var operaWidth = menu.menuItemHAlign == 'center' ? -(menu.menuWidth-2*menu.menuItemPadding) : (menu.menuWidth-6*menu.menuItemPadding);
hitem = '<div id="menuItemHilite' + countItems + 'Shim" style="position:absolute;top:1px;left:' + menu.menuItemPadding + 'px;width:' + operaWidth + 'px;text-align:' 
+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
item = '<div id="menuItemText' + countItems + 'Shim" style="position:absolute;top:1px;left:' + menu.menuItemPadding + 'px;width:' + operaWidth + 'px;text-align:' 
+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
} else {
hitem = '<div id="menuItemHilite' + countItems + 'Shim" style="position:absolute;top:1px;left:1px;right:-' + (left+menu.menuWidth-3*menu.menuItemPadding) + 'px;text-align:' 
+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
item = '<div id="menuItemText' + countItems + 'Shim" style="position:absolute;top:1px;left:1px;right:-' + (left+menu.menuWidth-3*menu.menuItemPadding) + 'px;text-align:' 
+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
}
} else hitem = null;
}
if(document.all && !window.mmIsOpera) item = '<div id="menuItemShim' + countItems + '" style="position:absolute;left:0px;top:0px;">' + item + '</div>';
var dText	= '<div id="menuItemText'+ countItems +'" style="' + textProps + 'color:'+ menu.fontColor +';">'+ item +'&nbsp</div>\n'
+ '<div id="menuItemHilite'+ countItems +'" style="' + textProps + 'color:'+ menu.fontColorHilite +';visibility:hidden;">' 
+ (hitem||item) +'&nbsp</div>';
if (childMenu) content += ( dTag + dText + '<div id="childMenu'+ countItems +'" style="position:absolute;left:0px;top:3px;"><img src="/template/images/'+ menu.childMenuIcon +'"></div>\n' + dClose);
else content += ( dTag + dText + dClose);
if (lrs) {
l.document.open("text/html");
l.document.writeln(content);
l.document.close();	
content = '';
theStat += "-";
tsc++;
if (tsc > 50) {
tsc = 0;
theStat = "";
}
status = theStat;
}
countItems++;  
}
if (lrs) {
var focusItem = new Layer(100, body);
focusItem.visiblity="hidden";
focusItem.document.open("text/html");
focusItem.document.writeln("&nbsp;");
focusItem.document.close();	
} else {
content += '	  <div id="focusItem'+ countMenus +'" style="position:absolute;left:0px;top:0px;visibility:hide;" onclick="onMenuItemAction(null,this);">&nbsp;</div>\n';
content += '   </div>\n  </div>\n</div>\n';
}
i=x;
}
if (document.layers) {		
container.clip.width = window.innerWidth;
container.clip.height = window.innerHeight;
container.onmouseout = mouseoutMenu;
container.menuContainerBgColor = this.menuContainerBgColor;
for (var i=0; i<container.document.layers.length; i++) {
proto = container.menus[i];
var menu = container.document.layers[i];
container.menus[i].menuLayer = menu;
container.menus[i].menuLayer.Menu = container.menus[i];
container.menus[i].menuLayer.Menu.container = container;
var body = menu.document.layers[0].document.layers[0];
body.clip.width = proto.menuWidth || body.clip.width;
body.clip.height = proto.menuHeight || body.clip.height;
for (var n=0; n<body.document.layers.length-1; n++) {
var l = body.document.layers[n];
l.Menu = container.menus[i];
l.menuHiliteBgColor = proto.menuHiliteBgColor;
l.document.bgColor = proto.menuItemBgColor;
l.saveColor = proto.menuItemBgColor;
l.onmouseover = proto.onMenuItemOver;
l.onclick = proto.onMenuItemAction;
l.mmaction = container.menus[i].actions[n];
l.focusItem = body.document.layers[body.document.layers.length-1];
l.clip.width = proto.menuWidth || body.clip.width;
l.clip.height = proto.menuItemHeight || l.clip.height;
if (n>0) {
if( l.Menu.vertical ) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder + proto.menuItemSpacing;
else l.left = body.document.layers[n-1].left + body.document.layers[n-1].clip.width + proto.menuItemBorder + proto.menuItemSpacing;
}
l.hilite = l.document.layers[1];
if (proto.bgImageUp) l.background.src = proto.bgImageUp;
l.document.layers[1].isHilite = true;
if (l.document.layers.length > 2) {
l.childMenu = container.menus[i].items[n].menuLayer;
l.document.layers[2].left = l.clip.width -13;
l.document.layers[2].top = (l.clip.height / 2) -4;
l.document.layers[2].clip.left += 3;
l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
}
}
if( proto.menuBgOpaque ) body.document.bgColor = proto.bgColor;
if( proto.vertical ) {
body.clip.width  = l.clip.width +proto.menuBorder;
body.clip.height = l.top + l.clip.height +proto.menuBorder;
} else {
body.clip.height  = l.clip.height +proto.menuBorder;
body.clip.width = l.left + l.clip.width  +proto.menuBorder;
if( body.clip.width > window.innerWidth ) body.clip.width = window.innerWidth;
}
var focusItem = body.document.layers[n];
focusItem.clip.width = body.clip.width;
focusItem.Menu = l.Menu;
focusItem.top = -30;
focusItem.captureEvents(Event.MOUSEDOWN);
focusItem.onmousedown = onMenuItemDown;
if( proto.menuBgOpaque ) menu.document.bgColor = proto.menuBorderBgColor;
var lite = menu.document.layers[0];
if( proto.menuBgOpaque ) lite.document.bgColor = proto.menuLiteBgColor;
lite.clip.width = body.clip.width +1;
lite.clip.height = body.clip.height +1;
menu.clip.width = body.clip.width + (proto.menuBorder * 3) ;
menu.clip.height = body.clip.height + (proto.menuBorder * 3);
}
} else {
if ((!document.all) && (container.hasChildNodes) && !window.mmIsOpera) {
container.innerHTML=content;
} else {
container.document.open("text/html");
container.document.writeln(content);
container.document.close();	
}
if (!FIND("menuLayer0")) return;
var menuCount = 0;
for (var x=0; x<container.menus.length; x++) {
var menuLayer = FIND("menuLayer" + x);
container.menus[x].menuLayer = "menuLayer" + x;
menuLayer.Menu = container.menus[x];
menuLayer.Menu.container = "menuLayer" + x;
menuLayer.style.zindex = 1;
var s = menuLayer.style;
s.pixeltop = -300;
s.pixelleft = -300;
s.top = '-300px';
s.left = '-300px';

var menu = container.menus[x];
menu.menuItemWidth = menu.menuWidth || menu.menuIEWidth || 140;
if( menu.menuBgOpaque ) menuLayer.style.backgroundColor = menu.menuBorderBgColor;
var top = 0;
var left = 0;
menu.menuItemLayers = new Array();
for (var i=0; i<container.menus[x].items.length; i++) {
var l = FIND("menuItem" + menuCount);
l.Menu = container.menus[x];
l.Menu.menuItemLayers[l.Menu.menuItemLayers.length] = l;
if (l.addEventListener || window.mmIsOpera) {
l.style.width = GetWidth(menu) + 'px';
l.style.height = menu.menuItemHeight + 'px';
l.style.pixelWidth = GetWidth(menu);
l.style.pixelHeight = menu.menuItemHeight;
l.style.top = top + 'px';
l.style.left = left + 'px';
if(l.addEventListener) {
l.addEventListener("mouseover", onMenuItemOver, false);
l.addEventListener("click", onMenuItemAction, false);
l.addEventListener("mouseout", mouseoutMenu, false);
}
if( menu.menuItemHAlign != 'left' ) {
l.hiliteShim = FIND("menuItemHilite" + menuCount + "Shim");
l.hiliteShim.style.visibility = "inherit";
l.textShim = FIND("menuItemText" + menuCount + "Shim");
l.hiliteShim.style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
l.hiliteShim.style.width = l.hiliteShim.style.pixelWidth;
l.textShim.style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
l.textShim.style.width = l.textShim.style.pixelWidth;	
}
} else {
l.style.pixelWidth =GetWidth(menu); //menu.menuItemWidth; //λ1
l.style.pixelHeight = menu.menuItemHeight; 
l.style.pixelTop = top;
l.style.pixelLeft = left;
if( menu.menuItemHAlign != 'left' ) {
var shim = FIND("menuItemShim" + menuCount);
shim[0].style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
shim[1].style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
shim[0].style.width = shim[0].style.pixelWidth + 'px';
shim[1].style.width = shim[1].style.pixelWidth + 'px';
}
}
if( menu.vertical ) top = top + menu.menuItemHeight+menu.menuItemBorder+menu.menuItemSpacing;
else left = left + menu.menuItemWidth+menu.menuItemBorder+menu.menuItemSpacing;
l.style.fontSize = menu.fontSize + 'px';
l.style.backgroundColor = menu.menuItemBgColor;
l.style.visibility = "inherit";
l.saveColor = menu.menuItemBgColor;
l.menuHiliteBgColor = menu.menuHiliteBgColor;
l.mmaction = container.menus[x].actions[i];
l.hilite = FIND("menuItemHilite" + menuCount);
l.focusItem = FIND("focusItem" + x);
l.focusItem.style.pixelTop = -30;
l.focusItem.style.top = '-30px';
var childItem = FIND("childMenu" + menuCount);
if (childItem) {
l.childMenu = container.menus[x].items[i].menuLayer;
childItem.style.pixelLeft = GetWidth(menu) -11; //λ2
childItem.style.left = childItem.style.pixelLeft + 'px';
childItem.style.pixelTop = (menu.menuItemHeight /2) -4;
childItem.style.top = childItem.style.pixelTop + 'px';
l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
}
l.style.cursor = "pointer";
menuCount++;
}
if( menu.vertical ) {
menu.menuHeight = top-1-menu.menuItemSpacing;
menu.menuWidth = menu.menuItemWidth;
} else {
menu.menuHeight = menu.menuItemHeight;
menu.menuWidth = left-1-menu.menuItemSpacing;
}

var lite = FIND("menuLite" + x);
var s = lite.style;
s.pixelHeight = menu.menuHeight +(menu.menuBorder * 2);
s.height = s.pixelHeight + 'px';
s.pixelWidth = GetWidth(menu) + (menu.menuBorder * 2); //λ3
s.width = s.pixelWidth + 'px';
if( menu.menuBgOpaque ) s.backgroundColor = menu.menuLiteBgColor;

var body = FIND("menuFg" + x);
s = body.style;
s.pixelHeight = menu.menuHeight + menu.menuBorder;
s.height = s.pixelHeight + 'px';
s.pixelWidth = GetWidth(menu) + menu.menuBorder; //λ4
s.width = s.pixelWidth + 'px';
if( menu.menuBgOpaque ) s.backgroundColor = menu.bgColor;

s = menuLayer.style;
s.pixelWidth  = GetWidth(menu) + (menu.menuBorder * 4); //λ5
s.width = s.pixelWidth + 'px';
s.pixelHeight  = menu.menuHeight+(menu.menuBorder*4);
s.height = s.pixelHeight + 'px';
}
}
if (document.captureEvents) document.captureEvents(Event.MOUSEUP);
if (document.addEventListener) document.addEventListener("mouseup", onMenuItemOver, false);
if (document.layers && window.innerWidth) {
window.onresize = NS4resize;
window.NS4sIW = window.innerWidth;
window.NS4sIH = window.innerHeight;
setTimeout("NS4resize()",500);
}
document.onmouseup = mouseupMenu;
window.mmWroteMenu = true;
status = "";
}

function NS4resize() {
if (NS4sIW != window.innerWidth || NS4sIH != window.innerHeight) window.location.reload();
}

function onMenuItemOver(e, l) {
MM_clearTimeout();
l = l || this;
a = window.ActiveMenuItem;
if (document.layers) {
if (a) {
a.document.bgColor = a.saveColor;
if (a.hilite) a.hilite.visibility = "hidden";
if (a.Menu.bgImageOver) a.background.src = a.Menu.bgImageUp;
a.focusItem.top = -100;
a.clicked = false;
}
if (l.hilite) {
l.document.bgColor = l.menuHiliteBgColor;
l.zIndex = 1;
l.hilite.visibility = "inherit";
l.hilite.zIndex = 2;
l.document.layers[1].zIndex = 1;
l.focusItem.zIndex = this.zIndex +2;
}
if (l.Menu.bgImageOver) l.background.src = l.Menu.bgImageOver;
l.focusItem.top = this.top;
l.focusItem.left = this.left;
l.focusItem.clip.width = l.clip.width;
l.focusItem.clip.height = l.clip.height;
l.Menu.hideChildMenu(l);
} else if (l.style && l.Menu) {
if (a) {

if(typeof(CustomMenu)=="function")
{
		CustomMenu(a);
}
else
{		
	a.style.backgroundColor = a.saveColor;
}	

if (a.hilite) a.hilite.style.visibility = "hidden";
if (a.hiliteShim) a.hiliteShim.style.visibility = "inherit";
if (a.Menu.bgImageUp) a.style.background = "url(" + a.Menu.bgImageUp +")";;
} 

l.style.backgroundColor = l.menuHiliteBgColor;

l.zIndex = 1;
if (l.Menu.bgImageOver) l.style.background = "url(" + l.Menu.bgImageOver +")";
if (l.hilite) {
l.hilite.style.visibility = "inherit";
if( l.hiliteShim ) l.hiliteShim.style.visibility = "visible";
}
l.focusItem.style.pixelTop = l.style.pixelTop;
l.focusItem.style.top = l.focusItem.style.pixelTop + 'px';
l.focusItem.style.pixelLeft = l.style.pixelLeft;
l.focusItem.style.left = l.focusItem.style.pixelLeft + 'px';
l.focusItem.style.zIndex = l.zIndex +1;
l.Menu.hideChildMenu(l);
} else return;
window.ActiveMenuItem = l;
}

function onMenuItemAction(e, l) {
l = window.ActiveMenuItem;
if (!l) return;
hideActiveMenus();
if (l.mmaction) eval("" + l.mmaction);
window.ActiveMenuItem = 0;
}

function MM_clearTimeout() {
if (mmHideMenuTimer) clearTimeout(mmHideMenuTimer);
mmHideMenuTimer = null;
mmDHFlag = false;
}

function MM_startTimeout() {
if( window.ActiveMenu ) {
mmStart = new Date();
mmDHFlag = true;
mmHideMenuTimer = setTimeout("mmDoHide()", window.ActiveMenu.Menu.hideTimeout);
}
}

function mmDoHide() {
if (!mmDHFlag || !window.ActiveMenu) return;
var elapsed = new Date() - mmStart;
var timeout = window.ActiveMenu.Menu.hideTimeout;
if (elapsed < timeout) {
mmHideMenuTimer = setTimeout("mmDoHide()", timeout+100-elapsed);
return;
}
mmDHFlag = false;
hideActiveMenus();
window.ActiveMenuItem = 0;
}

function MM_showMenu(menu, x, y, child, imgname) {


if (!window.mmWroteMenu) return;


MM_clearTimeout();
if (menu) {
var obj = FIND(imgname) || document.images[imgname] || document.links[imgname] || document.anchors[imgname];
x = moveXbySlicePos (x, obj);
y = moveYbySlicePos (y, obj);
}
if (document.layers) {
if (menu) {
var l = menu.menuLayer || menu;
l.top = l.left = 1;
hideActiveMenus();
if (this.visibility) l = this;
window.ActiveMenu = l;
} else {
var l = child;
}
if (!l) return;
for (var i=0; i<l.layers.length; i++) { 			   
if (!l.layers[i].isHilite) l.layers[i].visibility = "inherit";
if (l.layers[i].document.layers.length > 0) MM_showMenu(null, "relative", "relative", l.layers[i]);
}
if (l.parentLayer) {
if (x != "relative") l.parentLayer.left = x || window.pageX || 0;
if (l.parentLayer.left + l.clip.width > window.innerWidth) l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
if (y != "relative") l.parentLayer.top = y || window.pageY || 0;
if (l.parentLayer.isContainer) {
l.Menu.xOffset = window.pageXOffset;
l.Menu.yOffset = window.pageYOffset;
l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
if (l.parentLayer.menuContainerBgColor && l.Menu.menuBgOpaque ) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
}
}
l.visibility = "inherit";
if (l.Menu) l.Menu.container.visibility = "inherit";
} else if (FIND("menuItem0")) {
var l = menu.menuLayer || menu;	
hideActiveMenus();
if (typeof(l) == "string") l = FIND(l);
window.ActiveMenu = l;
var s = l.style;
s.visibility = "inherit";
if (x != "relative") {
s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
s.left = s.pixelLeft + 'px';
}
if (y != "relative") {
s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
s.top = s.pixelTop + 'px';
}
l.Menu.xOffset = document.body.scrollLeft;
l.Menu.yOffset = document.body.scrollTop;
}
if (menu) window.activeMenus[window.activeMenus.length] = l;
MM_clearTimeout();
}

function onMenuItemDown(e, l) {
var a = window.ActiveMenuItem;
if (document.layers && a) {
a.eX = e.pageX;
a.eY = e.pageY;
a.clicked = true;
}
}

function mouseupMenu(e) {
hideMenu(true, e);
hideActiveMenus();
return true;
}

function getExplorerVersion() {
var ieVers = parseFloat(navigator.appVersion);
if( navigator.appName != 'Microsoft Internet Explorer' ) return ieVers;
var tempVers = navigator.appVersion;
var i = tempVers.indexOf( 'MSIE ' );
if( i >= 0 ) {
tempVers = tempVers.substring( i+5 );
ieVers = parseFloat( tempVers ); 
}
return ieVers;
}

function mouseoutMenu() {
if ((navigator.appName == "Microsoft Internet Explorer") && (getExplorerVersion() < 4.5))
return true;
hideMenu(false, false);
return true;
}

function hideMenu(mouseup, e) {
var a = window.ActiveMenuItem;
if (a && document.layers) {
a.document.bgColor = a.saveColor;
a.focusItem.top = -30;
if (a.hilite) a.hilite.visibility = "hidden";
if (mouseup && a.mmaction && a.clicked && window.ActiveMenu) {
if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 500);
}
}
a.clicked = false;
if (a.Menu.bgImageOver) a.background.src = a.Menu.bgImageUp;
} else if (window.ActiveMenu && FIND("menuItem0")) {
if (a) {
a.style.backgroundColor = a.saveColor;
if (a.hilite) a.hilite.style.visibility = "hidden";
if (a.hiliteShim) a.hiliteShim.style.visibility = "inherit";
if (a.Menu.bgImageUp) a.style.background = "url(" + a.Menu.bgImageUp +")";
}
}
if (!mouseup && window.ActiveMenu) {
if (window.ActiveMenu.Menu) {
if (window.ActiveMenu.Menu.hideOnMouseOut) MM_startTimeout();
return(true);
}
}
return(true);
}

function hideChildMenu(hcmLayer) {
MM_clearTimeout();
var l = hcmLayer;
for (var i=0; i < l.Menu.childMenus.length; i++) {
var theLayer = l.Menu.childMenus[i];
if (document.layers) theLayer.visibility = "hidden";
else {
theLayer = FIND(theLayer);
theLayer.style.visibility = "hidden";
if( theLayer.Menu.menuItemHAlign != 'left' ) {
for(var j = 0; j < theLayer.Menu.menuItemLayers.length; j++) {
var itemLayer = theLayer.Menu.menuItemLayers[j];
if(itemLayer.textShim) itemLayer.textShim.style.visibility = "inherit";
}
}
}
theLayer.Menu.hideChildMenu(theLayer);
}
if (l.childMenu) {
var childMenu = l.childMenu;
if (document.layers) {
l.Menu.MM_showMenu(null,null,null,childMenu.layers[0]);
childMenu.zIndex = l.parentLayer.zIndex +1;
childMenu.top = l.Menu.menuLayer.top + l.Menu.submenuYOffset;
if( l.Menu.vertical ) {
if( l.Menu.submenuRelativeToItem ) childMenu.top += l.top + l.parentLayer.top;
childMenu.left = l.parentLayer.left + l.parentLayer.clip.width - (2*l.Menu.menuBorder) + l.Menu.menuLayer.left + l.Menu.submenuXOffset;
} else {
childMenu.top += l.top + l.parentLayer.top;	
if( l.Menu.submenuRelativeToItem ) childMenu.left = l.Menu.menuLayer.left + l.left + l.clip.width + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
else childMenu.left = l.parentLayer.left + l.parentLayer.clip.width - (2*l.Menu.menuBorder) + l.Menu.menuLayer.left + l.Menu.submenuXOffset;
}
if( childMenu.left < l.Menu.container.clip.left ) l.Menu.container.clip.left = childMenu.left;
var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
if (w > l.Menu.container.clip.width)  l.Menu.container.clip.width = w;
var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
l.document.layers[1].zIndex = 0;
childMenu.visibility = "inherit";
} else if (FIND("menuItem0")) {
childMenu = FIND(l.childMenu);
var menuLayer = FIND(l.Menu.menuLayer);
var s = childMenu.style;
s.zIndex = menuLayer.style.zIndex+1;
if (document.all || window.mmIsOpera) {
s.pixelTop = menuLayer.style.pixelTop + l.Menu.submenuYOffset;
if( l.Menu.vertical ) {
if( l.Menu.submenuRelativeToItem ) s.pixelTop += l.style.pixelTop;
s.pixelLeft = l.style.pixelWidth + menuLayer.style.pixelLeft + l.Menu.submenuXOffset;
s.left = s.pixelLeft + 'px';
} else {
s.pixelTop += l.style.pixelTop;
if( l.Menu.submenuRelativeToItem ) s.pixelLeft = menuLayer.style.pixelLeft + l.style.pixelLeft + l.style.pixelWidth + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
else s.pixelLeft = (menuLayer.style.pixelWidth-4*l.Menu.menuBorder) + menuLayer.style.pixelLeft + l.Menu.submenuXOffset;
s.left = s.pixelLeft + 'px';
}
} else {
var top = parseInt(menuLayer.style.top) + l.Menu.submenuYOffset;
var left = 0;
if( l.Menu.vertical ) {
if( l.Menu.submenuRelativeToItem ) top += parseInt(l.style.top);
left = (parseInt(menuLayer.style.width)-4*l.Menu.menuBorder) + parseInt(menuLayer.style.left) + l.Menu.submenuXOffset;
} else {
top += parseInt(l.style.top);
if( l.Menu.submenuRelativeToItem ) left = parseInt(menuLayer.style.left) + parseInt(l.style.left) + parseInt(l.style.width) + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
else left = (parseInt(menuLayer.style.width)-4*l.Menu.menuBorder) + parseInt(menuLayer.style.left) + l.Menu.submenuXOffset;
}
s.top = top + 'px';
s.left = left + 'px';
}
childMenu.style.visibility = "inherit";
} else return;
window.activeMenus[window.activeMenus.length] = childMenu;
}
}

function hideActiveMenus() {
	
	
if (!window.activeMenus) return;
for (var i=0; i < window.activeMenus.length; i++) {
if (!activeMenus[i]) continue;
if (activeMenus[i].visibility && activeMenus[i].Menu && !window.mmIsOpera) {
activeMenus[i].visibility = "hidden";
activeMenus[i].Menu.container.visibility = "hidden";
activeMenus[i].Menu.container.clip.left = 0;
} else if (activeMenus[i].style) {
var s = activeMenus[i].style;
s.visibility = "hidden";
s.left = '-200px';
s.top = '-200px';
}
}
if (window.ActiveMenuItem) hideMenu(false, false);
window.activeMenus.length = 0;
}

function moveXbySlicePos (x, img) { 
if (!document.layers) {
var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
var par = img;
var lastOffset = 0;
while(par){
if( par.leftMargin && ! onWindows ) x += parseInt(par.leftMargin);
if( (par.offsetLeft != lastOffset) && par.offsetLeft ) x += parseInt(par.offsetLeft);
if( par.offsetLeft != 0 ) lastOffset = par.offsetLeft;
par = macIE45 ? par.parentElement : par.offsetParent;
}
} else if (img.x) x += img.x;
return x;
}

function moveYbySlicePos (y, img) {
if(!document.layers) {
var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
var par = img;
var lastOffset = 0;
while(par){
if( par.topMargin && !onWindows ) y += parseInt(par.topMargin);
if( (par.offsetTop != lastOffset) && par.offsetTop ) y += parseInt(par.offsetTop);
if( par.offsetTop != 0 ) lastOffset = par.offsetTop;
par = macIE45 ? par.parentElement : par.offsetParent;
}		
} else if (img.y >= 0) y += img.y;
return y;
}


function GetWidth(menu)
{
	var i_width=0;
	if(menu.label.search("root")>0)
	{
		l_width=menu.menuWidth;
	}
	else
	{
		l_width=menu.menuChildWidth;
	}
	return l_width;
}
//fclr, fhclr, bg, bgh
//"#ffffff\",\"#ffffff\",\"#2F3540\",\"#999999\"

function AutoKeyHeight()
{
	return "22";
}

function AutoKeyWidth()
{
	return "92";
}

function MenuChild(menuobj)
{
	menuobj.hideOnMouseOut=true;
	menuobj.bgColor="#ABABAB";//'#555555';
	menuobj.menuBorder=0;
	menuobj.menuLiteBgColor='#FFFFFF';
	menuobj.menuBorderBgColor='#777777';
	menuobj.ChildBorderBgColor='#777777';
	
}

function Menu(label,pad, space, to, sx, sy, srel, opq, vert, idt, aw, ah,acw)  
{
	this.version = "020320 [Menu; mm_menu.js]";
	this.type = "Menu";
	this.menuWidth =155;// mw;
	this.menuChildWidth =acw;// mw;
	this.menuItemHeight =22 ;//mh;
	this.fontSize =12;// fs;
	this.fontWeight = "plain";
	this.fontFamily ="宋体";// fnt; 
	this.fontColor ="#313131";// fclr;
	this.fontColorHilite ="#313131";// fhclr;
	this.menuItemBgColor ="#D4CADC";// bg;
	this.menuHiliteBgColor ="#BAA4CC";// bgh;
	this.bgColor = "#F5E7FE"; //#555555;
	this.menuBorder = 1;
	this.menuBgOpaque=opq;
	this.menuItemBorder = 1;
	this.menuItemIndent = idt;
			
	this.menuItemVAlign = "middle";// valgn;
	this.menuItemHAlign = "left";//halgn;
	this.menuItemPadding = pad;
	this.menuItemSpacing = space;
	this.menuLiteBgColor = "#ffffff";
	this.menuBorderBgColor = "#777777";
		
	this.menuContainerBgColor = "#cccccc";
	this.childMenuIcon = "arrows.gif";
	this.submenuXOffset = sx;
	this.submenuYOffset = sy;
	this.submenuRelativeToItem = srel;
	this.vertical = vert;
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();
	this.hideOnMouseOut = true;
	this.hideTimeout = to;
	this.addMenuItem = addMenuItem;
	this.writeMenus = writeMenus;
	this.MM_showMenu = MM_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;
	if (!window.menus) window.menus = new Array();
	this.label = " " + label;
	window.menus[this.label] = this;
	window.menus[window.menus.length] = this;
	if (!window.activeMenus) window.activeMenus = new Array();
}

function RunJavascript()
{
	
	ShowToTop();
} 


function ShowToTop()
{//显示是否返回页首的链接
	var sh = document.body.scrollHeight || document.documentElement.scrollHeight;
	
	if(sh>1000)
	{
		$('divtotop').style.display="";
	}
	else
	{
		$('divtotop').style.display="none";
	}
} 

function SelectInfoDiv(i_sel)
{
	for(i=1;i<4;i++)
	{
		$('divicon'+i).className="nodsp";
		$('lit'+i).className="";
		
	}
	$('divicon'+i_sel).className="";
	$('lit'+i_sel).className="current";
}



function ShowClassBar(i_id)
{
	var evt = window.event || arguments.callee.caller.arguments[0]; // 获取event对象
  var srcElement = evt.srcElement || evt.target;  // 获取触发事件的源对象
  
		if($('ul'+i_id).className=="")
		{
			$('ul'+i_id).className="nodsp";
			srcElement.src=srcElement.src.replace("minus","plus");
		}
		else
		{
			$('ul'+i_id).className="";
			srcElement.src=srcElement.src.replace("plus","minus")	;
		}
}

function OpenService(i_sel)
{
	var s_source="";
	if(i_sel==1)
	{
		s_source=location.href;
		window.open('/user/chat/default.aspx?sel=1&rnd='+Math.random()+'&source='+s_source,'_blank','scrollbars=no,width=510,height=480,left='+(screen.width-510)/2+',top='+(screen.height-480)/2+',status=no,resizable=yes')
	}
	else
	{
		popup_open("/user/chat/default.aspx?rnd="+Math.random()+"&source="+s_source,"在线客服咨询中心",510,465);	
	}
	
	
}

function setNavBar(s_id)
{
	alert(s_id);
	if($("top"+s_id)!=null)
		$("top"+s_id).className ="bg";
		
		
}

		function mmLoadMenus() 
		{
			if (window.mm_menu_0103171238_0) return;
			mm_menu_0.writeMenus();
		}
		
var JSBalloonPath="/images/page/"; 
var showHide;
var ie = document.all ? true:false  	
function JSBalloon()
{
var tmrBalloonPopup;	
var  blbWidth=320; //200  2007-8-10
var titleFontStyle='font-weight: bold; font-size:12px;padding-left:5px;';
var messageFontStyle=' font-size:12px\;padding:5px 5px;text-align:left;';
var footerFontStyle=' font-size:12px\;';
var transShow=true;
var transHide=true;
var transShowFilter='progid:DXImageTransform.Microsoft.Fade(Overlap=0.200)';
var transHideFilter='progid:DXImageTransform.Microsoft.Fade(Overlap=0.20)';
var autoHide=true;
var autoHideInterval=1000; // 4 sec
var autoAway=true;
var showCloseBox=false;
if(JSBalloon.arguments.length>0)
{
var oArg=JSBalloon.arguments[0];
if(oArg.width!=null)
{ blbWidth=oArg.width;}
if(oArg.titleFontStyle!=null)
{ titleFontStyle=oArg.titleFontStyle;}
if(oArg.messageFontStyle!=null)
{ messageFontStyle=oArg.messageFontStyle;}
if(oArg.footerFontStyle!=null)
{ footerFontStyle=oArg.footerFontStyle; }
if(oArg.transShow!=null)
{ transShow=oArg.transShow; }
if(oArg.transHide!=null)
{ transHide=oArg.transHide; }
if(oArg.transShowFilter!=null)
{ transShowFilter=oArg.transShowFilter; }
if(oArg.transHideFilter!=null)
{ transHideFilter=oArg.transHideFilter; }
if(oArg.autoHide!=null)
{ autoHide=oArg.autoHide; }
if(oArg.autoHideInterval!=null)
{ autoHideInterval=oArg.autoHideInterval; }
if(oArg.autoHideInterval!=null)
{ autoHideInterval=oArg.autoHideInterval; }
if(oArg.autoAway!=null)
{ autoAway=oArg.autoAway;}
if(oArg.showCloseBox!=null)
{ showCloseBox=oArg.showCloseBox; }
}
this.titleFontStyle=titleFontStyle;
this.messageFontStyle=messageFontStyle;
this.footerFontStyle=footerFontStyle;
this.transShowFilter=transShowFilter;
this.transHideFilter=transHideFilter;
this.transShow=transShow;
this.transHide=transHide;
this.autoHide=autoHide;
this.autoHideInterval=autoHideInterval;
this.autoHideInterval=autoHideInterval;
this.autoAway=autoAway;
this.width=blbWidth;
this.showCloseBox=showCloseBox;
var childID;

var balloonDIV = document.createElement("DIV");
balloonDIV.style.width=String(blbWidth)+"px";;
balloonDIV.style.position="absolute";
balloonDIV.style.visibility="hidden";
balloonDIV.style.filter=transShowFilter+' '+transHideFilter;
balloonDIV.style.zIndex=2001;
this.balloon=balloonDIV;
this.Show=Show;
this.Hide=Hide;
function  LeaveAnchor()
{
showHide = false;		
if(autoHide)
{		   
clearTimeout(tmrBalloonPopup);

tmrBalloonPopup=setTimeout(Hide, autoHideInterval);
}	
}
function Show()
{
var title;
var message='';
var icon='';
var footer='';
var btop=0, bleft=0;
var atop=0, aleft=0;
var anchor;
var direction='SE';

blbWidth=String(this.width);
titleFontStyle=this.titleFontStyle;
messageFontStyle=this.messageFontStyle;
footerFontStyle=this.footerFontStyle;
transShowFilter=this.transShowFilter;
transHideFilter=this.transHideFilter;
transShow=this.transShow;
transHide=this.transHide;
autoHide=this.autoHide;
autoHideInterval=this.autoHideInterval;
autoAway=this.autoAway;
if(Show.arguments.length>0)
{
var oArg=Show.arguments[0];

if(oArg.title!=null)
{ title=oArg.title; }

if(oArg.message!=null)
{ message=oArg.message;}

if(oArg.icon!=null)
{
icon=oArg.icon;

switch(icon)
{
	case 'Exclaim':
icon = JSBalloonPath+'exclaim.ico';
SoundFx = 'Exclaim';
break;

	case 'Stop':
icon = JSBalloonPath+'stop.ico';
SoundFx = 'Stop';
break;

	case 'Info':
icon = JSBalloonPath+'info.ico';
SoundFx = 'Info';
break;
	
	case 'Help':
icon = JSBalloonPath+'help.ico';
SoundFx = 'Info';
break;

	default:
SoundFx = 'Info';
}
}
if(oArg.footer!=null)
{ footer=oArg.footer; }

if(oArg.top!=null)
{ btop=oArg.top; }

if(oArg.left!=null)
{ bleft=oArg.left; }

if(oArg.anchor!=null)
{
anchor=oArg.anchor;
atop=getTop(anchor);
aleft=getLeft(anchor);
}
}	
var ret=balloonInfrastructure(balloonBody(	title, 
	icon, 
	message, 
	footer, 
	this.titleFontStyle,
	this.messageFontStyle,
	this.footerFontStyle,
	this.showCloseBox), direction);

balloonDIV.innerHTML=ret;
var btnClose=GetImgObj(balloonDIV);
btnClose.onclick=Hide1;

if(typeof(childID)!='object')
{ childID=document.body.appendChild(balloonDIV); }

var ttop=document.documentElement.scrollTop;
var tleft=document.documentElement.scrollLeft;

balloonDIV.style.left =Wa(ShowObj,"offsetLeft")+tleft+"px";
balloonDIV.style.top = (Wa(ShowObj,"offsetTop")+ttop-balloonDIV.offsetHeight)+"px";		

var bAdjustedLeft=parseInt(balloonDIV.style.left, 10);
var showSE;
if(document.body.offsetWidth < (bAdjustedLeft+balloonDIV.offsetWidth+20))
{		
direction='SW';

ret=balloonInfrastructure(balloonBody(	title, 
	icon, 
	message, 
	footer, 
	this.titleFontStyle,
	this.messageFontStyle,
	this.footerFontStyle,
	this.showCloseBox), direction);
balloonDIV.innerHTML=ret;
balloonDIV.style.left =(bAdjustedLeft-balloonDIV.offsetWidth+20)+"px";

showSE=false;
}
else
{
direction='SE';
showSE=true;
} 
if(parseInt(balloonDIV.style.top, 10)<0)
{
if(showSE)
{
direction='NE';
ret=balloonInfrastructure(balloonBody(	title, 
	icon, 
	message, 
	footer, 
	this.titleFontStyle,
	this.messageFontStyle,
	this.footerFontStyle,
	this.showCloseBox), direction);
balloonDIV.innerHTML=ret;
}
else
{
direction='NW';
ret=balloonInfrastructure(balloonBody(	title, 
	icon, 
	message, 
	footer, 
	this.titleFontStyle,
	this.messageFontStyle,
	this.footerFontStyle,
	this.showCloseBox), direction);
balloonDIV.innerHTML=ret;
}
balloonDIV.style.top = (parseInt(balloonDIV.style.top, 10)+balloonDIV.offsetHeight)+"px";
if(anchor!=null)
{ balloonDIV.style.top = (parseInt(balloonDIV.style.top, 10)+anchor.offsetHeight)+"px";}
}			
if(this.showCloseBox)
{
if(direction=='SE' || direction=='SW')
{ btnClose=GetImgObj(balloonDIV);}
else
{ btnClose=GetImgObj(balloonDIV); }
btnClose.onclick=Hide1;
}
if(ie)
{
var scrollOffsets=ScrollOffsets(anchor);
     balloonDIV.style.top=parseInt(balloonDIV.style.top, 10)-scrollOffsets[0]+"px";;
     balloonDIV.style.left=parseInt(balloonDIV.style.left, 10)-scrollOffsets[1]+"px";;
     balloonDIV.style.top=parseInt(balloonDIV.style.top, 10) + parseInt(document.body.scrollTop, 10)+"px";;
     balloonDIV.style.left=parseInt(balloonDIV.style.left, 10) + parseInt(document.body.scrollLeft, 10)+"px";;
  }
  else
  {
     var scrollOffsets=ScrollOffsets(anchor);
balloonDIV.style.top=parseInt(balloonDIV.style.top, 10)-scrollOffsets[0]+"px";;
balloonDIV.style.left=parseInt(balloonDIV.style.left, 10)-scrollOffsets[1]+"px";;
  }
SuppressSelects();

if(ie&&this.transShow)
{
balloonDIV.style.filter=this.transShowFilter+' '+this.transHideFilter;			
if(balloonDIV.filters(0).status==2 || balloonDIV.filters(0).status==1)
{ balloonDIV.filters(0).Stop();}
balloonDIV.filters(0).Apply();
balloonDIV.style.visibility='visible';
balloonDIV.filters(0).Play();
}
else
{ balloonDIV.style.visibility='visible'; }
	

if(this.autoHide)
{
clearTimeout(this.tmrBalloonPopup);
transHide=this.transHide;
this.tmrBalloonPopup=setTimeout(this.Hide, this.autoHideInterval);
}
if(this.autoAway)
{ balloonDIV.onmouseover=Hide; }
else
{
balloonDIV.onmouseover=ShowAutoHide;  
balloonDIV.onmouseleave=HideAutoHide; 
}

  showHide = true; 
  if(anchor != null)
  {      anchor.onmouseout = LeaveAnchor;   } 
}	

function   ShowAutoHide()
{
balloonDIV.style.visibility=='visible';
showHide = true;
}

function   HideAutoHide()
{
showHide = false;	   
Hide();
}

function GetImgObj(divobj)
{
	var o_img;
	var y=divobj.getElementsByTagName("IMG");
	for(i=0;i<y.length;i++)
	{
		if(y[i].src.search("close.jpg")!=-1)
		{
			return y[i];
			break;
		}
	}
	
}

function Hide1()
{  
if(balloonDIV.style.visibility=='hidden')
{ return;}
if(ie&&transHide)
{
if(balloonDIV.filters(1).status==2 || balloonDIV.filters(1).status==1)
{
balloonDIV.filters(1).Stop();
}
balloonDIV.filters(1).Apply();
balloonDIV.style.visibility='hidden';
balloonDIV.filters(1).Play();
}
else
{
balloonDIV.style.visibility='hidden';
}	
RestoreSelects();		
}
function Hide()
{   
if(showHide)
{
  return;	   
}
else
{	   
if(balloonDIV.style.visibility=='hidden')
{
return;
}
if(ie&&transHide)
{		   
if(balloonDIV.filters(1).status==2 || balloonDIV.filters(1).status==1)
{
balloonDIV.filters(1).Stop();
}
balloonDIV.filters(1).Apply();
balloonDIV.style.visibility='hidden';
balloonDIV.filters(1).Play();
}
else
{		    
balloonDIV.style.visibility='hidden';
}	
RestoreSelects();
}
}
// Private
function SuppressSelects()
{
var selObjects=document.getElementsByTagName("SELECT");
for(var i=0;i<selObjects.length;i++)
{	
if(selObjects[i].balloonMember!='true')
{
if(selObjects[i].style.visibility=='visible' || selObjects[i].style.visibility=='')
{
	if(ObjectOverlap(balloonDIV, selObjects[i]))
	{
selObjects[i].style.visibility='hidden';

selObjects[i].baloonHidden=true;
	}
}
}
}
}
function RestoreSelects()
{
var selObjects=document.getElementsByTagName("SELECT");
for(var i=0;i<selObjects.length;i++)
{	
if(selObjects[i].baloonHidden)
{
selObjects[i].style.visibility='visible';

selObjects[i].baloonHidden=false;
}
}
}
function ObjectOverlap(obj1, obj2)
{
var obj1TopX = getLeft(obj1);
var obj1TopY = getTop(obj1);
var obj1BottomX = getLeft(obj1)+obj1.offsetWidth;
var obj1BottomY = getTop(obj1)+obj1.offsetHeight;
var obj2TopX = getLeft(obj2);
var obj2TopY = getTop(obj2);
var obj2BottomX = getLeft(obj2)+obj2.offsetWidth;
var obj2BottomY = getTop(obj2)+obj2.offsetHeight;
var overlapOnX = (obj1TopX < obj2BottomX && obj2TopX < obj1BottomX);
var overlapOnY = (obj1TopY < obj2BottomY && obj2TopY < obj1BottomY);
return (overlapOnX && overlapOnY);
}

function getObjLeft(anObject) 
{ return(anObject.offsetParent ? (getObjLeft(anObject.offsetParent) + anObject.offsetLeft) : anObject.offsetLeft); }
function getObjTop(anObject) 
{ return(anObject.offsetParent ? (getObjTop(anObject.offsetParent) + anObject.offsetTop) : anObject.offsetTop);  }

function getLeft(anObject) 
{ return(getObjLeft(anObject)); }
function getTop(anObject) 
{ return(getObjTop(anObject)); }
function ScrollOffsets(anchor)
{
var aryScrolls = new Array(0,0);
try
{
var parentElem=anchor.parentElement;
while(parentElem!=null)
{
if(parentElem.scrollTop!=null)
{
	aryScrolls[0]+=parseInt(parentElem.scrollTop, 10);
	aryScrolls[1]+=parseInt(parentElem.scrollLeft, 10);
}
parentElem=parentElem.parentElement;
}
}
catch(ex)
{

}
return aryScrolls;
}

function balloonInfrastructure(body, direction)
{
var ret;
switch(direction)
{
case 'SE':

ret ='<table class="JSBalloon" border="0" borderColor="#9BC5EA" cellpadding="0" cellspacing="0" style="border-collapse: collapse" >'+
'<tr>'+
'<td>'+
'<img border="0" src="'+JSBalloonPath+'cLeftTop.gif" width="8" height="8"></td>'+
'<td  width="1024"  bgColor="#ffffff" colspan="4" style="BORDER-TOP: #9BC5EA 1px solid"></td>'+  //width=100%  width=70% 2007-8-8
'<td>'+
'<img border="0" src="'+JSBalloonPath+'cRightTop.gif" width="8" height="8"></td>'+
'</tr>'+
'<tr>'+
'<td valign="top" colspan="5" style="BORDER-LEFT: #9BC5EA 1px solid; BACKGROUND-COLOR: #ffffff">'+
	body +
'</td>'+
'<td  width="8" vAlign="top" background="'+JSBalloonPath+'cLeftbg.gif"  >&nbsp;</td>'+ 
'</tr>'+
'<tr>'+
'<td><IMG height="8" src="'+JSBalloonPath+'cLeftBottom.gif" width="8" border=0></td>'+
'<td height="8" background="'+JSBalloonPath+'cBottombg.gif"></td>'+
'<td >'+
'<img src="'+JSBalloonPath+'aSouthEast-1.gif" width="67" height="8"></td>'+
'<td  width="1024" background="'+JSBalloonPath+'cBottombg.gif" ></td>'+  //width=100%  width=70% 2007-8-8
'<td width="70" background="'+JSBalloonPath+'cBottombg.gif"></td>'+
'<td width="8" ><IMG height=8 src="'+JSBalloonPath+'cRightBottom.gif" width=8 border=0></td>'+
'</tr>'+
'<TR>'+ 
'<TD  height="8">&nbsp;</TD>'+
'<TD></TD>'+
'<TD><img src="'+JSBalloonPath+'aSouthEast.gif" width="67" height="18"></TD>'+
'<TD></TD>'+
'<TD></TD>'+
'<TD>&nbsp;</TD>'+
'</TR>'+
'</table>'	
	break;
case 'SW':	
// South West
ret ='<table class="JSBalloon" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" >'+
'<TR>'+
'<TD></TD>'+
'<TD colspan="4" style="BORDER-BOTTOM: #9BC5EA 1px solid"></TD>'+
'<TD></TD>'+
'</TR>'+
'<TR>'+
'<TD><IMG height="8" src="'+JSBalloonPath+'cLeftTop.gif" width="8 border="0"></TD>'+
'<TD width="1024" bgColor="#ffffff" colSpan="4"></TD>'+  //2007-8-10   width="80%"
'<TD><IMG height="8" src="'+JSBalloonPath+'cRightTop.gif" width="8" border="0"></TD>'+
'</TR>'+
'<TR>'+
'<TD colSpan="5" vAlign="top" style="BORDER-LEFT: #9BC5EA 1px solid; BACKGROUND-COLOR: #ffffff">'+
              body +
'</TD>'+
'<TD width="8" vAlign="top" background="'+JSBalloonPath+'cLeftbg.gif">&nbsp;</TD>'+
'</TR>'+
'<TR>'+
'<TD><IMG height=8 src="'+JSBalloonPath+'cLeftBottom.gif" width="8" border="0"></TD>'+
'<TD height=8 background="'+JSBalloonPath+'cBottombg.gif"></TD>'+
'<TD width="70" background="'+JSBalloonPath+'cBottombg.gif" height=8></TD>'+
'<TD width="1024" background="'+JSBalloonPath+'cBottombg.gif" height=8></TD>'+  //2007-8-10  width="80%"
'<TD valign="top"><img src="'+JSBalloonPath+'aSouthWest-1.gif" width="67" height="8"></TD>'+
'<TD><IMG height="8" src="'+JSBalloonPath+'cRightBottom.gif" width="8" border="0"></TD>'+
'</TR>'+
'<TR>'+
'<TD>&nbsp;</TD>'+
'<TD height="8"></TD>'+
'<TD height="8">&nbsp;</TD>'+
'<TD height="8"></TD>'+
'<TD height="8"><img src="'+JSBalloonPath+'aSouthWest.gif" width="67" height="18"></TD>'+
'<TD height="8">&nbsp;</TD>'+
'</TR>'+
'</table>'
	break;
	
case 'NE':	
	// North East
	ret ='<table class="JSBalloon" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#9BC5EA" id="AutoNumber1" >'+
'<tr>'+
'<td></td>'+
'<td style="BORDER-BOTTOM: #9BC5EA 1px solid"></td>'+
'<td  height="18" valign="bottom">'+
'<img border="0" src="'+JSBalloonPath+'aNorthEast.gif" width="67" height="18"></td>'+
'<td width="1024" style="BORDER-BOTTOM: #9BC5EA 1px solid"></td>'+  //width=100%  width=80%  2007-8-8
'<td width="70" style="BORDER-BOTTOM: #9BC5EA 1px solid"></td>'+  // width="70" 
'<td ></td>'+
'</tr>'+
'<tr>'+
'<td>'+
'<img border="0" src="'+JSBalloonPath+'cLeftTop.gif" width="8" height="8"></td>'+
'<td   width="1024" colspan="4" bgcolor="#FFFFFF"></td>'+  //width=100%  width=80% 2007-8-8
'<td >'+
'<img border="0" src="'+JSBalloonPath+'cRightTop.gif" width="8" height="8"></td>'+
'</tr>'+
'<tr >'+
'<td valign="top" colspan="5"  style="BORDER-LEFT: #9BC5EA 1px solid; BACKGROUND-COLOR: #ffffff">'+
	body +
'</td>'+ 
'<td width="8" vAlign="top" background="'+JSBalloonPath+'cLeftbg.gif" >&nbsp;</td>'+ 
'</tr>'+
'<tr>'+
'<td>'+
'<img border="0" src="'+JSBalloonPath+'cLeftBottom.gif" width="8" height="8"></td>'+
'<td height="8" background="'+JSBalloonPath+'cBottombg.gif" colspan="4"  ></td>'+  
'<td width="8" height="8">'+
'<img border="0" src="'+JSBalloonPath+'cRightBottom.gif" width="8" height="8"></td>'+
'</tr>'+
'</table>'
	break;
	
case 'NW':	
	// North West			
	ret ='<table class="JSBalloon" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#9BC5EA" id="AutoNumber1" >'+
'<tr>'+
'<td></td>'+
'<td style="BORDER-BOTTOM: #9BC5EA 1px solid"></td>'+
'<td  width="70" style="BORDER-BOTTOM: #9BC5EA 1PX solid">&nbsp;'+   
'</td>'+
'<td  width="1024"  style="BORDER-BOTTOM: #9BC5EA 1px solid" >'+  //width=100%  width=80% 2007-8-8
'</td>'+
'<td  vAlign="bottom"><img src="'+JSBalloonPath+'aNorthWest.gif" width="67" height="18"></td>'+
'<td></td>'+
'</tr>'+
'<tr>'+
'<td>'+
'<img height="8" src="'+JSBalloonPath+'cLeftTop.gif" width="8" border="0"></td>'+
'<td width="1024" bgColor="#ffffff" colSpan="4"></td>'+  //2007-8-10  width="80%"
'<td>'+
'<img  height=8 src="'+JSBalloonPath+'cRightTop.gif" width=8 border=0></td>'+
'</tr>'+
'<tr>'+
'<td valign=top colspan="5"  style="BORDER-LEFT: #9BC5EA 1px solid; BACKGROUND-COLOR: #ffffff">'+
	body +
'</td>'+
'<td width="8" vAlign=top background="'+JSBalloonPath+'cLeftbg.gif">&nbsp;</td>'+
'</tr>'+
'<tr>'+
'<td>'+
'<img height="8" src="'+JSBalloonPath+'cLeftBottom.gif" width="8" border="0"></td>'+
'<td height="8" colSpan="4" background="'+JSBalloonPath+'cBottombg.gif"></td>'+
'<td width="8" height="8">'+
'<img  height="8" src="'+JSBalloonPath+'cRightBottom.gif" width="8" border="0"></td>'+
'</tr>'+
'</table>'
	break;
}

return ret;
}
function balloonBody(title, icon, body, footer, titleFontStyle, 
messageFontStyle, footerFontStyle,
showCloseBox)
{
var imgShow='none';
var iconTitle='';
var ballonBody=body;
var imgClose='none';
var headerVisible='block';
var offsetParent="-7";
if(title!=undefined)
{
iconTitle=title;
}
if(showCloseBox)
{
imgClose='block';
}
else
{
imgClose='none';
}
if(icon != '')
{
imgShow='block';
}
else
{
imgShow='none';
}
if(imgShow=='none' && imgClose=='none' && iconTitle=='')
{
headerVisible='none';
offsetParent="0";
}
else
{
headerVisible='block';
offsetParent="-7";
}
return '<table border="0" width="100%" cellpadding="3" cellspacing="0" style="cursor:default;border-collapse: collapse; position:relative; top: '+offsetParent+';left:3" >' +  //width="100%"
'<tr style="display:'+headerVisible+'">' + 
'<td id="BIcon" width="3%" align=left><img id=BIcon src="'+icon+'" style="display:'+imgShow+'"></td>' +   //width="3%"
'<td id="BTitle" width="90%" UNSELECTABLE="on"  style="'+titleFontStyle+'" align=left>'+iconTitle+'</td>' +  //width="90%"
'<td id="BClose" width="3%"  valign=top align=right><img id="imgclose" src="'+JSBalloonPath+'close.jpg" style="position:relative; top: 4;left:-5;display:'+imgClose+'" onmouseover="this.src=\''+JSBalloonPath+'closeActive.jpg\'" onmouseout="this.src=\''+JSBalloonPath+'close.jpg\'" onmouseup="this.src=\''+JSBalloonPath+'closeActive.jpg\'" onmousedown="this.src=\''+JSBalloonPath+'closeDown.jpg\'">&nbsp;</td>' +  //width="3%" 
'</tr>' + 
'<tr>' + 
'<td id="BBody" UNSELECTABLE="on"  style="'+messageFontStyle+'" width="100%" colspan="3">' + ballonBody +'</td>' + //width="100%"
'</tr>' + 
'       <tr>' + 
'<td id="BFooter" UNSELECTABLE="on" style="'+footerFontStyle+'" width="100%"  colspan="3">' + footer +'</td>' +  //width="100%"
'</tr>' + 
'</table>'
}
}

var ShowObj;
var bl=new JSBalloon();
function ShowTip(obj,txtTitle, txtmessage)
{	
	var reg=new RegExp("’","g");
	txtmessage=  txtmessage.replace(reg,"'");

	ShowObj	= obj;
	bl.autoHide=true; //false
	bl.autoHideInterval = 1000; // 2 secs
	bl.transShow=true; //true
	bl.autoAway=false; //false
	bl.showCloseBox=true;
	bl.Show({title:txtTitle,message:txtmessage,anchor:ShowObj, icon:'Info'});
}

var mask;
var targetLayer;
var s_popupframe="0";
function popup_open(url, title,width,height,top,left){

  s_popupframe="0";
	$('popup_title').innerHTML = title;
	$('popupFrame').src = url;
	$('divpop').style.width=(width+45)+"px";
	$('popupFrame').style.width=width+ 'px';
  $('popupFrame').style.height=height+ 'px';
	
	$('frepopup').style.display = '';
	$('frepopup').style.width=(width+45)+"px";
	$('frepopup').style.height=(height+90)+ 'px';
	
	
	targetLayer = 'divpop';
	$(targetLayer).style.display = '';
	
	if(typeof(top)!="undefined")
	{
		$(targetLayer).style.left=left+ 'px';
		$(targetLayer).style.top=top+ 'px';
		
		$('frepopup').style.left=left+ 'px';
		$('frepopup').style.top=(top+25)+ 'px';
	}	
	else
	{
		moveToCenter(top);
	}	
	
	if(typeof(OpenPopup)=="function")
	{
		OpenPopup();
		
	}
	
	if(typeof(ShowBackground)=="function")
	{
		ShowBackground();
	}
	
	//DisplaySelect(0);
	
}

function DisplaySelect(i_sel)
{
	var selsobj = document.getElementsByTagName("SELECT");
	for(i=0;i<selsobj.length;i++)
	{
		if(i_sel==0)
		{
			selsobj[i].style.visibility ="hidden";
		}
		else
		{
			selsobj[i].style.visibility ="visible";
		}
	}	
}

var o_select=new Array();
function popup_close()
{
	
	
	DisplaySelect(1);
	$(targetLayer).style.display = 'none';
	$('frepopup').style.display = 'none';
	if(mask)
		mask.parentNode.removeChild(mask);
		
	mask = null;
	
	if(s_popupframe=="0")
	{
		
		window.open("/common/noframe.html","popupFrame");
	}

	
	if(typeof(ClosePopup)=="function")
	{
		ClosePopup();
	}
	
	if(typeof(HideBackground)=="function")
	{
		HideBackground();
		
	}
}

function moveToCenter(i_top){
	var ttop=document.documentElement.scrollTop;
	if(typeof(i_top)=="undefined")
	{
			
		//居中
		if(document.documentElement.clientHeight>$('divpop').offsetHeight)
		{
			ttop+=(document.documentElement.clientHeight-$('divpop').offsetHeight)/2;
		}
		else
			{
				ttop+=0;
			}
	}	
	else
		ttop+=i_top;	
	
	var i_left=((document.body.clientWidth - $(targetLayer).clientWidth) /2) + 'px';
	
	$(targetLayer).style.left = i_left;
	$(targetLayer).style.top = ttop + 'px';
	
	$('frepopup').style.left = i_left;
	$('frepopup').style.top = (ttop+25) + 'px';
	
}

var cObj, sdX, sdY;
function initdrag(obj){
		if(arguments.length>1)
			try{event = arguments[1];}catch(e){}
		cObj = obj
		sdX = parseInt(obj.style.left)-event.clientX;
		sdY = parseInt(obj.style.top)-event.clientY;
	if(document.body.setCapture)document.body.setCapture();
	else if(window.captureEvents)window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
}
function startdrag(){
		if(arguments.length>0)	event = arguments[0];
		if (!cObj)	return;
		cObj.style.left=(sdX+event.clientX) + 'px';
		cObj.style.top=(sdY+event.clientY) + 'px';
		
	$('frepopup').style.left = (sdX+event.clientX) + 'px';
	$('frepopup').style.top =(sdY+event.clientY+25) + 'px';
}
function enddrag(){
		cObj=null;
	if(document.releaseCapture)document.releaseCapture();
	else if(window.releaseEvents)window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);
}


function initializePop()
{
	document.onmousemove=startdrag;
	document.onmouseup=enddrag;
	document.write("<iframe id=\"frepopup\" style=\"position:absolute;z-index:1;top:10px;left:10px;display:none;\" frameborder=\"0\"></iframe><div id=\"divpop\" style=\"position: absolute; z-index: 3; background-color: #fff;display:none;\">\r\n    <h5 style=\"cursor: move;\" onmousedown=\"initdrag(this.parentNode, event)\" >\r\n                    <img onclick=\"popup_close()\" src=\"/images/close.gif\"  border=\"0\" style=\"cursor:hand;\"  />\r\n            <span id=\"popup_title\"></span>\r\n            </h5>\r\n    <div class=\"text\">\r\n        <iframe id=\"popupFrame\" name=\"popupFrame\" src=\"\" scrolling=\"no\" frameborder=\"0\" height=\"200\" width=\"538\"\r\n           allowtransparency=\"true\"></iframe>\r\n    </div>\r\n</div>") 

}

initializePop();