


function logineq(){
user=document.getElementById("xlogin").us_.value;
pass=document.getElementById("xlogin").pw_.value;
if (user.length <3){alert("กรุณากรอก ชื่อเข้าใช้ให้ครบ !");}
else if (pass.length <3){alert("กรุณากรอก รหัส ให้ครบ !");}
else {loadlx1();}}


function loadlx1(onc,str){
var onc=onc;
var str1=str;
var uri="load_login.php";

form=document.getElementById("xlogin");

//document.getElementById("login").style.cursor= "wait";
//isc_hid("show_load1","F");

complete=loadlx1;
if (onc==null){isc_rxax(form,complete,uri);
//isc_dbfa(form,'T');


//alert(str);

}else if(onc=="1"){

var spstr = str.split('*|~');
var astr1= spstr[0];
var vs_name= spstr[1];
var vs_start= spstr[2];
var vs_id= spstr[3];
var vs_exp= spstr[4];
var vs_img= spstr[5];
var vs_email= spstr[6];

//document.getElementById("login").style.cursor= "";

if (astr1==1){


document.getElementById("x_pw").value="";


isc_dbfa(form,'F');
document.getElementById("eqh_login").style.display="none";
document.getElementById("eqh_member").style.display="block";
document.getElementById("eqh_member_t1").innerHTML=vs_name;
document.getElementById("eqh_member_t2").innerHTML="Join "+vs_start;
document.getElementById("eqh_spn1").innerHTML="ID : "+vs_id;
document.getElementById("eqh_spn2").innerHTML="Post : "+vs_exp;
document.getElementById("eqh_iconmem").src="icon/"+vs_img;
document.getElementById("xlogin").pw_.value="";



//document.getElementById("login").className = "idlogin2"; 

//isc_wdiv("login","<img alt=\"\" class=\"member_st\" src=\"icon/"+vs_img+"\" /><div class=\"member_st2\"><p class=\"mtextd1\">"+vs_name+"</p><p class=\"sstid1\">Join "+vs_start+"</p><p class=\"sstid1\">ID ("+vs_id+")</p><p class=\"sstid1\">Post ("+vs_exp+")</p></div><div class=\"m_edit_x\"><a class=\"b_editpf1\" href=\"?p=11\">Edit Profile</a>&nbsp;&nbsp;&nbsp;<span onclick=\"logoutax();\" class=\"b_logout1\">Logout</span></div>");
//document.getElementById("h_login").style.background = "url('images/head_user.gif')";
}


else if(astr1==5){alert("กรุณาลองใหม่");}
else if(astr1==2){alert("ชื่อเข้าใช้ หรือรหัสไม่ถูกต้อง");}
else if(astr1==3){alert("ไอดียังไม่ถูก ยืนยัน (active!)\n\nตรวจสอบได้ที่อีเมล์\n"+vs_email);}
else if(astr1==4){alert("ไอดีนี้ถูกระงับ การใช้งาน");}

if (astr1>1){

//isc_hid("show_load1","T");

isc_dbfa(form,'F');
document.getElementById("xlogin").pw_.value="";
document.getElementById("xlogin").us_.value="";
document.getElementById("xlogin").us_.focus();}
}}


function  f_login(){location.href="";}
function  logoutax (p) {
if (confirm("คุณ ต้องการออกจากระบบ หรือไม่")==true) {
document.cookie="eq_ck_vid=0";
document.cookie="eq_ck_key=0";
//document.getElementById("eqh_member").style.display="none";
//document.getElementById("eqh_login").style.display="block";
setTimeout("f_login()",10);
}return false;}
