/*var G = function(){	var elements = new Array();	for (var i = 0; i < arguments.length; i++) {		var element = arguments[i];		if(typeof element == 'string'){				element = document.getElementById(element);		}		if (arguments.length == 1) 			return element;		elements.push(element);	}	return elements;};*/var g_config_userState={			login:'login',	unlogin:'unlogin',	name:'name'	//cookie:{domain:domainName},};	function login(){	// \u8bfb\u7528\u6237\u540d\u548c\u767b\u9646\u6807\u8bc6\uff0c\u5224\u65ad\u662f\u5426\u5df2\u767b\u9646		var hr_userName=getCookie("hr_userName");	var hr_userLogin=getCookie("hr_userLogin");	//unlogin is the line to display if logined	if(hr_userName && hr_userLogin=="1"){		try{			G(g_config_userState.unlogin).style.display="";			G(g_config_userState.login).style.display="none";			G(g_config_userState.name).innerHTML=hr_userName;		}catch(e){		}		return true;	}else{		try{			G(g_config_userState.unlogin).style.display="none";			G(g_config_userState.login).style.display="";			G(g_config_userState.name).innerHTML="";		}catch(e){		}		return true;	}		return false;	};function logout(){	var loginCookie = getCookie("hr_userLogin");	clearLoginCookie();	if(loginCookie == 1){		location.href = logoutUrl;	}};function setLoginCookie(uname,islogin){	setCookie("hr_userName",uname);	setCookie("hr_userLogin",islogin);};function getLoginState(){	var curdate = new Date();	checkStateUrl = checkStateUrl +"?l=" + curdate.getMilliseconds();	var myAjax = new Ajax.Request( checkStateUrl,{method:'get',encoding:'UTF-8',contentType:'application/x-www-form-urlencoded',onComplete: function(originalRequest){syncLoginState(originalRequest)}}  );};function syncLoginState(result){	var uname = "";	try{		uname = result.responseText;	}catch(e){		uname= "";	}	uname = uname.replace(/(^\s*)|(\s*$)/g, ""); 		if(uname.length > 0){		setLoginCookie(uname,1);	}else{		clearLoginCookie();	}	login();};function clearLoginCookie(){	setCookie("hr_userName",null);	setCookie("hr_userLogin",0);};