
/**
*打开新窗口
*
*url 新窗口的地址
*width  新窗口的宽度
*height  新窗口的高度
*target  新窗口的目标名称
*/
function openWindow(url, target,featurse) {
	var centered = "";
	var x;
	var y;
	var width=0;
	var height=0;
	var s1=featurse.split(",");
	var s2;
	var popup;
	
	for(var i=0;i<s1.length;i=i+1){
	  s2=s1[i].split("=");
	  if(s2.length>=2){
	    if(s2[0]=="width" || s2[0]=="innerWidth"){width=s2[1];}
	    if(s2[0]=="height" || s2[0]=="innerHeight"){height=s2[1];}
	  }
	}
	
	if (width > 0) {
		x = parseInt((window.screen.availWidth - width) / 15);
		centered += ",left=" + x ;
	}
	if (height > 0) {
		y = parseInt((window.screen.availHeight - height) / 12);
		centered += ",top=" + y ;
	}
	
	centered += ",scrollbars=no,resizable=yes,status=no,location=no,menubar=no,alwaysRaised=yes";
	centered+=","+featurse;
	
	
	popup = window.open(url, target, centered);
	if (!popup.opener) {
		popup.opener = self;
	}
	popup.focus();
}


