<!--
//邮箱登录CHK JS
function check(input){
if(input.mailSelect.options.selectedIndex==0){
alert("请选择您使用的邮箱。");
return false;}
if(input.name.value==""){
alert("请输入正确的用户名和密码。");
input.name.focus();
return false;}
if(input.password.value=="" || input.password.value.length<3){
alert("请输入正确的用户名和密码。");
input.password.focus();
return false;}
else{go();
return false;}}

//邮箱登录URL获取JS
function makeURL(){   
var objForm=document.mailForm;   
var intIndex=objForm.mailSelect.options.selectedIndex;   
var varInfo=objForm.mailSelect.options[intIndex].value;    /*获取的表单中邮件服务器及用户账号和密码信息*/   
var arrayInfo=varInfo.split(';');    /*将以上获取的信息进行分割，并赋给数组变量*/   
var strName=objForm.name.value,varPasswd=objForm.password.value;   
var length=arrayInfo.length,strProvider=arrayInfo[0],strIdName=arrayInfo[1],varPassName=arrayInfo[2];   
if(length==3){   
var strUrl=strProvider+'?'+strIdName+'='+strName+'&'+varPassName+'='+varPasswd;    /*合并字符串，得到形如“http://mail.sina.com.cn/cgi-bin/log...”的字符串型URL*/   
}
else{
if(arrayInfo[3]=='suffix') strName+='@'+arrayInfo[4]
var strUrl='<form name="tmpForm" action="'+strProvider+'" method="post"><input type="hidden" name="'+strIdName+'" value="'+strName+'"><input type="hidden" name="'+varPassName+'" value="'+varPasswd+'">';   
if(arrayInfo[3]=='hidden') strUrl+='<input type="hidden" name="'+arrayInfo[4]+'" value="'+arrayInfo[5]+'">'
strUrl+='</form>';   
}
return strUrl; 
}

//邮箱登录JS
function go(){   
var strLocation=makeURL();   
if(strLocation.indexOf('<form name="tmpForm"')!=-1){/*对于只能用“post”来获取表单数据的邮箱使用自动提交的临时表单*/   
outWin=window.open('','','scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes');   
doc=outWin.document;   
doc.open('text/html');   
doc.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>邮箱登录</title></head><body onload="document.tmpForm.submit()">');   
doc.write('<p align="center" style="font-size: 14px; color: #FF0000">欢迎使用1Wang.com.cn电子邮局快速登录系统，请稍候......</p>'+strLocation+'</body></html>');   
doc.close();   
}
else window.open(strLocation,'','scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes');   
}

//首页密码框清除JS
function ClearPass(){
document.mailForm.password.value="";
document.loginForm.password.value="";
}

//调用新窗口JS
function News_Window(theURL,winName,features) {
window.open(theURL,winName,features);
}

//搜索
function search4()
{if(form1.abc0.checked)
window.open("http://search.sina.com.cn/cgi-bin/search/search.cgi?_searchkey="+form1.key.value,"mspg0");
if(form1.abc1.checked)
window.open("http://site.search.sohu.com/sitesearch.jsp?page_index=0&key_word="+form1.key.value,"mspg1");
if(form1.abc2.checked)
window.open("http://cn.search.yahoo.com/search/cn?p="+form1.key.value,"mspg2");
if(form1.abc3.checked)
window.open("http://www.skycn.com/search.php?sor=00&ss_name="+form1.key.value,"mspg3");
if(form1.abc4.checked)
window.open("http://www.google.com/search?hl=zh-CN&inlang=zh-CN&ie=GB2312&oe=GB2312&q="+form1.key.value,"mspg4");
if(form1.abc5.checked)
window.open("http://search.yahoo.com/bin/search?p="+form1.key.value,"mspg5");
if(form1.abc6.checked)
window.open("http://www.baidu.com/s?tn=sitehao123&word="+form1.key.value,"mspg6");
if(form1.abc7.checked)
window.open("http://mp3search.baidu.com/wstsearch?tn=baidump3&ct=134217728&lm=-1&rn=&word="+form1.key.value,"mspg7");
if(form1.abc8.checked)
window.open("http://search.sogua.com/search/search.asp?fmp3=1&frm=1&fwma=1&fasf=1&go.x=25&go.y=19&key="+form1.key.value,"mspg8");
if(form1.abc9.checked)
window.open("http://mp3search.baidu.com/wstsearch?tn=baidump3lyric&ct=150994944&lm=-1&rn=&word="+form1.key.value,"mspg9");
if(form1.abc10.checked)
window.open("http://pic.sina.com.cn/cgi-bin/retr/search?query="+form1.key.value,"mspg10");
if(form1.abc11.checked)
window.open("http://www.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&word="+form1.key.value,"mspg11");
if(form1.abc12.checked)
window.open("http://bingle.pku.edu.cn/scripts/ftp_search.exe?cdtype=GB&word="+form1.key.value,"mspg12");
//if(form1.abc13.checked)
//window.open("http://flash.zhongsou.com/zsflash.cgi?myselectvalue=2&tn=flash&ct=33554432&lm=&word="+form1.key.value,"mspg13");
if(form1.abc13.checked)
window.open("http://www.yisou.com/search?p="+form1.key.value,"mspg14");return false;}

//1WANG后台定制系统登录
function loginCheck(input){
	if(input.username.value==""){
		alert("请输入正确的用户名和密码!");
		input.username.focus();
		return false;
	}
	if(input.password.value==""){
		alert("请输入正确的用户名和密码!");
		input.password.focus();
		return false;
	}
	//else{
	//alert("正在登录系统，请稍后...");
	//return false;
	//document.loginForm.submit();
	//window.open("http://localhost:8080/Controller/UserCtrl?action=login");
	//}
	//return false;
}
//-->