function OpenFullWin(Url)// 打开新窗口并调用下面的closewin方法关闭原来的窗口
{
	var width = screen.availWidth;
	var height = screen.availHeight;
	open(
			Url,
			'main',
			'width='
					+ (width - 10)
					+ ',height='
					+ (height - 35)
					+ ',left=0,top=0,menubar=no,toolbar=no,location=no,status=yes,scrollbars=no,resizable=no');
	if (window.parent == window)
		CloseWin();
 
}

function CloseWin()// 关闭窗口
{
 
	var ua = navigator.userAgent
	var ie = navigator.appName == "Microsoft Internet Explorer" ? true : false
	if (ie) {
		var IEversion = parseFloat(ua.substring(ua.indexOf("MSIE ") + 5, ua
				.indexOf(";", ua.indexOf("MSIE "))))
		if (IEversion < 5.5) {
			var str = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'
			str += '<param name="Command" value="Close"></object>';
			document.body.insertAdjacentHTML("beforeEnd", str);
			document.all.noTipClose.Click();
		} else {
			
//			top.window.opener = top; 
//			top.window.open('','_self',''); 
//			top.window.close(); 
			//同样原理的代码
			//top.window.opener=null; 
			//top.window.open("","_self"); 
			//top.window.close(); 



//			
//			parent.close();
			// window.top.opener = null;
			//window.opener =null;
			// window.close();
		}
	} 
}
