<script Language="JavaScript">
<!--
var g_mapPage=new Object();
g_mapPage["def"]="/zft/iFrame_login/login_mr.html";
g_mapPage["tradeManage.shtml"]="/zft/iFrame_login/login_jygl.html";
g_mapPage["modify_loginpwd.shtml"]="/zft/iFrame_login/login_szjbxx.html";
//----------------Form提交检查
function submitForm()
{
with (document.LoginForm)
{
// qq号检查
if (!checkUin(u.value))
{
alert("请输入一个有效的财付通帐户, 可以是QQ、Email");
u.focus();
return false;
}
g_CCookie.SetCookie("tryu",u.value, "", "/", "tenpay.com", "");
// 密码检查
if (blUsePasswdCol == 0) {
// 使用控件,不作任何检查
var seed = tm.value.substring(0, 20);;
var p1_ctrl = passwd;
// 获取密码1
p.value = getStrongPasswd(p1_ctrl, seed);
} else {
// 不使用控件
p.value = passwd.value;
}
// 验证码检查
if (verifycode.value.length != 4)
{
window.alert("请输入有效的附加码,填入右边图片的文字,且长度只能为4位");
verifycode.focus();
return false;
}
verifycode.focus();
}
// 提交form表单
//document.LoginForm.submit();
}
//----------------输入框中回车键处理函数
function dealKeyPress()
{
if(event.keyCode == 13)
{
submitForm();
}
}
function init()
{
with (document.LoginForm)
{
verifycode.value = "";
if(u.value.length<=0){
u.value=g_CCookie.GetCookie("tryu");
u.focus();;
}
verifycode.value="请输入下列字符,不分大小写";
}
//alert(GetCgiName());
var str=g_CSelfUrl.GetPara("u1");
if(str!="" && GetCgiName()!="tradeManageSU.shtml")
SetValueById("u1", str);
str=g_CSelfUrl.GetPara("u");
if(str!="")
SetValueById("u", str);
if(GetCgiName() == "re_reg.shtml")
SetValueById("suf", "1");
//拍拍简化注册用户
var p_suf=g_CSelfUrl.GetPara("p_suf")
if(p_suf&&p_suf!="")
{
SetValueById("p_suf", p_suf);
}
//ParseSubPage();
/*
var sCgiName = GetCgiName();
switch (sCgiName)
{
case "medi_gathering.shtml":
ShowElement("table_normal_tips", true);
ShowElement("table_medi_tips", false);
break;
default:
}
*/
g_CCookie.DelCookie("qlskey", "/", "www.tenpay.com");
g_CCookie.DelCookie("qluin", "/", "www.tenpay.com");
g_CCookie.DelCookie("qltn", "/", "www.tenpay.com");
g_CCookie.DelCookie("qluid", "/", "www.tenpay.com");
}
function GetCgiName()
{
var sDomin = g_CSelfUrl.GetPara("u1").replace(/#$/g, "").split("?")[0];
var arrPath = sDomin.split("/");
return arrPath[arrPath.length-1];
}
function ParseSubPage(){
var obj=document.getElementById("main");
if(obj){
var sUrl=g_mapPage[GetCgiName()];
if(!sUrl || sUrl=="")
sUrl=g_mapPage["def"];
obj.src=sUrl;
}
}
function GetSubPageName(){
var sUrl=g_mapPage[GetCgiName()];
if(!sUrl || sUrl=="")
sUrl=g_mapPage["def"];
return sUrl;
}
function FormSubmit()
{
if(submitForm())document.LoginForm.submit();
}
function verifyImgRefresh() {
var eleVerifyImg = document.getElementById("verify_img");
eleVerifyImg.src = "/cgi-bin/v1.0/getimage.cgi?aid=14000101&" + Math.random() + "\"";
document.LoginForm.verifycode.focus();
focusVerify();
}
function trim(content)
{
content = content.replace(/(^\s*)|(\s*$)/g, "");
return content;
}
function isEmpty(s)
{
return (s==null)||(s.length==0);
}
function focusVerify()
{
var vi = document.LoginForm.verifycode;
if(trim(vi.value)=='请输入下列字符,不分大小写')
{vi.value=''; vi.style.color="#000000";}
vi.select();
}
function blurVerify()
{
var vi= document.LoginForm.verifycode;
if(isEmpty(vi.value))
{vi.value='请输入下列字符,不分大小写'; vi.style.color="#a7a7a7";}
}
-->
</script>