var popUpWin=0;
var action_open=0;
//URLStr==网页名
//html＝＝网页类型,1?html:aspx?id=
//paremeter＝＝网页ID参数
//scrollbar==滚动条,默认：0
//width==窗口宽度
//height==窗口高度
//t==窗口上边定位
//L==窗口左边定位
//n==窗口名称
//Open('url',0,'id',1,300,450);
function Open(URLStr,html,parameter,scrollbar, width, height,t,L,n)
{
		
	try {
		if (!popUpWin.closed&&popUpWin){
			popUpWin.close();	
		}
		var h=(html==1)? '.html': '.asp?id=';
		var s;
		if (scrollbar==undefined){
			s='no';
		}else{
			 s=(scrollbar==1)?'yes':'no';
		}
		var top=0;
		if (t==undefined){
			top=screen.availHeight;
		}else if(t==2){
			top=(screen.availHeight-height)/2;
		}else{
			top=t;
		}
		var left;
		if (L==undefined){
			left=0;
		}else if(L==2){
			left=(screen.availWidth-width)/2;
		}else{
			left=L;
		}
		if (n==undefined){
			n='popUpWin';
		}
		  popUpWin = window.open(URLStr+h+parameter,n, 
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='
+s+',resizable=yes,copyhistory=no,width='+
 width+',height='+height+',left='+left+', top='+top+',screenX=0,screenY='+top+'');
		if (popUpWin==null) throw e="open window is null";
	}catch(e){
		if (e=="open window is null" ){
		//alert('本系统需要通过"自动弹出窗口"来提供重要服务，\n并且本网站从不使用"自动弹出窗口"来投放广告，\n请您不要屏蔽它！');
		//action_open=1;
	 	}
	}
}
//关闭弹出窗口后刷新本页
//onUnload="window.opener.location.reload();"
//onFocus="reloadpage(popUpWin);"
function reloadpage(obj)
{
	if (obj.closed && obj){
		//带属性刷新
		//this.location.reload();
		//不带属性刷新
		this.location.replace(this.location.href);
		//alert(obj);
	}
}
