function openHtml(theVal){ 
	if(theVal == 'hdgg'){
		document.getElementById('reporterinfoTr').src = 'reporter_announcement.asp';
	}else if (theVal=='zxtg'){
 		document.getElementById('reporterinfoTr').src = 'reporter_contribute.asp';
 	}else if (theVal == 'jzly'){
 		document.getElementById('reporterinfoTr').src = 'reporter_guestbook.asp';
 	}else if(theVal =='regist'){ 
 		parent.document.getElementById('reporterinfoTr').src = 'reporter_regist.asp';
 	}  
} 
/**
*/
function CheckForm()
{
	if(document.loginFm.reporterId.value=="")
	{
		alert("请输入用户名！");
		document.loginFm.reporterId.focus();
		return false;
	}
	if(document.loginFm.Password.value == "")
	{
		alert("请输入密码！");
		document.loginFm.Password.focus();
		return false;
	}
	if (document.loginFm.CheckCode.value==""){
       alert ("请输入您的验证码！");
       document.loginFm.CheckCode.focus();
       return(false);
    }
}
function changUrl(){
	var sessionIdVal = document.Login.sessionId.value;
	if (sessionIdVal != null && sessionIdVal != ""){
		parent.document.getElementById('reporterinfoTr').src = 'reporter_announcement.asp';
	} 
} 
function check(){
	if(document.form1.reporterid.value==""){
      alert("用户名不能为空！");
	  document.form1.reporterid.focus();
      return false;
    }
	
   if(document.form1.password.value==""){
      alert("密码不能为空！");
	  document.form1.password.focus();
      return false;
    } 
  if((document.form1.password.value)!=(document.form1.PwdConfirm.value)){
      alert("初始密码与确认密码不同！");
	  document.form1.PwdConfirm.select();
	  document.form1.PwdConfirm.focus();	  
      return false;
    }
   if(document.form1.age.value != "" && isNaN(document.form1.age.value)) {
       alert("年龄只能是数字！");
	  document.form1.age.focus();
      return false; 
   } 
   if (parseInt(document.form1.age.value) > 99 || parseInt(document.form1.age.value) < 1){
      alert("年龄只能是数字0-99！");
	  document.form1.age.focus();
      return false;  
   }  
   if ((document.form1.email.value=="")||(document.form1.email.value.indexOf ("@")==-1)||(document.form1.email.value.indexOf (".")==-1)){
		alert ("\请输入正确的邮件地址!!")
		return false;
	} 
   if(document.form1.sex.value==""){
      alert("性别不能为空！");
	  document.form1.sex.focus();
      return false;
    }
   if(document.form1.college.value==""){
      alert("学院不能为空！");
	  document.form1.college.focus();
      return false;
    }
   if(document.form1.professional.value==""){
      alert("专业不能为空！");
	  document.form1.professional.focus();
      return false;
    }			
	return true;
}