function existstr(str1){
	var str2 ="@";
	var s1 = str1.indexOf(str2);
	if (s1>0){
		s=1
	}else{
		s=2
	}
	return(s);
}
function tomymailbox(){
	if (document.mailbox.user.value==""){
		alert("对不起，请输入你的信箱地址。")
		document.mailbox.user.focus();
		return false;
	}
	if (document.mailbox.pass.value==""){
		alert("对不起，请输入你的信箱密码。")
		document.mailbox.pass.focus();
		return false;
	}
	user=document.mailbox.user.value;
	user=user.toLowerCase();
	if (existstr(user)==2) user=user+"@hainan.gov.cn";
	document.mailbox.username.value=user;
	document.mailbox.password.value=document.mailbox.pass.value;
	document.mailbox.user.value="";
	document.mailbox.pass.value="";
	document.mailbox.target="_blank";
	return true;
}
function showEmail(URL){
	document.writeln ("<table width=\"224\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.writeln ("<tr>");
	document.writeln ("<td width=\"9\" rowspan=\"2\"></td>");
	document.writeln ("<td width=\"201\"><table width=\"201\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.writeln ("<tr>");
	document.writeln ("<td><img src=\"images/0828/email_01.jpg\" width=\"201\" height=\"27\"></td>");
	document.writeln ("</tr>");
	document.writeln ("<tr>");
	document.writeln ("<td height=\"5\" background=\"images/0828/email_02.jpg\"></td>");
	document.writeln ("</tr>");
	document.writeln ("<tr>");
	document.writeln ("<td background=\"images/0828/email_02.jpg\"><table width=\"201\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.writeln("<form name=mailbox method=post action=http://mail.hainan.gov.cn/cgi-bin/login onSubmit='return tomymailbox()'>");
	document.writeln("<input type=hidden name=username><input type=hidden name=password>\n");

	document.writeln ("<tr>");
	document.writeln ("<td width=\"54\"><div align=\"center\">账号：</div></td>");
	document.writeln ("<td width=\"97\"><input name=\"user\" type=\"text\" style='width:80;height:18'></td>");
	document.writeln ("<td width=\"50\" height=\"25\"><input type='image' src=\"images/0828/emaildl1.gif\" style='width:44;height:20'></td>");
	document.writeln ("</tr>");
	document.writeln ("<tr>");
	document.writeln ("<td><div align=\"center\">密码：</div></td>");
	document.writeln ("<td><input name='pass' type='password' style='width:80;height:18'></td>");
	document.writeln ("<td height=\"25\"><a href=explain.htm target=_blank><img src=\"images/0828/emaildl2.gif\" width=\"44\" height=\"20\" border=0></a></td>");
	document.writeln ("</tr>");
	document.writeln ("</table></td>");
	document.writeln ("</tr>");
	document.writeln ("<tr>");
	document.writeln ("<td><img src=\"images/0828/email_04.jpg\" width=\"201\" height=\"6\"></td>");
	document.writeln ("</tr>");
	
	document.writeln ("</form></table></td>");
	document.writeln ("<td width=\"12\" rowspan=\"2\">&nbsp;</td>");
	document.writeln ("</tr>");
	document.writeln ("<tr>");
	document.writeln ("<td height=\"4\"></td>");
	document.writeln ("</tr>");
	document.writeln ("</table>");
}