/**************************************************************
frmLogin.js
	模块名称：综合服务登陆框架
	模块说明：在调用部位增加一个综合服务登录框
	使用方法：在需要调用本位置添加脚本路径，并且根据样式定义CSS样式 [<script src="../js/frmLogin.js"></script>]
	样式定义：.frmLogin 定义登录框table
			  .frmLogin btn 定义登录框按钮
			  其他根据情况定义，例如：.frmLogin td等
	定义变量：无
	设计开发：wfr
	框架形式：【
		<table class='frmLogin'>													//整体表格
			<form id='maillogin'>													//表单
				<tr><td><input type='text' class='ipt'></input></td></tr>		//输入框
				<tr><td><input type='button' class='btn'></input></td></tr>			//按钮
			</form>
		</table>
	】
Last Edit：2007/11/23
**************************************************************/

var mess_1="黄河科技学院电子邮局提醒您：\n\n┏━━━━━━━━━━━━━━━━━━━━━┓\n┃提示信息：您的登录请求被系统拒绝。        ┃\n┃                                          ┃\n┃错误原因：";
var mess_2="┃\n┗━━━━━━━━━━━━━━━━━━━━━┛\n\n黄河科技学院 现代教育技术中心 1999 - 2008";
var mess_3="黄河科技学院公文传输系统提醒您：\n\n┏━━━━━━━━━━━━━━━━━━━━━┓\n┃提示信息：您的登录请求被系统拒绝。        ┃\n┃                                          ┃\n┃错误原因：";
			function AddDomain() {
	if(document.maillogin.LoginName.value.indexOf("@") == -1)
	document.maillogin.LoginName.value = document.maillogin.LoginName.value + "@hhstu.edu.cn";
	if (document.maillogin.LoginName.value=="" && document.maillogin.Password.value=="") {
		alert(mess_1 + "请输入您的电子邮件用户名和密码。" + mess_2);
		maillogin.LoginName.focus();
		return false;
	}	
	if (document.maillogin.LoginName.value=="" || document.maillogin.LoginName.value.length<=13) {
		alert(mess_1 + "请输入您正确的电子邮件用户名。" + mess_2);
		return false;
	}
	if (document.maillogin.Password.value=="" || document.maillogin.Password.value.length<3) {
		alert(mess_1 + "请输入您正确的电子邮件密码。" + mess_2);
		maillogin.Password.focus();
		return false;
	}	
	document.maillogin.action="http://mail.hhstu.edu.cn/cgi-bin/login";
	document.maillogin.LoginName.name="LoginName"
	document.maillogin.Password.name="Password"
	document.maillogin.submit();
			}
function wfr_mail_wg()
{
	if (document.maillogin.LoginName.value=="" && document.maillogin.Password.value=="") {
		alert(mess_1 + "请输入您的电子邮件用户名和密码。" + mess_2);
		maillogin.LoginName.focus();
		return false;
	}	
	if (document.maillogin.LoginName.value=="") {
		alert(mess_1 + "请输入您正确的电子邮件用户名。" + mess_2);
		return false;
	}
	if (document.maillogin.Password.value=="") {
		alert(mess_1 + "请输入您正确的电子邮件密码。" + mess_2);
		maillogin.Password.focus();
		return false;
	}
	document.maillogin.action="http://gwmail.hhstu.edu.cn/php/user/user_login.php";
	document.maillogin.LoginName.name="user_id"
	document.maillogin.Password.name="user_pass"
	document.maillogin.submit();
}			function wfr_oa()
{
	if (document.maillogin.LoginName.value=="" && document.maillogin.Password.value=="") {
		alert(mess_3 + "请输入您的公文系统用户名和密码。" + mess_2);
		maillogin.LoginName.focus();
		return false;
	}	
	if (document.maillogin.LoginName.value=="" || document.maillogin.LoginName.value.length<=1) {
		alert(mess_3 + "请输入您正确的公文系统用户名。" + mess_2);
		return false;
	}
	if (document.maillogin.Password.value=="" || document.maillogin.Password.value.length<3) {
		alert(mess_3 + "请输入您正确的公文系统密码。" + mess_2);
		maillogin.Password.focus();
		return false;
	}
	document.maillogin.action="http://oa.hhstu.edu.cn/default.asp";
	document.maillogin.LoginName.name="username"
	document.maillogin.Password.name="password"
	document.maillogin.submit();
}
document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" class=\"frmLogin\">");
document.writeln("<form method=\"post\" action=\"http:\/\/202.197.208.13\/cgi-bin\/login\" name=\"maillogin\">");
document.writeln("  <tr>");
document.writeln("    <td align=\"center\" valign=\"middle\">用户名:");
document.writeln("    <input name=\"LoginName\" type=\"text\" id=\"ipt_login_yhm\" size=\"12\" class=\"ipt\" \/><\/td>");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td align=\"center\" valign=\"middle\">密&nbsp;&nbsp;码:");
document.writeln("    <input name=\"Password\" type=\"password\" id=\"ipt_login_mm\" size=\"12\" class=\"ipt\" \/><\/td>");
document.writeln("  <\/tr>");
document.writeln("  <tr>");
document.writeln("    <td> <input name=\"log\" id=\"btn_yx\" type=\"button\" class=\"btn\" value=\"邮箱\" onClick=\"AddDomain();\"> <input name=\"wg\" id=\"btn_wg\" type=\"button\" class=\"btn\" value=\"网关\" onClick=\" wfr_mail_wg();\"> <input name=\"oa\" id=\"btn_oa\" type=\"button\" class=\"btn\" value=\"ＯＡ\" onClick=\"wfr_oa();\"> <input type=\"reset\" id=\"btn_cx\" class=\"btn\" value=\"重写\"><\/td>");
document.writeln("  <\/tr>");
document.writeln("<\/form>");
document.writeln("<\/table>");