function L_popdiv(){}
L_popdiv.prototype={
	_VersionInfo:"Version:1.0",
	Moveable:true,
	NewName:"",
	insertId:"",
	ClickObject:null,
	MouseX:0,
	MouseY:0,
	Action:"",
	InnerHeight:0,
	InnerWidth:0,
	GetPopLayer:function(){
		return window.L_pop;
		},
	GetY:function(){
		var obj;
		if (arguments.length > 0){
			obj==arguments[0];
			}
		else{
			obj=this.ClickObject;
			}
		if(obj!=null){
			var y = obj.offsetTop;
			while (obj = obj.offsetParent) y += obj.offsetTop;
			return y;}
		else{return 0;}
		},
	GetX:function(){
		var obj;
		if (arguments.length > 0){
			obj==arguments[0];
			}
		else{
			obj=this.ClickObject;
			}
		if(obj!=null){
			var y = obj.offsetLeft;
			while (obj = obj.offsetParent) y += obj.offsetLeft;
			return y;}
		else{return 0;}
		},
	CreateEL:function(){
		var ta = arguments[0];
		var focusid = arguments[1];
		var htmlstr="<div id=\"L_popdiv\">\r\n";
		htmlstr+="<ul>\r\n";
		if(ta.length>0){
			for(var i=0;i<ta.length;i++){
				htmlstr+="<li><a href='javascript:void(0);' onclick=\"parent."+this.NewName+".SelectOption('"+ta[i][0]+"','"+ta[i][1]+"','"+focusid+"');return false;\">"+ta[i][0]+"</a></li>\r\n";
			}
		}
		htmlstr+="</ul>\r\n";
		htmlstr+="</div>\r\n";
		var stylestr="";
		stylestr+="<style type=\"text/css\">";
		stylestr+="body{background:#fff;font-size:12px;margin:0px;padding:0px;height:"+this.InnerHeight+"px;text-align:left;overflow:hidden;border:1px solid #424242;word-break:word-break;}\r\n";
		stylestr+="#L_popdiv{list-style:none;margin:0;border-top:none;padding:1px;z-index:9998;}\r\n";
		stylestr+="#L_popdiv ul{margin:0;margin-top:5px;border-top:none;}\r\n";
		stylestr+="#L_popdiv li{list-style:none;width:"+this.InnerWidth+"px;float:left;height:24px;line-height:24px;margin-left:4px;margin-right:12px;word-break:keep-all;word-wrap:normal;white-space:nowrap;}\r\n";
		stylestr+="#L_popdiv a{color:#000;font-size:12px;font-family:\"Microsoft Yahei\";text-decoration:none;}\r\n";
		stylestr+="#L_popdiv a:hover{background-color:#39f;}";
		stylestr+="</style>";
		var TempLateContent="<html>\r\n";
		TempLateContent+="<head>\r\n";
		TempLateContent+="<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>"
		TempLateContent+="<title></title>\r\n";
		TempLateContent+=stylestr;
		TempLateContent+="</head>\r\n";
		TempLateContent+="<body>\r\n";
		TempLateContent+=htmlstr;
		TempLateContent+="</body>\r\n";
		TempLateContent+="</html>\r\n";
		this.GetPopLayer().document.writeln(TempLateContent);
		this.GetPopLayer().document.close();
		},
		ShowHddn:function(){
			this.ClickObject=arguments[0];
			var ta = arguments[1];
			var focusid = arguments[2];
			var wd = this.ClickObject.clientWidth;
			var ht = 200;
			var minus = 0;
			if(arguments.length>5){
				minus = new Number(arguments[5]);
			}
			if(arguments.length>3){
				this.InnerWidth=arguments[3];
				wd += minus;
			}
			if(arguments.length>4){
				this.InnerHeight=arguments[4];
				ht=arguments[4];
				if(focusid=='bizdis1'){
					if(ta.length<7){
						ht=ht-30;
						this.InnerHeight=ht;
					}
				}
			}
			this.CreateEL(ta,focusid);
			var top=this.GetY();
			var left=this.GetX();
			var PopLayer=document.getElementById("L_pop");
			PopLayer.style.top=top+this.ClickObject.clientHeight-1+"px";
			PopLayer.style.left=left+"px";
			PopLayer.style.display="block";
			PopLayer.style.height=ht+"px";
			PopLayer.style.width=wd+"px";
			if(document.all){
				this.GetPopLayer().document.getElementById("L_popdiv").style.width=wd+"px";
				this.GetPopLayer().document.getElementById("L_popdiv").style.height=ht+"px";
				}
			else{
				this.GetPopLayer().document.getElementById("L_popdiv").style.width=(wd-6)+"px";
				this.GetPopLayer().document.getElementById("L_popdiv").style.height=ht+"px";
				}
			},
		SelectOption:function(){
			this.ClickObject.value=arguments[0];
			if(document.getElementById(arguments[2])){
				document.getElementById(arguments[2]).value = arguments[1];
			}
			this.CloseMe();
			checkSearchConditions();
			},
		CloseMe:function(){
			try{
				var PopLayer=document.getElementById("L_pop");
				if((PopLayer.style.display=="" || PopLayer.style.display=="block") && arguments[0]!=this.ClickObject){
				PopLayer.style.display="none";
			}
		}
		catch(e){}
		}
}
document.writeln('<iframe id="L_pop" name="L_pop" frameborder="0" style="position:absolute;width:200px;z-index:9998;display:none;"></iframe>');
var SearCon=new L_popdiv();
SearCon.NewName="SearCon";
document.onclick=function(e){
	e = window.event || e;
  	var srcElement = e.srcElement || e.target;
  	SearCon.CloseMe(srcElement);
}
