// Create a component
Function createobj (){
If (window. ActiveXObject ){
Return (new ActiveXObject ("Microsoft. XMLHTTP "));
}
Else if (window. XMLHttpRequest ){
Return (new XMLHttpRequest ());
}
}
Var cs;
// Send the request
Function sxs (Fileid ){
If (window. ActiveXObject ){
Cs = new ActiveXObject ("Microsoft. XMLHTTP ");
}
Else if (window. XMLHttpRequest ){
Cs = new XMLHttpRequest ();
}
Var my_url = "inc/setsession. asp? Id = "+ Fileid +" & rnd = "+ Math. random ();
Cs. open ("get", my_url, true );
Cs. send (null );
}
// Call and return results
Function Star (){
Var oBao = createobj ();
Var frm = document. logo_frm;
Var my_url = "logo. asp? Name = "+ frm. username. value +" & pw = "+ frm. pwd. value +" & rnd = "+ Math. random ();
OBao. open ("POST", my_url, false );
OBao. send ('');
Var strResult = unescape (oBao. responseText );
If (strResult = "yes "){
Window. location. reload ();
}
Else {
Alert ("Logon Failed! Please log on again ...");
Frm. username. value = "";
Frm. pwd. value = "";
Hide ();
}
}
Var h_id;
Var h_ I = 0;
// Call and return results, menu
Function getinfo (index ){
Var oBao = createobj ();
Var cont = document. getElementById ("menu_detial ");
Cont. style. top = '142px ';
Cont. style. left = event. x-60;
If (! Bro_n ){
Cont. style. top = '142px ';
Cont. style. left = event. x-60;
}
Cont. style. width = '150px ';
Cont. style. display = "block ";
Cont. innerHTML = "Please wait, loading ...";
Cont. style. height = "10px ";
Cont. style. overflowY = "hidden ";
Var my_url = "getinfo. asp? Type = "+ index +" & rnd = "+ Math. random ();
OBao. open ('post', my_url, true );
OBao. onreadystatechange = function (){
Var cont = document. getElementById ("menu_detial ");
If (oBao. readyState = 4 ){
If (oBao. status = 200 ){
Cont. innerHTML = oBao. responseText;
H_ I = 0;
H_id = window. setInterval ("h_change ()", 30 );
} Else {
Cont. innerHTML = 'error, error code:' + oBao. status;
}
}
}
OBao. send ('');
}
Function h_change (){
Var cont = document. getElementById ("menu_detial ");
H_ I + = 1;
H = parseInt (cont. style. height );
If (G> 133 ){
Window. clearInterval (h_id );
H_ I = 0;
} Else {
Cont. style. height = 16 + 8 * h_i-h_ I * h_ I * 0.1 + "px ";
}
}
// Call and return results
Function personalInfo (index ){
Var oBao = createobj ();
Var cont = document. getElementById ("person_detial ");
Var cont_a = document. getElementById ("person_content ");
Cont. style. display = 'block ';
Cont. style. width = "600px ";
Cont. style. top = event. y;
Cont_a.innerHTML = "Please wait, loading ...";
Var my_url = "getinfo. asp? Type = "+ index +" & rnd = "+ Math. random ();
OBao. open ('post', my_url, true );
OBao. onreadystatechange = function (){
Var cont_a = document. getElementById ("person_content ");
If (oBao. readyState = 4 ){
If (oBao. status = 200 ){
Cont_a.innerHTML = oBao. responseText;
} Else {
Cont_a.innerHTML = 'error. Error code:' + oBao. status;
}
}
}
OBao. send ('');
}
// Call and return results
Function getNotice (id ){
Var oBao = createobj ();
Var my_url = "notice. asp? Id = "+ id +" & rnd = "+ Math. random ();
OBao. open ('get', my_url, true );
OBao. onreadystatechange = function (){
Var cont_a = document. getElementById ("notice ");
If (oBao. readyState = 4 ){
If (oBao. status = 200 ){
If (cont_a ){
Cont_a.innerHTML = oBao. responseText;
}
} Else {
Cont_a.innerHTML = 'error. Error code:' + oBao. status;
}
}
}
OBao. send ('');
}
Var notice_id = window. setInterval ("getNotice (0)", 6000 );
// Call and return results
Function getnoticeById (id ){
Var cont_a = document. getElementById ("stip_detial ");
Cont_a.style.display = "block ";
Cont_a.style.top = event. y;
Cont_a.style.left = event. x-145;
Cont_a.innerHTML = "loading ...";
Var oBao = createobj ();
Var my_url = "getstip. asp? Id = "+ id +" & rnd = "+ Math. random ();
OBao. open ('get', my_url, true );
OBao. onreadystatechange = function (){
If (oBao. readyState = 4 ){
If (oBao. status = 200 ){
If (cont_a ){
Cont_a.innerHTML = oBao. responseText;
}
} Else {
Cont_a.innerHTML = 'error. Error code:' + oBao. status;
}
}
}
OBao. send ('');
}