﻿/*firefox window.event*/
function __firefox(){
	HTMLElement.prototype.__defineGetter__("runtimeStyle", __element_style);
	window.constructor.prototype.__defineGetter__("event", __window_event);
	Event.prototype.__defineGetter__("srcElement", __event_srcElement);
}
function __element_style(){return this.style;}
function __window_event(){return __window_event_constructor();}
function __event_srcElement(){return this.target;}
function __window_event_constructor(){
	if(document.all){return window.event;}
	var _caller = __window_event_constructor.caller;
	while(_caller!=null){
		var _argument = _caller.arguments[0];
		if(_argument){
			var _temp = _argument.constructor;
			if(_temp.toString().indexOf("Event")!=-1){return _argument;}
		}
		_caller = _caller.caller;
	}
	return null;
}
if(window.addEventListener){__firefox();}
/*end firefox.event*/
//获取对象
function $obj(id){return document.getElementById(id)}
//获取对象的高度d
function $height(obj){return parseInt(obj.style.height)||obj.offsetHeight}
//获取对象的宽度
function $width(obj){return parseInt(obj.style.width)||obj.offsetwidth}
//生成表单元素
function $input(id,itype,iclick,istyle,ivalue){
	var _Button="<input type=\""+itype+"\" id=\""+id+"\" name=\""+id+"\"";
		if(iclick!="") _Button+=" onclick=\"javascript:"+iclick+"\"";
		if(istyle!="") _Button+=" style=\""+istyle+"\"";
		_Button+=" value=\""+ivalue+"\" />";
	return _Button;
} 
//获取JS文件的路径
var __Js_Script=document.getElementsByTagName("script");
var __Js_Path=__Js_Script[__Js_Script.length-1].src.substring(0,__Js_Script[__Js_Script.length-1].src.lastIndexOf("/")+1);
//创建多窗口时对象后的参数
var __eRnd=0;
//初始化
function __window(name){
	this._Alpha=0.1; //遮罩层透明度
	this._iAplha=1;
	this._WinTimer
	this._AlphaColor="#000000";//遮罩层背景色
	this._InsName=name||"(new __window())";//遮罩层名称
	this._Ok=0;	//点击确定返回1,默认为0
	this._Icon=null;//消息类型的图标
	this._StartDrag=false;//是否拖动
	//窗口默认宽度和高度以及样式
	this._Width=280;
	this._Height=150;
	this._BorderColor="#B8D2F5";
	this._BgColor="#E9F1FC";
	this._TitleColor="#E9F1FC";
	this._Path=__Js_Path||"";//Js文件路径
	this._ImgPath=this._Path+"images/Skin1/";
	this._Rooted=document.documentElement;
	this._Pwidth=0;
	this._Pheight=0;
	//点击确定或取消执行的函数以及按钮样式
	this._OkFun=null;
	this._EscFun=null;
	this._OkBtn=$input("OkBtn"+__eRnd,"button","__TmpWindow.DoOk()","cursor:pointer;background:url("+this._ImgPath+"btn.gif) no-repeat;width:60px;height:24px;border:0","确定");
	this._EscBtn=$input("EscBtn"+__eRnd,"button","__TmpWindow.DoEsc()","cursor:pointer;background:url("+this._ImgPath+"btn.gif) no-repeat;width:60px;height:24px;border:0","取消");
	this.SetBtnType=["",this._OkBtn,this._EscBtn,this._OkBtn+"	"+this._EscBtn,"",this._OkBtn+"	"+this._EscBtn];//按钮类型:4不显示,1确定,2取消,3全部			
}
//设定窗口的宽度
__window.prototype._SetWidth=function(W){
	if(/\d/.test(W)&&W!=null){
		this._Width=W;
	}else{
		this._Width=280;
	}
}
//设定窗口的高度
__window.prototype._SetHeight=function(H){
	if(/\d/.test(H)&&H!=null){
		this._Height=H;
	}else{
		this._Height=150;
	}
}
//设定按钮执行的函数,Tp=1确定，Tp=2取消
__window.prototype._SetFun=function(Fun,Tp){
	if(Tp==1) this._OkFun=Fun;
	if(Tp==2) this._EscFun=Fun;
}
//设定图标类型,提示,询问,错误,确认。
__window.prototype._SetIco=function(Icon){
	this._Icon=Icon;
}
//弹出前的初始化
__window.prototype._Init=function(iRnd,iBtn){
	this._ShowMask(iRnd,5,iBtn);
	//this._ShowSelect(0);//隐藏Select
}
//关闭窗口后的操作
__window.prototype._Destory=function(iRnd){
	this._RemoveMask(iRnd);//隐藏背景层
	$obj("_iWin"+iRnd).style.display="none";//隐藏容器
	//this._ShowSelect(1);//显示Select
}
//显示或隐藏Select控件,0隐藏
__window.prototype._ShowSelect=function(iState,Doc){
	var tState=iState;
	iState=(iState==0?"hidden":"visible");
	Doc=Doc||document;
	try{
		var Sels=Doc.getElementsByTagName("select");
		for(var i=Sels.length;i>0;i--){
			//保存其原隐藏显示属性
			if(!Sels[i-1].getAttribute("oldVisible")){
				Sels[i-1].setAttribute("oldVisible",Sels[i-1].currentStyle.visibility)
			};
			//如果原来是隐藏直接隐藏，如果显示则判断原来显隐状态并显示
			Sels[i-1].style.visibility=(iState=="hidden"?"hidden":(Sels[i-1].getAttribute("oldVisible")||iState));
		}
		var iframes=Doc.frames;
		for(var i=iframes.length;i>0;i--){
			this._ShowSelect(tState,iframes[i-1].document);
		}
	}catch(e){}
}
//显示遮罩层
__window.prototype._ShowMask=function(iRnd,i,iBtn){
	//第一次创建一个蒙板层
	
	if(!$obj("_iWinShield"+iRnd+"")){
		var shieldStyle="position:absolute;top:0px;left:0px;background:"+this._AlphaColor+";text-align:center;z-index:"+20*iRnd+";"
		try{
			document.body.appendChild(document.createElement("<div id=\"_iWinShield"+iRnd+"\" style=\""+shieldStyle+"\"></div>"));
		}catch(e){
			var BlyShield=document.createElement("div");
			BlyShield.id="_iWinShield"+iRnd+"";
			BlyShield.setAttribute("style",shieldStyle);
			document.body.appendChild(BlyShield);
		}
	}
	//计算蒙板的高宽
	var Rooted=this._Rooted;
	//if ()document.documentElement//
	if(document.documentElement.clientHeight<=document.documentElement.scrollHeight){
		Rooted=document.body;
	}
	//document.documentElement
	this._DocHeight=((Rooted.clientHeight>Rooted.scrollHeight)?Rooted.clientHeight:Rooted.scrollHeight)+"px";
	this._DocWidth=((Rooted.clientWidth>Rooted.scrollWidth)?Rooted.clientWidth:Rooted.scrollWidth)+"px";
	//this.Rooted=document.body;
	$obj("_iWinShield"+iRnd).style.width="100%";//this._DocWidth;
	$obj("_iWinShield"+iRnd).style.height=this._DocHeight;
	$obj("_iWinShield"+iRnd).style.display="";
	$obj("_iWinShield"+iRnd).style.filter="alpha(Opacity='"+this._Alpha*100+"')";
	$obj("_iWinShield"+iRnd).style.opacity=this._Alpha;
}
//移除遮罩层
__window.prototype._RemoveMask=function(iRnd){
	$obj("_iWinShield"+iRnd).style.display="none";
	document.body.onselectstart=function(){return true};
	document.body.oncontextmenu=function(){return true};
}
//绑定事件的函数
function addEvent(env,fn){
	var ua=navigator.userAgent.toLowerCase(); 
	var opera=ua.indexOf("opera")!=-1; 
	var ie=ua.indexOf("msie")!=-1&&(document.all&&!opera); 
	if(ie){document.attachEvent("on"+env,fn);}else{document.addEventListener(env,fn,false);}
}
__window.prototype._SetBox=function(_State,iRnd,BtnType){
	//窗口当前位置
	document.body.onselectstart=function(){return _State;$obj("_iWin"+iRnd).disabling.style="-moz-user-select: none;" };
	document.body.oncontextmenu=function(){return _State;$obj("_iWin"+iRnd).disabling.style="-moz-user-select: none;"};
	if(!$obj("_iWinBox")){
		var _outBox=document.createElement("div");
		_outBox.id="_iWinBox";
		_outBox.innerHTML="";
		document.body.appendChild(_outBox);
	}
	var _iWinBoxstyle
	if (iRnd==__eRnd){
		if(!_State){
				
			_iWinBoxstyle="position:absolute;border:1px dashed #777;margin:0px;top:"+this._ContainY+"px;left:"+this._ContainX+"px;width:"+($width($obj("_iWin"+iRnd))+8)+"px;z-index:"+31*iRnd+";height:"+($height($obj("_iWin"+iRnd))+8)+"px;"
			$obj("_iWinBox").style.cssText=_iWinBoxstyle;
		}else{
			//if(_State==true){this._ContainY=document.documentElement.scrollTop}
			//alert($obj("_iWinBox").style.top)
			$obj("_iWin"+iRnd).style.left=(Number($width($obj("_iWin"+iRnd))/2)+Number($obj("_iWinBox").offsetLeft))+"px";
			$obj("_iWin"+iRnd).style.top=(Number($height($obj("_iWin"+iRnd))/2)+Number($obj("_iWinBox").offsetTop))+"px";
			//$obj("_iWin"+iRnd).offsetLeft=$obj("_iWinBox").offsetLeft;
			//$obj("_iWin"+iRnd).offsetTop=$obj("_iWinBox").offsetTop;
			//$obj("_iWin"+iRnd).style.Left=$obj("_iWinBox").offsetLeft+"px";
			//$obj("_iWin"+iRnd).style.Top=$obj("_iWinBox").offsetTop+"px";

			$obj("_iWinBox").style.border="0px";
			$obj("_iWinBox").style.zIndex=1*iRnd;
		}
	}
}
//拖动部分代码
__window.prototype._SetDrag=function(event,iRnd,BtnType){
	this._StartDrag=true;
	var InsName=this._InsName;
	_Self=this;
	this._StartX=event.x||event.pageX;
	this._StartY=event.y||event.pageY;
	//下一个位置
	this._ContainX=$obj("_iWin"+iRnd).offsetLeft;
	this._ContainY=$obj("_iWin"+iRnd).offsetTop;

	__TmpWindow._SetBox(false,iRnd,BtnType)//显示虚框
	addEvent("mousemove",function(){
		var event=window.event||arguments[0];
		if(_Self._StartDrag){
			try{
				if (iRnd==__eRnd){
					//$obj("_iWinTitleInfo"+iRnd).innerHTML=$obj("_iWin"+iRnd).style.top;
					$obj("_iWinBox").style.left=(_Self._ContainX+(event.x||event.pageX)-_Self._StartX)+"px";
					$obj("_iWinBox").style.top=(_Self._ContainY+(event.y||event.pageY)-_Self._StartY)+"px";
				}
				//及时调整蒙板的高宽
				var tVar1=parseInt($obj("_iWinBox").style.left)<parseInt(_Self._DocWidth)-parseInt($obj("_iWinBox").style.width);
				var tVar2=parseInt($obj("_iWinBox").style.top)<parseInt(_Self._DocHeight)-parseInt($obj("_iWinBox").style.height);
				//回到页面内部则还原蒙板原宽高,否则动态扩大蒙板的宽高
				Rooted=_Self._Rooted;
				//if(document.documentElement.clientHeight>document.documentElement.scrollHeight){
					//Rooted=document.documentElement;
				//}
				if(tVar1){
					$obj("_iWinShield"+iRnd).style.width=_Self._DocWidth;
				}else{
					$obj("_iWinShield"+iRnd).style.width=((Rooted.clientWidth>Rooted.scrollWidth)?Rooted.clientWidth:Rooted.scrollWidth)+"px";
				}
				if(Var2){
					$obj("_iWinShield"+iRnd).style.height=_Self._DocHeight;
				}else{
					$obj("_iWinShield"+iRnd).style.height=((Rooted.clientHeight>Rooted.scrollHeight)?Rooted.clientHeight:Rooted.scrollHeight)+"px";
				}
			}catch(e){}
		}
	});
	//取消拖动
	addEvent("mouseup",function(){eval(InsName+"._StartDrag=false");__TmpWindow._SetBox(true,iRnd,BtnType)/*取消虚框*/});
}
//弹出窗口
__window.prototype.alert=function(Message,Title,iRnd,Place){
	this._Init(iRnd);
	this._CreateWindow(Title||"警告提示框",Message,1,iRnd,Place);
};
//确认窗口
__window.prototype.confirm=function(Message,Title,iRnd,Place){
	this._Init(iRnd);
	this._CreateWindow(Title||"信息确认框",Message,3,iRnd,Place);
};
//询问窗口
__window.prototype.prompt=function(Message,DefaultValue,Title,iRnd,Place){
	this._Init(iRnd);
	this._CreateWindow(Title||"系统询问框",Message,5,iRnd,Place,DefaultValue);
};
//自定义窗口
__window.prototype.window=function(Message,Title,iRnd,Place,Bground,Drag){
	this._Init(iRnd,4,Drag);
	this._CreateWindow(Title||"窗口",Message,4,iRnd,Place,Bground,Drag);
};
//点击确定
__window.prototype.DoOk=function(){
	this._Ok=1;this._Destory(__eRnd);
	if(this._OkFun){
		if(typeof this._OkFun=="function"){
			this._OkFun();
			}else{
				eval(this._OkFun);
			}
	}
	__eRnd--;
};
//点击取消
__window.prototype.DoEsc=function(){
	this._Ok=0;this._Destory(__eRnd);
	if(this._EscFun){
		if(typeof this._EscFun=="function"){
			this._EscFun();
			}else{
				eval(this._EscFun);
			}
	}
	__eRnd--;
}
//创建窗体
__window.prototype._CreateWindow=function(Title,Content,BtnType,iRnd,Place,Bground,Drag){
	//第一次需要创建一个容器
	
	//alert("_iWin"+iRnd)
	if(!$obj("_iWin"+iRnd)){
		var _iWinBox=""
		_iWinBox+="<div id=\"_iWinTitle"+iRnd+"\"><div id=\"_iWinTitleInfo"+iRnd+"\"></div><div id=\"_iWinTitleClose"+iRnd+"\"></div></div>";//标题容器层
		_iWinBox+="<div id=\"_iWinContent"+iRnd+"\">";
		_iWinBox+="		<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td  id=\"_iWinInfo"+iRnd+"\"></td></tr></table>";//内容容器层
		_iWinBox+="		<div id=\"_iWinButton"+iRnd+"\"></div>";//按钮容器层
		_iWinBox+="</div>";
		//创建容器
		var _outBoxStyle="position:absolute;top:0px;left:0px;z-index:"+21*iRnd+";margin:0px;padding:0px;display:none"
		var _outBox=document.createElement("div");
		_outBox.id="_iWin"+iRnd;
		_outBox.setAttribute("style",_outBoxStyle);
		_outBox.innerHTML=_iWinBox;
		document.body.appendChild(_outBox);
	}
	
	var _Style;
	var _iWintxt="border:1px solid "+this._BorderColor+";";
	var _iWinTitletxt="height:24px;background-color:"+this._TitleColor+";";
	var _iWinContenttxt="border:1px solid "+this._BorderColor+";background-color:#FFFFFF;";
	var _iWinInfotxt="";
	var _iWinButton="height:30px;";
	var _oHeight=0
	if(Bground!=null){		
		if(Bground==""){
			_iWintxt+="border:0px solid #BEBEBE;";
			_iWinTitletxt+="height:0px;";
			_iWinButton+="height:0px;"
			_oHeight=26;
		}else{
			_iWinTitletxt+="height:0px;";
			_iWinButton+="height:0px;"
			_oHeight=26;
			_iWintxt+="border:0px;";
			_iWintxt+="background:url("+Bground+") no-repeat;"
		}
		_iWinContenttxt="";
		_iWinInfotxt="";
	}else{
		_iWintxt+="background-color:"+this._BgColor+";";
	}
	//容器样式
	_Style="margin:0px;padding:0px;position:absolute;width:"+this._Width+"px;height:"+this._Height+"px;";
	_Style+="z-index:"+21*iRnd+";"+_iWintxt;
	_Style+="font-size:12px;padding:4px;"
	_Style+="margin-left:"+(-this._Width/2+this._Rooted.scrollLeft)+"px;margin-top:"+(-this._Height/2+this._Rooted.scrollTop)+"px;"
	$obj("_iWin"+iRnd).style.cssText=_Style;
	//标题样式
	_Style="clear:both;margin:0px;cursor:move;overflow:hidden;padding:0px 3px 0px 6px;"+_iWinTitletxt;
	$obj("_iWinTitle"+iRnd).style.cssText=_Style;
	_Style="margin:0px;width:"+(this._Width-30)+"px;line-height:24px;float:left;text-align:left;";
	$obj("_iWinTitleInfo"+iRnd).style.cssText=_Style;
	
	//加载移动事件
	$obj("_iWinTitleInfo"+iRnd).onmousedown=new Function(this._InsName+"._SetDrag(event,"+iRnd+","+BtnType+")");
	_Style="margin:0px;background:url("+this._ImgPath+"Close.gif) no-repeat 0px 2px;"
	_Style+="height:24px;width:15px;cursor:pointer;float:right";
	$obj("_iWinTitleClose"+iRnd).style.cssText=_Style;
	//加载关闭事件
	$obj("_iWinTitleClose"+iRnd).onclick=new Function("__TmpWindow.DoEsc()");
	
	//内容整体样式
	_Style="clear:both;margin:0px;overflow:hidden;padding:4px;";
	_Style+="height:"+(this._Height-34+_oHeight)+"px;"+_iWinContenttxt;
	$obj("_iWinContent"+iRnd).style.cssText=_Style;
	//内容显示样式
	_Style="margin:0px;overflow:hidden;padding:4px;padding-top:0px";
	if (Bground!=null){
		$obj("_iWinInfo"+iRnd).height=$height($obj("_iWinContent"+iRnd))
	}else{
		$obj("_iWinInfo"+iRnd).height=$height($obj("_iWinContent"+iRnd))-38
	}
	if (BtnType==4||BtnType==5){
		$obj("_iWinInfo"+iRnd).align="left";
		$obj("_iWinInfo"+iRnd).vAlign="top";
	}else{
		$obj("_iWinInfo"+iRnd).align="center";
		$obj("_iWinInfo"+iRnd).vAlign="middle";
		_Style="background:url("+this._ImgPath+this._Icon+") no-repeat 20px 50%;"
	}
	
	$obj("_iWinInfo"+iRnd).style.cssText=_Style;
	//按钮样式
	_Style="margin:0px;overflow:hidden;text-align:center;"+_iWinButton;
	$obj("_iWinButton"+iRnd).style.cssText=_Style;
	//显示窗口
	$obj("_iWin"+iRnd).style.display="";
	if(BtnType==5){
		Content+="<div style=\"margin-top:6px\">"
		Content+="<input type=\"text\" name=\"PromptValue\" id=\"PromptValue\" "
		Content+="style=\"width:98%;height:20px;border:1px solid "+this._BorderColor+";\"/>"
		Content+="</div>"
	}
	
	//加载内容
	$obj("_iWinTitleInfo"+iRnd).innerHTML="";
	$obj("_iWinInfo"+iRnd).innerHTML="";
	$obj("_iWinButton"+iRnd).innerHTML="";
	$obj("_iWinTitleInfo"+iRnd).innerHTML=Title;
	//$obj("_iWinInfo"+iRnd).innerHTML=Content;
	__TmpWindow.SetInnerHTML($obj("_iWinInfo"+iRnd),Content)
	//prompt('',$obj("_iWin"+iRnd).innerHTML)
	$obj("_iWinButton"+iRnd).innerHTML=this.SetBtnType[BtnType];
	
	__TmpWindow._Place($obj("_iWin"+iRnd),Place)
	//__TmpWindow.Alpha(iRnd,this._Width,this._Height,1,Bground)
	
}
//窗口位置控制
__window.prototype._Place=function(_obj,Place){
	//alert(document.documentElement.scrollHeight/2)
	var event=window.event||arguments[0];
	var _iLeft=""
	var _iTop=""
	var _iLeft=event.x||event.pageX;
	var _iTop=event.y||event.pageY;
	var _iXy="";
	var _oT=0;
	var _oL=0
	if(Place!=null){
		_iXy=Place.split("|")[0]
		_oT=parseInt((Place.split("|")[1]).split("#")[0])
		_oL=parseInt((Place.split("|")[1]).split("#")[1])
	}
	var _iType="px"
	if(_iLeft==null || _iTop==null){
		//没有参照对象时在中间显示
		_iTop=50; _iLeft=50; _iType="%";
		//alert(document.documentElement.scrollHeight/2)
		_iXy="";
	}else{
		_iType="px";
		var _oHeight=$height(_obj);
		var _oWidth=$width(_obj);
		
		//var Rooted=this._Rooted;
		//if(document.documentElement.clientHeight>document.documentElement.scrollHeight){
			//Rooted=document.documentElement;
		//}
		switch(_iXy){
		/*左上*/case "A":_iTop-=(_oHeight/2)+(10+_oT);_iLeft-=(_oWidth/2)+(10+_oL);break;
		/*中上*/case "B":_iTop-=(_oHeight/2)+(10+_oT);_iLeft+=(0+_oL);break;
		/*右上*/case "C":_iTop-=(_oHeight/2)+(10+_oT);_iLeft+=(_oWidth/2)+_oL;break; 
		/*左下*/case "D":_iTop+=(_oHeight/2)+_oT;_iLeft-=(_oWidth/2)+(10+_oL);break;
		/*中下*/case "E":_iTop+=(_oHeight/2)+_oT;_iLeft+=(0+_oL);break;
		/*右下*/case "F":_iTop+=(_oHeight/2)+_oT;_iLeft+=(_oWidth/2)+_oL;break; 
		/*居中*/default :_iTop=50; _iLeft=50; _iType="%";break;
		
		}
		
	}
	_obj.style.top=_iTop+_iType;
	_obj.style.left=_iLeft+_iType;
}
//显示效果
__window.prototype.Alpha=function(iRnd,Width,Height,_iNum){
	var oStyle=""
	if (_iNum<=10){
		$obj("_iWin"+iRnd).style.filter="alpha(Opacity='"+(10*_iNum)+"')";
		$obj("_iWin"+iRnd).style.opacity=_iNum*0.1;
		$obj("_iWin"+iRnd).style.width=((Width/10)*_iNum)+"px";
		$obj("_iWin"+iRnd).style.height=((Height/Width)*(Width/10)*_iNum)+"px";
		window.setTimeout("__TmpWindow.Alpha("+iRnd+","+Width+","+Height+","+(_iNum+1)+")",40);
	}else{
		$obj("_iWin"+iRnd).style.filter=0
		$obj("_iWinTitle"+iRnd).style.display="";
		$obj("_iWinContent"+iRnd).style.display=""
	}
}
//加载JS文件
__window.prototype.SetInnerHTML=function(el,HtmlCode){
	var ua=navigator.userAgent.toLowerCase();
	el.innerHTML="";
	if(ua.indexOf('msie')>=0 && ua.indexOf('opera')<0){
	HtmlCode='<div style="display:none">for IE</div>'+HtmlCode;
	HtmlCode=HtmlCode.replace(/<script([^>]*)>/gi,'<script$1 defer>');
	el.innerHTML=HtmlCode;
	el.removeChild(el.firstChild);
	}else{
		var el_next=el.nextSibling;
		var el_parent=el.parentNode;
		el_parent.removeChild(el);
		el.innerHTML=HtmlCode;
		if(el_next){
			el_parent.insertBefore(el,el_next)
		}else{
			el_parent.appendChild(el);
		}
	}
}
//操作接口
var __TmpWindow;
//各消息框的相同操作
function __initPromptInfo(Width,Height,Fun1,Fun2){
	__TmpWindow=__TmpWindow||new __window("__TmpWindow");
	__TmpWindow._SetWidth(Width);
	__TmpWindow._SetHeight(Height);
	__TmpWindow._SetFun(Fun1,1);
	__TmpWindow._SetFun(Fun2,2);
	__eRnd++;
	//alert(__eRnd)
}
function Alert(Message,width,height,Title,Place,Fun1,Fun2){
	__initPromptInfo(width,height,Fun1,Fun2);
	__TmpWindow._SetIco("info.gif");
	__TmpWindow.alert(Message,Title||"消息提示框",__eRnd,Place);
}
function Error(Message,width,height,Title,Place,Fun1,Fun2){
	__initPromptInfo(width,height,Fun1,Fun2);
	__TmpWindow._SetIco("err.gif");
	__TmpWindow.alert(Message,Title||"错误信息框",__eRnd,Place);
}
function Succeed(Message,width,height,Title,Place,Fun1,Fun2){
	__initPromptInfo(width,height,Fun1,Fun2);
	__TmpWindow._SetIco("right.gif");
	__TmpWindow.alert(Message,Title||"成功信息框",__eRnd,Place);
}
function Confirm(Message,width,height,Title,Place,Fun1,Fun2){
	__initPromptInfo(width,height,Fun1,Fun2);
	__TmpWindow._SetIco("ask.gif");
	__TmpWindow.confirm(Message,Title||"信息确认框",__eRnd,Place);
}
function Prompt(Message,width,height,Title,Place,Fun1,Fun2,DefaultValue){
	__initPromptInfo(width,height,Fun1,Fun2);
	__TmpWindow._SetIco("");
	__TmpWindow.prompt(Message,DefaultValue,Title||"系统询问框",__eRnd,Place);
}
function iForm(Message,width,height,Title,Place,Bground){
	__initPromptInfo(width,height);
	__TmpWindow.window(Message,Title||"自定义窗口",__eRnd,Place,Bground);
}
function iInfo(Message,width,height,Place){
	__initPromptInfo(width,height,"","");
	__TmpWindow.window(Message,''||"自定义窗口",__eRnd,Place,'',false);
}
//关闭窗口
function Close(){
	__TmpWindow.DoEsc();	
}
//选择生成对象
function MakeObj(oNum,objA,objB,oStr){
	var obj_A=document.getElementById(objA);
	var obj_B=document.getElementById(objB);
	var iStr=oStr;
	var StrA=obj_A.innerHTML;
	var StrB=obj_B.innerHTML;
	var NumB=StrB.split(oStr).length
	StrB="";
		for(i=1;i<oNum;i++){
			StrB+=StrA;
		}
	obj_B.innerHTML=StrB;
}