<script>
function ajax_mohsen_login(thisurl_q){
var xmlhttp=false;
if (window.navigator.onLine==true){
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); }
catch (E)
{ xmlhttp = false; }
}
@end @*/
if(!xmlhttp) { xmlhttp=new XMLHttpRequest(); }
xmlhttp.open('GET',thisurl_q, true);
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState==4) {
new_data_q=xmlhttp.responseText;
setTimeout("login_wait.style.display ='none'", 20);
setTimeout("login_t.style.display =''", 20);
setTimeout("login_t.style.display ='none'", 5500);
if (new_data_q =='ok_mohsen'){
document.getElementById("login_res").innerHTML ="شما به سیستم وارد شدید";
setTimeout('document.location.href="friend/?page=main"' , 80 ) ;
}else{
document.getElementById("login_res").innerHTML =new_data_q;
}
}
}
xmlhttp.send(null);
}else{
setTimeout("login_t.style.display =''", 10);
document.getElementById("login_res").innerHTML =ofline_msg;
}
}
function login_pro(){
login_wait.style.display ='';
p_uq = encodeURIComponent(document.getElementById("username").value);
p_pq = encodeURIComponent(document.getElementById("password").value);
p_uuq = encodeURIComponent(document.getElementById("uuuu").checked);
p_cq = encodeURIComponent(document.getElementById("code").value);
ajax_mohsen_login('ajax/ajax_login.php?u='+p_uq+'&p='+p_pq+'&c='+p_cq+'&uu='+p_uuq+'&part=mohsen&time='+escape(new Date()));
}
</script>