function showOption()
{
if (document.all.opt.style.display == "none")
{
document.all.opt.style.display = "";
document.all.showopt.value = "1";
document.all.showoptbtn.value=" << 选项";

else 
{
document.all.opt.style.display = "none";
document.all.showopt.value = "";
document.all.showoptbtn.value="选项 >> ";
}
}function doReset()
{
document.all.username.value = "";
document.all.password.value = "";
document.all.username.focus();
}function doSubmit()
{
if(window.parent.showDiv == null){
//alert("请选择您要进入的模块.");
return false;
}
else{
verid.value = window.parent.showDiv.id;
}
var p1 = /^[0-9a-zA-Z]{1,16}$/;
var p2 = /^[0-9a-zA-Z]{1,16}$/;
if (document.all.username.value.length == 0)
{
//alert("用户名不能为空");
document.all.username.focus();
return false;
}
if (document.all.password.value.length == 0)
{
//alert("密码不能为空");
all.password.focus();
return false;
}
if(p1.test(document.all.username.value)==false)
{
//alert("用户名不正确");
document.all.username.focus();
document.all.username.select();
return false;
}
if(p2.test(document.all.password.value)==false)
{
//alert("密码不正确,只能是数字或字母!");
document.all.password.focus();
document.all.password.select();
return false;
}
return true;
}function setCookie(name,value,domain)
{
document.cookie = "[" + name + "]=" + escape(value) +";path=/"+ ((domain)?";domain="+domain:"")
}function getCookie(Name)
{
var search =  Name + "="
if (document.cookie.length > 0)
{
offset = document.cookie.indexOf(search);
if (offset != -1)
{
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1) 
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))

} return "";
}function PageLoad()
{ var issave   = getCookie("_issave");
var showopt  = getCookie("_showopt");
var username = getCookie("_savename");
var errormsg = '';

if (errormsg != "")
{
alert(errormsg);
} if (username != "")
{
document.all.username.value = username;
document.all.password.focus();
document.all.issave.checked = true;
}
else
{
document.all.username.focus();
} if (showopt != "")
{
document.all.opt.style.display = "";
document.all.showopt.value = "1";
document.all.showoptbtn.value = " << 选项";
}
}