function Display(o1,o2,o3,o4)
{
    document.getElementById(o1).style.display="none";
    document.getElementById(o2).style.display="block";
    document.getElementById(o3).className="A3";
    document.getElementById(o4).className="A4";
}


/*


function GetParentByTagName(element,tagName)  
{
    var parent=element.parentNode;
    var upperTagName=tagName.toUpperCase();
    //如果这个元素还不是想要的tag就继续上溯
    while(parent&&(parent.tagName.toUpperCase()!=upperTagName))  
    {
        parent=parent.parentNode?parent.parentNode:parent.parentElement;
    }
    return parent;
}

function AddClass(x)
{

    try
    {
        var arrTr=$("list").getElementsByTagName("tr");
        var nodes = $A(arrTr);
            nodes.each(function(node){
            var td=node.firstChild;
           
            if(td.name=="sub")
            {
                 Element.removeClassName(td,"pic4");
                 Element.removeClassName(td,"pic5"); 
                
            }
            else
            {
                Element.removeClassName(td,"pic4");
                Element.addClassName(td,"pic5");
            }
            }); 
            
                     
//            var subtable=$A(document.getElementsByTagName("table"));alert(subtable.length);
//            subtable.each(
//                function(table)
//                {
//                alert(table.name);
//                   
//                    if(table.name&&table.id!="list")
//                    {
//                        var tdNode=$A($(table).getElementsByTagName("td"));
//                        tdNode.each(
//                            function(td)
//                            {
//                                Element.removeClassName(td,"pic4");
//                                Element.addClassName(td,"pic5");
//                             }
//                             );
//                      }
//                  }
//                 );
           
        }
        catch(e)
        {
        }
        
         Element.removeClassName(x,"pic5");
         Element.addClassName(x,"pic4");   
}
     
function Addhash(o)
{
    document.location.hash+="#"+o;
}

*/

/**********************************************************************************************************/


/*
var id=2; 
var jyid=2;
var num;  
function bb()
{
    var string="<TABLE style='WIDTH: 100%'><TBODY> <TR><TD width='21%'>工作经验："+ id+"</TD> </TR>     <TR>     <TD style='WIDTH: 15%'>任职时间： </TD><TD colspan='3' align=left><INPUT class='input_hr' style='WIDTH: 30%'   name='1'>---<INPUT class='input_hr' style='WIDTH: 30%'  name='1'> </TD></TR>  <TR><TD>公司： </TD>  <TD colspan='3'><INPUT class=input_hr style='WIDTH: 95%'     name='1'></TD></TR>          <TR>       <TD> 部门：</TD> <TD width='26%'><input type='text' name='1' class='input_hr'></TD>   <TD width='14%'>职位： </TD>            <TD width='39%'><input type='text' name='1' class='input_hr'></TD>       </TR>    <TR>     <TD>职责： </TD>   <TD><input type='text' name='1' class='input_hr'></TD>      <TD>业绩： </TD>  <TD><input type='text' name='1' class='input_hr'></TD>        </TR>      <TR>       <TD>&nbsp;</TD>  <TD colspan='3'>&nbsp;</TD></TR>       <TR>  <TD>证明人及职位,联系方式 </TD>        <TD colspan='3'><INPUT class='input_hr' style='WIDTH: 95%' name='1'>  </TD></TR>   <TR> <TD><INPUT style='WIDTH: 0px; HEIGHT: 0px' value=|  name='1' class='input_hr'></TD></TR></TBODY></TABLE>";
    var obj=document.getElementById("name");
    var html=obj.innerHTML;
    obj.innerHTML=html+string;
    id=id+1;
}

function ee()
{
    var string="<TABLE style='WIDTH: 100%'>  <TBODY>       <TR>      <TD width='21%'>教育经历 "+jyid+"</TD></TR>         <TR>      <TD style='WIDTH: 15%'>时间 </TD>              <TD colspan='3' align=left><INPUT class='input_hr' style='WIDTH: 30%'           name='2'>---<INPUT class='input_hr' style='WIDTH: 30%'    name='2'> </TD></TR>    <TR>    <TD>学校： </TD>    <TD width='24%'><input type='text' name='2'></TD>    <TD width='16%'><span style='WIDTH: 101px; HEIGHT: 26px'>专业：</span></TD>        <TD width='39%'><input class='input_hr' type='text' name='2'></TD>    </TR>  <TR>  <TD>成绩： </TD>    <TD><input type='text' class='input_hr' name='2'></TD>      <TD><span style='WIDTH: 101px; HEIGHT: 26px'>学历：</span></TD>   <TD><input type='text' class='input_hr' name='2'></TD>     </TR>     <TR> <TD><INPUT style='WIDTH: 0px; HEIGHT: 0px' value=|    name=2></TD></TR></TBODY></TABLE>";
    var obj=document.getElementById("jiaoyu");  var html=obj.innerHTML;
   obj.innerHTML=html+string;
   jyid=jyid+1;
    
   
  }
  function cc()
  {
    alert(num);
    document.form1.action("cr_table.aspx");
    document.form1.submit();
     
  }
  function chkdate(datestr)
{
 var lthdatestr
 if (datestr != "")
  lthdatestr= datestr.length ;
 else
  lthdatestr=0;
  
 var tmpy="";
 var tmpm="";
 var tmpd="";
 //var datestr;
 var status;
 status=0;
 if ( lthdatestr== 0)
  return 0


 for (i=0;i<lthdatestr;i++)
 { if (datestr.charAt(i)== '-')
  {
   status++;
  }
  if (status>2)
  {
   //alert("Invalid format of date!");
   return 0;
  }
  if ((status==0) && (datestr.charAt(i)!='-'))
  {
   tmpy=tmpy+datestr.charAt(i)
  }
  if ((status==1) && (datestr.charAt(i)!='-'))
  {
   tmpm=tmpm+datestr.charAt(i)
  }
  if ((status==2) && (datestr.charAt(i)!='-'))
  {
   tmpd=tmpd+datestr.charAt(i)
  }

 }
 year=new String (tmpy);
 month=new String (tmpm);
 day=new String (tmpd)
 //tempdate= new String (year+month+day);
 //alert(tempdate);
 if ((tmpy.length!=4) || (tmpm.length>2) || (tmpd.length>2))
 {
  //alert("Invalid format of date!");
  return 0;
 }
 if (!((1<=month) && (12>=month) && (31>=day) && (1<=day)) )
 {
  //alert ("Invalid month or day!");
  return 0;
 }
 if (!((year % 4)==0) && (month==2) && (day==29))
 {
  //alert ("This is not a leap year!");
  return 0;
 }
 if ((month<=7) && ((month % 2)==0) && (day>=31))
 {
  //alert ("This month is a small month!");
  return 0;
 
 }
 if ((month>=8) && ((month % 2)==1) && (day>=31))
 {
  //alert ("This month is a small month!");
  return 0;
 }
 if ((month==2) && (day==30))
 {
  //alert("The Febryary never has this day!");
  return 0;
 }
 
 return 1;
}
  
 function checkId(pId){

    var arrVerifyCode = [1,0,"x",9,8,7,6,5,4,3,2];
    var Wi = [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];
    var Checker = [1,9,8,7,6,5,4,3,2,1,1];

    if(pId.length != 15 && pId.length != 18)    return "0";

    var Ai=pId.length==18 ?  pId.substring(0,17)   :   pId.slice(0,6)+"19"+pId.slice(6,16);

    if (!/^\d+$/.test(Ai))  return "0";

    var yyyy=Ai.slice(6,10) ,  mm=Ai.slice(10,12)-1  ,  dd=Ai.slice(12,14);

    var d=new Date(yyyy,mm,dd) ,  now=new Date();
     var year=d.getFullYear() ,  mon=d.getMonth() , day=d.getDate();

    if (year!=yyyy || mon!=mm || day!=dd || d>now || year<1940) return "0";

    for(var i=0,ret=0;i<17;i++)  ret+=Ai.charAt(i)*Wi[i];    
    Ai+=arrVerifyCode[ret %=11];     

    return pId.length ==18 && pId != Ai?"0":"1";        
};
function chkemail(a)
{ var i=a.length;
 var temp = a.indexOf('@');
 var tempd = a.indexOf('.');
 if (temp > 1) {
  if ((i-temp) > 3){
   
    if ((i-tempd)>0){
     return 1;
    }
   
  }
 }
 return 0;
}
 

  function checkSubmit() 
{ 
if ((document.form1.textname.value)=='') 
{ 
window.alert ('姓名必须填写'); 
document.form1.textname.select(); 
document.form1.textname.focus(); 
return false; 
} 
else if ((document.form1.textpersoncarder.value)=='') 
{ 
window.alert ('身份证号码必须填写'); 
document.form1.textpersoncarder.select(); 
document.form1.textpersoncarder.focus(); 
return false; 
} else if(checkId(document.form1.textpersoncarder.value)==0)
{
 window.alert ('请填写正确的身份证号码'); 
document.form1.textpersoncarder.select(); 
document.form1.textpersoncarder.focus(); 
return false; 
}
else if ((document.form1.textaddress.value)=='') 
{ 
window.alert ('户口所在地必须填写'); 
document.form1.textaddress.select(); 
document.form1.textaddress.focus(); 
return false; 
} 
 else if ((document.form1.textteleph.value)=='') 
{ 
window.alert ('联系电话必须填写'); 
document.form1.textteleph.select(); 
document.form1.textteleph.focus(); 
return false; 
}
 else if ((document.form1.textemail.value)=='') 
{ 
window.alert ('Email必须填写'); 
document.form1.textemail.select(); 
document.form1.textemail.focus(); 
return false; 

}
  else if(chkemail(document.form1.textemail.value)==0)
  {
    window.alert ('不是正确的Email'); 
   document.form1.textemail.select(); 
  document.form1.textemail.focus(); 
  return false; 
  }
 else if ((document.form1.textschool.value)=='') 
{ 
window.alert ('毕业学校必须填写'); 
document.form1.textschool.select(); 
document.form1.textschool.focus(); 
return false; 
}
 else if ((document.form1.textschooltime.value)=='') 
{ 
window.alert ('毕业时间必须填写'); 
document.form1.textschooltime.select(); 
document.form1.textschooltime.focus(); 
return false; 
}
 else if(chkdate(document.form1.textschooltime.value)==0)
 {
 window.alert ('毕业时间格式不正确'); 
 document.form1.textschooltime.select(); 
document.form1.textschooltime.focus();
  return false;
 }
else if ((document.form1.textzhuanye.value)=='') 
{ 
window.alert ('所学专业必须填写'); 
document.form1.textzhuanye.select(); 
document.form1.textzhuanye.focus(); 
return false; 
}else if ((document.form1.textmoney.value)=='') 
{ 
window.alert ('期望月薪地必须填写'); 
document.form1.textmoney.select(); 
document.form1.textmoney.focus(); 
return false; 
} 
else 
return true; 

} 
*/
