var p_default_root_url = "http://service.958shop.com/"; function is_login(){ var status = "0"; if(status=="1") return true; else return false; } function get_uid(){ var uid = "0"; return uid; } function get_ua(){ var ua = ""; return ua; } function get_rolename(){ var rolename = ""; return rolename; } function get_fortune(){ var fortune = ""; return fortune; } function get_exp(){ var exp = ""; return exp; } function get_usertype(){ var usertype = ""; return usertype; } function getvistorinfo(){ var vistorinfo = ""; return vistorinfo; } //注册 function ToReg(){ window.location.href = 'http://reg.958shop.com/reg.html'; } //取回密码 function ToGetPass(){ window.location.href = 'http://reg.958shop.com/password/?action=getpass'; } function setCookie(name,value,time){ //time:以小时为单位 var exp = new Date(); if(time != undefined) exp.setTime(exp.getTime() + 60*60*1000*parseInt(time)); else exp.setTime(exp.getTime() + 60*60*1000); document.cookie = name + "="+ escape(value) +";expires="+ exp.toGMTString(); } function getCookie(name){ var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); if(arr != null) return unescape(arr[2]); return null; } function toLoginout(type){ submited = false; oo("login").style.display = "none"; oo("nologin").style.display = ""; var params = new Array(); params[0] = new Array("",""); var result = postPageData(p_default_root_url + "Ajax/Ajax_Common.aspx?Module=LOGINOUT", "POST", params); } var submited = false; function ToLogin(type){ var txtUA; if(oo("txtUA")==null) txtUA = oo("Login1_txtUA"); else txtUA = oo("txtUA"); var txtPWD; if(oo("txtPWD")==null) txtPWD = oo("Login1_txtPWD"); else txtPWD = oo("txtPWD"); if (!submited){ if(getCookie('UserLoginNum') != null && parseInt(getCookie('UserLoginNum')) == 3){ window.location = "http://reg.958shop.com/?ref_url=" + escape(window.location.href); return false; } var strUA = txtUA.value.trim(); if (strUA == ""){ alert("请填写登录用户名。"); txtUA.focus(); return false; } var strPWD = txtPWD.value.trim(); if (strPWD == ""){ alert("请填写登录密码。"); txtPWD.focus(); return false; } var params = new Array(); params[0] = new Array("UA", escape(strUA)); params[1] = new Array("PWD",strPWD); var result = postPageData(p_default_root_url + "Ajax/Ajax_Common.aspx?Module=TOLOGIN", "POST", params); if(getResultCode(result) == SUCC_COMPLETE){   var ua = getResultParameter(result,"ua");   var uid = getResultParameter(result,"uid");   var rolename = getResultParameter(result,"role");   var fortune = getResultParameter(result,"fortune");   var exp = getResultParameter(result,"exp");   if(typeof(return_url) !='undefined' && return_url.length > 0){     window.location = return_url;   }   oo("login").style.display = "";   oo("span_ua").innerHTML = ""+ ua +" ! ";   oo("nologin").style.display = "none";   txtUA.value = "";   txtPWD.value = "";   submited = true;   }else{ if(getCookie('UserLoginNum') == null) setCookie('UserLoginNum',1); else setCookie('UserLoginNum',parseInt(getCookie('UserLoginNum')) + 1); alert("对不起,您的帐号或者密码错误,登录失败。"); return; } }else{ alert('请勿重复提交请求'); return false; } } function init_login_status(){ try{ if(is_login()){ if(oo("login") != null) oo("login").style.display = ""; if(oo("nologin") != null) oo("nologin").style.display = "none"; if(oo("span_ua") != null) oo("span_ua").innerHTML = ""+ get_ua() +" ! "; }else{ if(oo("login") != null) oo("login").style.display = "none"; if(oo("nologin") != null) oo("nologin").style.display = ""; if(oo("span_ua") != null) oo("span_ua").innerHTML = ""; } }catch(e){ if(oo("login") != null) oo("login").style.display = "none"; if(oo("nologin") != null) oo("nologin").style.display = ""; if(oo("span_ua") != null) oo("span_ua").innerHTML = ""; } } function copySss(){ var clipBoardContent="百信手机网 - 手机行情、手机导购,http://sc.958shop.com" window.clipboardData.setData("Text",clipBoardContent); alert("已经成功复制链接,赶快粘贴到QQ/MSN发送给你的好友吧!"); }