Page script:
VaR guid = "null ";
Function checkmessage ()
{
VaR OBJ = guid;
VaR nn = math. Floor (math. Random () * 2000000 );
// Display information page
VaR url = "messageinfo. aspx? Time = "+ nn +" & code = ";
If (OBJ! = "Null ")
{
Url = URL + OBJ;
Guid = "null ";
Openpasswordwin (URL, 300,500 );
Document. getelementbyid ("divmessage"). innerhtml = "";
}
}
// Check for new messages
Function youhadnewmessage (){
VaR had = false;
// Blank execution search page
Url = "checkmessage. aspx ";
VaR nn = math. Floor (math. Random () * 2000000 );
URL + = "? Time = "+ nn;
VaR httprequest;
If (typeof XMLHttpRequest! = 'Undefined '){
Httprequest = new XMLHttpRequest ();
}
Else if (typeof activexobject! = 'Undefined '){
Httprequest = new activexobject ('Microsoft. xmlhttp ');
}
If (httprequest ){
Httprequest. Open ('get', URL, false );
Httprequest. Send (null );
If (httprequest. Status = 200 ){
VaR textinfo = httprequest. responsetext;
If (textinfo! = "Null") had = true;
}}
If (had ){
Guid = textinfo;
Document. getelementbyid ("divmessage "). innerhtml = "<a href = '# 'title = 'insite SMS view' onclick = 'checkmessage () 'id = 'ss7'> <font color = white>-</font> </a> <bgsound src = '/images/newmessage.wav' border = '0'> ";
}
Else
{
Document. getelementbyid ("divmessage"). innerhtml = "";
}
SetTimeout ("youhadnewmessage ()", 300000 );
}
SetTimeout ("youhadnewmessage ()", 300000 );