

function tlogin(u,p)
{

var xmlHttp ;

if (window.ActiveXObject) 
{xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}
else if (window.XMLHttpRequest) 
{xmlHttp = new XMLHttpRequest();}


var url="login.php";
var params="user="+u+"&pass="+p;
xmlHttp.open("POST",url,true) ;



xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=windows-1256");
xmlHttp.setRequestHeader("Content-length", params.length);


xmlHttp.onreadystatechange=function(){

if (xmlHttp.readyState<= 3)
 {
     document.getElementById('logind').innerHTML='loading';
     alert(document.getElementById('logind').innerHTML); 
 
 } 

if (xmlHttp.readyState==4)
 {
     alert('pause');
document.getElementById('logind').innerHTML=xmlHttp.responseText;
 }   
    
    };

xmlHttp.send(params) ;
}
