//关闭窗口
function CloseWindow()
{
  window.opener=null;window.close();
}
//--------------------------------------------------------------------------------------
// 日期：2005-8-11
//' 功能：返回错误信息的通用函数
// 编写：WingBird 
//--------------------------------------------------------------------------------------
function ErrorMessage(str1)
{
     alert(str1);
     history.back(-1);
} 
//--------------------------------------------------------------------------------------
// 日期：2005-8-11
// 功能：打开一个窗口
// 编写：WingBird 
//--------------------------------------------------------------------------------------

function openwin(url,w,h,t,l,s)
{
  window.open(url,"","width="+w+",height="+h+",resizable=0,top="+t+",left="+l+",toolbar=no, menubar=no, scrollbars="+s+", resizable=no, location=no, status=no");
}
//--------------------------------------------------------------------------------------
// 日期：2005-8-11
// 功能：返回错误信息的通用函数
// 编写：WingBird 
//--------------------------------------------------------------------------------------
function showMessage(str1)
{
     alert(str1);
     window.dialogArguments.location.reload();window.close();
}
function WinOpen(){	//弹出窗口构造函数
	this.Open1 = function(sUrl, Title, Width, Height){	//弹出焦点模态窗.
		if(!sUrl || !Title || !Width || !Height){
			return;
		}else{
			window.link = sUrl;		window.titl = Title;	window.Mode = true;
			window.showModalDialog('./WinOpenHtm.htm', window, "center:1; help:0; resizable:0; status:0; scroll:0; dialogWidth:"+ Width +"px; dialogHeight:"+ Height +"px");
		}
	}
	this.Open2 = function(sUrl, Title, Width, Height){	//弹出无焦点模态窗.
		if(!sUrl || !Title || !Width || !Height){
			return;
		}else{
			window.link = sUrl;		window.titl = Title;	window.Mode = true;
			window.showModelessDialog('./WinOpenHtm.htm', window, "center:1; help:0; resizable:0; status:0; scroll:0; dialogWidth:"+ Width +"px; dialogHeight:"+ Height +"px");
		}
	}
	this.Open3 = function(sUrl, Title, Width, Height, Thetop, Theleft){	//弹出window.open窗.
		if(!sUrl || !Title || !Width || !Height){
			return;
		}else{
			window.link = sUrl;		window.titl = Title;
			window.Widt = Width;	window.Heig = Height;
			window.Ttop = (!Thetop) ? (screen.availHeight-Height)/2 : Thetop;
			window.Tlef = (!Theleft) ? (screen.availWidth-Width)/2 : Theleft;
			window.showModalDialog('./WinOpenHtm.htm', window, "center:1; help:0; resizable:0; status:0; scroll:0; dialogWidth:0px; dialogHeight:0px");
		}
	}
}//End WinOpen
var WinOpen = new WinOpen();
 //--------------------------------------------------------------------------------------
 // 日期：2005-8-12
 // 编写：WingBird
 // 功能：日期选择器
 // 调用：onclick="javascript:BeginTime('bday')"
 //-------------------------------------------------------------------------------------
function BeginTime(id) 
{ 
		var timestring = showModalDialog("/xfxsoft/include/selecttime.htm", "", "dialogLeft:"+(event.screenX-13)+";dialogTop:"+(event.screenY-15)+";dialogWidth:165px; dialogHeight:205px; edge:raised;help:off;status:off;scroll:off");
		if(timestring!="")
		{
			document.getElementById(id).value = timestring;  
		}   
}

function DateTime() 
{
today=new Date(); 
function initArray(){ 
this.length=initArray.arguments.length 
for(var i=0;i<this.length;i++) 
this[i+1]=initArray.arguments[i] }
var d=new initArray( 
"星期日", 
"星期一", 
"星期二", 
"星期三", 
"星期四", 
"星期五", 
"星期六"); 
document.write( 
"<font color=#006699 style='font-size:9pt;font-family: 宋体'>", 
today.getYear(),"年", 
today.getMonth()+1,"月", 
today.getDate(),"日 ", 
d[today.getDay()+1], 
"</font>" ); 
}         
