
//



function refreshMessage()
	{
	    try{
    	    var language="english";
    	    var notice="You have new message. \r\n\r\nDo you want to read?";
    	    if(msnstatusframe.location.href.indexOf("chinese")>0){
    		    notice="你有新消息。\r\n\r\n现在就读取吗？";
    		    language="chinese";
    	    }
    	    window.focus();
            if(window.location.href.indexOf("D7O2XSIULQMN5PFAVPAGT6NQH")>0){
    		    msnmessageframe.location.href="../msn/displaymessages.htm?language="+language+"&sequnce"+sequnce;		  
    		    if(document.getElementById("parasid")!=null){
    	            document.getElementById("parasid").focus();
    	        }
    		    //msnmessageframe.history.go(0);
    	    }else if(confirm(notice)){
    	        window.location.href="index.htm?sid=D7O2XSIULQMN5PFAVPAGT6NQH";
    	    }
    	}catch(e){}
	    
	}

function checkMessage()
	{
	    try{
	    	        
    	    oRDom.load(Path)
            if(oRDom.parseError.errorCode != 0){
                //alert("Sorry.出现了错误"+oRDom.parseError);
            }else{
                if(oRDom.xml.indexOf("true")>0){
                    refreshMessage();
                }
            }
    	    	    
    	    if(window.location.href.indexOf("D7O2XSIULQMN5PFAVPAGT6NQH")>0){
    		    setTimeout("checkMessage()",2000); 
    	    }else{
    	        setTimeout("checkMessage()",10000); 
    	    }
    	}catch(e){}
	    
	}
	
function startClock()
	{
	    try{
    	    setTimeout("checkMessage()",10000); 
    	    if(window.location.href.indexOf("D7O2XSIULQMN5PFAVPAGT6NQH")>0){
    		    if(document.getElementById("useremailid")==null || document.getElementById("useremailid").value!=""){
    		        if(document.getElementById("parasid")!=null){
    		            document.getElementById("parasid").focus();
    		        }
    		    }else if(document.getElementById("useremailid")!=null){
    		        document.getElementById("useremailid").focus();
    		    }
    	    }
    	}catch(e){}
	}

var oRDom=new ActiveXObject("Microsoft.XMLDOM");
    oRDom.async=false;
var Path="../msn/isupdated.htm";
var sequnce=1;
var running=false;
window.onload=startClock;

