var ActiveLoginCall;
var datimeout;
var nickname;
var s_Domain = "http://elearning.ccnu.edu.cn";//location.host;
var s_WebVR  = s_Domain + "/ermsweb/";
var s_WSVR   = s_Domain + "/ermsws/";

function onmyresult() { 
	if (event.result.error) {
		alert('出现错误，请重新登录！');
		document.location.href = s_WebVR+"secure/logoff.aspx";
		
	}
	else if(ActiveLoginCall==event.result.id) { 
		var xmlResult = event.result.raw.xml;
		if(event.result.value==false)
		{
			alert('登录过期，请重新登录！');
			document.location.href = s_WebVR+"secure/logoff.aspx";
		}
		datimeout = window.setTimeout('callActiveLogin();',120000);
	}
}
function callActiveLogin(){
	nickname=document.getElementById("Title1:NickName").value;
	if(nickname!="") 
		ActiveLoginCall = service.LoginWebService.callService("ActiveLogin", nickname);
}
function init() {
	service.useService(s_WSVR+"Login.asmx?WSDL","LoginWebService");
	callActiveLogin();
	datimeout = window.setTimeout('callActiveLogin();',120000);
}



