﻿    ///////////////////////////////////////////////////////////////////////
    //显示
    function P_objshow(obj)
    {
       obj.style.display ="inline";
    }
    
    //隐藏
    function P_objhide(obj)
    {
       obj.style.display="none";
    }
    
    
    
     ///////////////////////////////////////////////////////////////////////
     //选中所有复选框
     function selectAll(obj)
     {
        var allInput = document.getElementsByTagName("input");
        //alert(allInput.length);
        var loopTime = allInput.length;
        for(i = 0;i < loopTime;i++)
        {
            //alert(allInput[i].type);
            if(allInput[i].type == "checkbox")
            {
                allInput[i].checked = obj.checked;
            }
        }
    }
    
    //删除
    function judgeSelect()
    {  
        var result = false;
        var allInput = document.getElementsByTagName("input");
        var loopTime = allInput.length;
        for(i = 0;i < loopTime;i++)
        {
            if(allInput[i].checked)
            {
            result = true;
            break;
            }
        }
        if(!result)
        {
            alert("请先选则要删除的记录！");
            return result;
        }
        result = confirm("你确认要删除选定的记录吗？");
        return result;
    }
    ///////////////////////////////////////////////////////////////////////
   
    ///////////////////////////////////////////////////////////////////////注册第三步    
    //项目经验是否IT
    function P_ShowIT(obj,objname)
    {
        var ititem = document.getElementById(objname);
        if(obj.checked)
            P_objshow(ititem);
        else
        	P_objhide(ititem);
    }
    
    //项目删除
    function P_ItemDel()
    {
      
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_Project_Item2")
        P_objhide(obj);
    }
    
    //项目添加
    function P_ItemAdd()
    {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_Project_Item2")
        P_objshow(obj);        
    }
    
    //团队管理经验删除
    function P_TeamDel()
    {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_Team_item2")
        P_objhide(obj);        
    }
        
    //团队管理经验添加
    function P_TeamAdd()
    {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_Team_item2")
        P_objshow(obj);        
    }
    
    //验证项目名称2
   function P_VProjectName2Span()
   {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_ProjectName2");
        if(!P_VText(obj))
        {
            ProjectNameSpan.innerText = "请输入.";
            return false; 
        } 
        else
          {
           ProjectNameSpan.innerText="";
          return true;
          }
           return true;
   }    
   
   //项目时间1
   function P_VInfo3workyear21Span()
   {  
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_workyear21");
        if(!isDate(obj))
        {
            workyear21Span.innerText="请输入 yyyy-mm-dd格式.";
            return false;
        }
        else
        {
           workyear21Span.innerText="";
           return true;
        }    
         return true;   
   }
   
   //项目时间2
   function P_VInfo3workyear22Span()
   {  
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_workyear22");
        if(!isDate(obj))
        {
            workyear22Span.innerText="请输入 yyyy-mm-dd格式.";
            return false;
        }
        else
        {
           workyear22Span.innerText="";
           return true;
        }    
         return true;   
   }
   
   //公司名称2
   function P_VInfo3CompanyNameSpan()
   {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_ProjectName2");
        if(!P_VText(obj))
        {
            CompanyNameSpan.innerText = "请输入.";
            return false; 
        } 
        else
          {
           CompanyNameSpan.innerText="";
          return true;
          }
           return true;
   }    
   
   
     //汇报对象1
   function P_VInfo3ReportObjSpan()
   {
          var obj1 = document.getElementById("ctl00_ContentPlaceHolder1_ReportObj");
          var obj2 = document.getElementById("ctl00_ContentPlaceHolder1_ReportObjName");
          if(obj1.options[obj1.selectedIndex].text=="请选择")
          {      
              ReportObjSpan.innerText= "请选择或输入汇报对象";
                    return false;
          }
          else if(obj1.options[obj1.selectedIndex].text=="自定义"&!P_VText(obj2))
          { 
               ReportObjSpan.innerText= "请选择或输入汇报对象";
                return false;
          }
          else
          { 
              ReportObjSpan.innerText="";
              return true;               
          }       
           return true;
   }    
   
   //汇报对象2
   function P_VInfo3ReportObj2Span()
   {   
          var obj1 = document.getElementById("ctl00_ContentPlaceHolder1_ReportObj2");
          var obj2 = document.getElementById("ctl00_ContentPlaceHolder1_ReportObjName2");      
          if(obj1.options[obj1.selectedIndex].text=="请选择")
          {
               ReportObjSpan2.innerText= "请选择或输入汇报对象";
               return false;
          }
          else if(obj1.options[obj1.selectedIndex].text=="自定义"&P_VText(obj2))
          {
               ReportObjSpan2.innerText= "请选择或输入汇报对象";
                return false;    
          }
          else
          { 
               ReportObjSpan2.innerText="";
                  return true;                
          }
           return true;
   }    
   
   //业绩2
   function P_VInfo3PerformanceSpan()
   {   
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_Performance2");
        if(!P_VText(obj))
        {
            PerformanceSpan.innerText = "请输入.";
            return false; 
        } 
        else
          {
           PerformanceSpan.innerText="";
          return true;
          }
           return true;
   }    
//   
//   function P_VInfo3OnSubmit(obj)
//   {
//     
//     WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(obj.id, "", true, "", "", false, false));
//         var succeed = true;
//        if(ctl00_ContentPlaceHolder1_Project_Item2.style.display == "inline")
//        {
//            if(!P_VProjectName2Span()|!P_VInfo3workyear21Span()|!P_VInfo3workyear22Span())
//                 suucce = false;    
//        }
//        if(ctl00_ContentPlaceHolder1_Team_item2.style.display == "inline")
//        {
//             if(!P_VInfo3CompanyNameSpan()|!P_VInfo3PerformanceSpan()|!P_VInfo3ReportObj2Span())
//                 suucce = false; 
//        }
//       succeed =  P_VInfo3ReportObjSpan();
//       return succeed&WebForm_OnSubmit();
//   }
    
   
   //提交按钮
   function P_VInfo3ButSubmit(obj)
   {  

      var succeed = true;
        if(ctl00_ContentPlaceHolder1_Project_Item2.style.display == "inline")
        {
            if(!P_VProjectName2Span()|!P_VInfo3workyear21Span()|!P_VInfo3workyear22Span())
                 suucce = false;    
        }
        if(ctl00_ContentPlaceHolder1_Team_item2.style.display == "inline")
        {
             if(!P_VInfo3CompanyNameSpan()|!P_VInfo3PerformanceSpan()|!P_VInfo3ReportObj2Span())
                 suucce = false; 
        }
        WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(obj.id, "", true, "", "", false, false));
        if(succeed&P_VInfo3ReportObjSpan())
        {
              //document.forms[0].submit();`
        }
   }   
   ///////////////////////////////////////////////////////////////////////
    
    
    ///////////////////////////////////////////////////////////////////////
    //注册条款同意
    function accede(obj)
    {
       document.getElementById("ctl00_ContentPlaceHolder1_ButReg").disabled = !obj.checked;
    }
    
    //简历投递禁止求职信
    function showLetselect(obj)
    {
       document.getElementById("ctl00_ContentPlaceHolder1_drl_CoverLetter").disabled = !obj.checked;
    }
    ///////////////////////////////////////////////////////////////////////
    
    ///////////////////////////////////////////////////////////////////////简历注册第一步    //添加联系方式
    function P_showDiv(obj)
    {
      obj1 =  document.getElementById("trContact1");
      obj2 = document.getElementById("trContact2");
      if(obj1.style.display == "inline")
      {
           obj2.style.display="inline";
           obj2.childNodes[2].childNodes[0].style.display = "inline";          
      }    
      else if(obj2.style.display == "inline")
      {
           obj1.style.display="inline";
           obj1.childNodes[2].childNodes[0].style.display = "inline"; 
      }
      else
      {
            obj1.style.display="inline";
           obj1.childNodes[2].childNodes[0].style.display = "inline"; 
      }
    }
    
    //删除联系方式
    function P_DelDiv(obj)
    {     
      obj.parentElement.parentElement.parentElement.style.display = "none"; 
      obj.parentElement.children[1].value ="";
    }
    
     //所有自定义或其他标题    
    function P_CustomTitel(obj)
    {                 
        var csstext;
        if(obj.options[obj.selectedIndex].text=="自定义" | obj.options[obj.selectedIndex].text=="其他")
            csstext="DISPLAY: inline";
        else
        {
            csstext="DISPLAY: none ";
            obj.parentElement.children[1].value ="";
        }
        obj.parentElement.children[1].style.cssText=csstext;
    }
    
    ///////////////////////////////////////////////////////////////////////
    
    ///////////////////////////////////////////////////////////////////////简历注册第二步
    //增加工作经验
    function P_WorkAdd()
    {        
        workobj = document.getElementById("ctl00_ContentPlaceHolder1_Work_Item2");
        var hidden = document.getElementById("ctl00_ContentPlaceHolder1_HiItem");
        hidden.value="1";  
        P_objshow(workobj);
    }    
    
    //删除工作经验
    function P_WrokDel(obj)
    {
        workobj = document.getElementById("ctl00_ContentPlaceHolder1_Work_Item2");
        var hidden = document.getElementById("ctl00_ContentPlaceHolder1_HiItem");
        hidden.value="0";         
        P_objhide(workobj);
    }
    
    //删除语言
    function P_languageDel(obj)
    {
        langobj = document.getElementById("ctl00_ContentPlaceHolder1_language_item2");
        var hidden = document.getElementById("ctl00_ContentPlaceHolder1_Hilang");
        hidden.value="0"; 
        P_objhide(langobj);
    }
    
    //增加语言
    function P_languageAdd()
    {        
        langobj = document.getElementById("ctl00_ContentPlaceHolder1_language_item2");
        var hidden = document.getElementById("ctl00_ContentPlaceHolder1_Hilang");
        hidden.value="1"; 
        P_objshow(langobj);
    } 
   
      //日期验证
      function isDate(obj)
      {
     // debugger;
        var str = obj.value;
        if(str.length!=0)
        { 
             var reg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/;     
             var r = str.match(reg);     
             if(r==null)    
                return false;
         }
         else
         return false;
         return true;
     }
     
     //判断是内容否为空
       function P_VText(obj)
       {
            if((obj.innerText.length != 0|obj.value.length != 0)&(obj.innerText!=""|obj.value!=""))
            { 
                return true;                                
            }
            return false;
       }
     
   //日期
   function P_Vworkyear21Span()
   {  
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_workyear21");
        if(!isDate(obj))
        {
            workyear21Span.innerText="请输入 yyyy-mm-dd格式.";
            return false;
        }
        else
        {
           workyear21Span.innerText="";
           return true;
        }    
         return true;   
   }
   
   //日期
   function P_Vworkyear22Span()
   {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_workyear22");
        if(!isDate(obj))
        {
            workyear22Span.innerText="请输入 yyyy-mm-dd格式.";
            return false;
        }
        else
        {
           workyear22Span.innerText="";
           return true;
        }
         return true;
   }
   
   //企业名称
   function P_VCompanyName2Span()
   {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_CompanyName2");
        if(!P_VText(obj))
        {
            CompanyName2Span.innerText = "请输入.";
            return false; 
        } 
        else
          {
           CompanyName2Span.innerText="";
          return true;
          }
           return true;
   }  
   
   //职位类别
   function P_jobNameClass2()
   {      
          var obj1 = document.getElementById("ctl00_ContentPlaceHolder1_ClassSuper2");
          var obj2 = document.getElementById("ctl00_ContentPlaceHolder1_JobsName2");
          if(P_VText(obj2)|obj1.options[obj1.selectedIndex].text!="请选择")
          {
              objnamepasn.innerText="";
              return true;
          }
          else
          { 
                objnamepasn.innerText= "请选择或输入职位名称";
                return false;
          }
           return true;
   }
   
      //职位类别
   function P_jobNameClass1()
   {    
    
          var obj1 = document.getElementById("ctl00_ContentPlaceHolder1_ClassSuper1");
          var obj2 = document.getElementById("ctl00_ContentPlaceHolder1_JobsName");
          if(P_VText(obj2)|obj1.options[obj1.selectedIndex].text!="请选择")
          {
               SpanWrok.innerText="";
              return true;
          }
          else
          { 
                 SpanWrok.innerText= "请选择或输入职位名称";
                return false;
          }
           return true;
   }
  
   
   //详细信息
   function P_VDescription2()
   {
        var obj = document.getElementById("ctl00_ContentPlaceHolder1_Description2");
        if(!P_VText(obj))
        {
            Description2Span.innerText = "请输入.";
            return false; 
        }
        else
          {
           Description2Span.innerText="";
          return true;
          }
           return true;
   }
   
    //弹出层    
    function P_info2Next(obj)
    {              
        var suucce = true;
        if(ctl00_ContentPlaceHolder1_Work_Item2.style.display == "inline")
            if(!P_Vworkyear21Span()|!P_Vworkyear22Span()|!P_VCompanyName2Span()|!P_jobNameClass2()|!P_VDescription2())
                 suucce = false;        
            WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(obj.id, "", true, "", "", false, false));
            if(WebForm_OnSubmit()&suucce&P_jobNameClass1()){          
                var sWidth,sHeight;
                sWidth=document.body.offsetWidth;//浏览器工作区域内页面宽度 或使用 screen.width//屏幕的宽度                
                sHeight=document.body.offsetHeight;//屏幕高度（垂直分辨率）               
 //背景层（大小与窗口有效区域相同，即当弹出对话框时，背景显示为放射状透明灰色）               
                var bgObj=document.createElement("div");//创建一个div对象（背景层）
 //动态创建元素，这里创建的是 div
                //定义div属性，即相当于(相当于，但确不是，必须对对象属性进行定义               
 //<div id="bgDiv" style="position:absolute; top:0; background-color:#777;filter:progid:DXImagesTransform.Microsoft.Alpha
//f(style=3,opacity=25,finishOpacity=75); opacity:0.6; left:0; width:918px; height:768px; z-index:10000;"></div>
                bgObj.setAttribute('id','bgDiv');
                bgObj.style.position="absolute";
                bgObj.style.top="0";
                bgObj.style.background="#777";
                bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
                bgObj.style.opacity="0.6";
                bgObj.style.width=sWidth + "px";
                bgObj.style.height=sHeight + "px";
                bgObj.style.zIndex = "10000";
                document.body.appendChild(bgObj);//在body内添加该div对象            
                //iframe
                var myiframe=document.createElement("iframe");//创建一个div对象（背景层） //动态创建元素，这里创建的是 div
                myiframe.setAttribute('id','myiframe');
                myiframe.style.position="absolute";
                myiframe.style.top="0";
                myiframe.style.background="#777";
                myiframe.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
                myiframe.style.opacity="0.6";
                myiframe.style.width=sWidth + "px";
                myiframe.style.height=sHeight + "px";
                myiframe.style.zIndex = "10000";
                bgObj.appendChild(myiframe);//在body内添加该div对象 
                 
                //隐藏按钮  
                P_objhide(obj);           
                var infoNextdiv = document.getElementById("infoNext");
                P_objshow(infoNext);          
                infoNextdiv.setAttribute("align","center");
                infoNextdiv.style.background="white";            
                infoNextdiv.style.border="1px solid";
                infoNextdiv.style.position = "absolute";
                infoNextdiv.style.left = "50%";
                infoNextdiv.style.top = "50%";
                infoNextdiv.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
                infoNextdiv.style.marginLeft = "-225px" ;
                infoNextdiv.style.marginTop = -75+document.documentElement.scrollTop+"px";
                infoNextdiv.style.textAlign = "center";
                infoNextdiv.style.lineHeight ="25px";
                infoNextdiv.style.zIndex = "10001";            
        }
    }
    
    //弹出层 ResumeFreshInfo2.aspx
    function P_info3Next(obj)
    {
         WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(obj.id, "", true, "", "", false, false));
         if(WebForm_OnSubmit())
         {          
            var sWidth,sHeight;
            sWidth=document.body.offsetWidth;//浏览器工作区域内页面宽度 或使用 screen.width//屏幕的宽度            
            sHeight=document.body.offsetHeight;//屏幕高度（垂直分辨率）            //背景层（大小与窗口有效区域相同，即当弹出对话框时，背景显示为放射状透明灰色）           
            var bgObj=document.createElement("div");//创建一个div对象（背景层） //动态创建元素，这里创建的是 div
            //定义div属性，即相当于(相当于，但确不是，必须对对象属性进行定义            //<div id="bgDiv" style="position:absolute; top:0; background-color:#777; filter:progid:DXImagesTransform.Microsoft.Alpha//f(style=3,opacity=25,finishOpacity=75); opacity:0.6; left:0; width:918px; height:768px; z-index:10000;"></div>
            bgObj.setAttribute('id','bgDiv');
            bgObj.style.position="absolute";
            bgObj.style.top="0";
            bgObj.style.background="#777";
            bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
            bgObj.style.opacity="0.6";
            bgObj.style.width=sWidth + "px";
            bgObj.style.height=sHeight + "px";
            bgObj.style.zIndex = "10000";
            document.body.appendChild(bgObj);//在body内添加该div对象            
            //iframe
            var myiframe=document.createElement("iframe");//创建一个div对象（背景层） //动态创建元素，这里创建的是 div
            myiframe.setAttribute('id','myiframe');
            myiframe.style.position="absolute";
            myiframe.style.top="0";
            myiframe.style.background="#777";
            myiframe.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
            myiframe.style.opacity="0.6";
            myiframe.style.width=sWidth + "px";
            myiframe.style.height=sHeight + "px";
            myiframe.style.zIndex = "10000";
            bgObj.appendChild(myiframe);//在body内添加该div对象 
             
            //隐藏按钮  
            P_objhide(obj);           
            var infoNextdiv = document.getElementById("infoNext");
            P_objshow(infoNext);          
            infoNextdiv.setAttribute("align","center");
            infoNextdiv.style.background="white";            
            infoNextdiv.style.border="1px solid";
            infoNextdiv.style.position = "absolute";
            infoNextdiv.style.left = "50%";
            infoNextdiv.style.top = "50%";
            infoNextdiv.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
            infoNextdiv.style.marginLeft = "-225px" ;
            infoNextdiv.style.marginTop = -75+document.documentElement.scrollTop+"px";
            infoNextdiv.style.textAlign = "center";
            infoNextdiv.style.lineHeight ="25px";
            infoNextdiv.style.zIndex = "10001";           
         }
    }
   
    ///////////////////////////////////////////////////////////////////////