﻿// JScript 文件  By Fanlei·Wang
function getValue(cityname)
{  
   _Default._Default_Set_CityCookies(cityname,getGroups_callback);//该处即调用服务器端的_Default.getValue方法。
}
//这个方法用户接受并处理服务器端返回的结果。
function getGroups_callback(result)
{
    if(result==null||result.error)
    {
      alert("出错");
      return ;
    }
    window.location.replace('/Default.aspx');
}
function getId(id)
{
    return document.getElementById(id);
}
function GetIDStr(IdCheckBox)
{
    if(!IdCheckBox)
    {
        return "";
    }
    var i;
    var idstr="";
    if(IdCheckBox.length>0)
    {
        for(i=0;i<IdCheckBox.length;i++)
        {
            if(IdCheckBox[i].checked)
            {
                if(idstr=="")
                    idstr += IdCheckBox[i].value;
                else
                    idstr += "," + IdCheckBox[i].value;
            }
        }
    }
    else
    {
        if(IdCheckBox.checked)
            idstr=IdCheckBox.value;
    }
    if(idstr!="")
    {
        return idstr;
    }
    else
    {
        alert("请至少选择一项");
        return "";
    }
}
function GetIDStrGoto(IdCheckBox,ret)
{
    if(!IdCheckBox)
    {
        return "";
    }
    var i;
    var idstr="";
    if(IdCheckBox.length)
    {
        for(i=0;i<IdCheckBox.length;i++)
        {
            if(IdCheckBox[i].checked)
            {
                if(idstr=="")
                    idstr += IdCheckBox[i].value;
                else
                    idstr += "," + IdCheckBox[i].value;
            }
        }
    }
    else
    {
        if(IdCheckBox.checked)
            idstr=IdCheckBox.value;
    }
    if(idstr!="")
    {
        if(ret!=null)
        {
            idstr=idstr+ret;
        }
            window.open('/Company/ResumeStore/Candidatedetail.aspx?RefId='+idstr);    
    }
    else
    {
        alert("请至少选择一项");
        return "";
    }
}
function GetIDEmilHuiFuGoto(IdCheckBox,ret)
{
    if(!IdCheckBox)
    {
        return "";
    }
    var i;
    var idstr="";
    if(IdCheckBox.length)
    {
        for(i=0;i<IdCheckBox.length;i++)
        {
            if(IdCheckBox[i].checked)
            {
                if(idstr=="")
                    idstr += IdCheckBox[i].value;
                else
                    idstr += "," + IdCheckBox[i].value;
            }
        }
    }
    else
    {
        if(IdCheckBox.checked)
            idstr=IdCheckBox.value;
    }
    if(idstr!="")
    {
        if(ret!=null)
        {
            idstr=idstr+ret;
        }
            window.open('../ResumeStore/Per_EmialSend.aspx?RefId='+idstr);
        
    }
    else
    {
        alert("请至少选择一项");
        return "";
    }
}
function GetIDStrGotoJobList(IdCheckBox,ret)
{
    if(!IdCheckBox)
    {
        return "";
    }
    var i;
    var idstr="";
    if(IdCheckBox.length)
    {
        for(i=0;i<IdCheckBox.length;i++)
        {
            if(IdCheckBox[i].checked)
            {
                if(idstr=="")
                    idstr += IdCheckBox[i].value;
                else
                    idstr += "," + IdCheckBox[i].value;
            }
        }
    }
    else
    {
        if(IdCheckBox.checked)
            idstr=IdCheckBox.value;
    }
    if(idstr!="")
    {
        if(ret!=null)
        {
            idstr=ret+idstr;
        }
        window.open(idstr);
    }
    else
    {
        alert("请至少选择一项");
        return "";
    }
}
function Resume_Mr()
{
    setInterval("getResumeCount()",3000);
}
function getResumeCount()
{  

    WebTzzp.Person.Resume_cn.ResumeList.ResumeCount(getResumeCount_callback);
}
//这个方法用户接受并处理服务器端返回的结果。
function getResumeCount_callback(result)
{
   if(result==null||result.error)
   {
        getId('UserControls_DefaultTop1_lbl_resumecount').innerHTML="无法读取";
        return ;
   }
   if(result.value=="0")
   {
      getId('UserControls_DefaultTop1_lbl_resumecount').innerHTML="正在读取...";
   }
   else
   {
       getId('UserControls_DefaultTop1_lbl_resumecount').innerHTML=result.value;
   }
}
function set_onMouseOver(obj)
{
    obj.className="input33";
}
function set_onMouseOut(obj)
{
    obj.className="input22";
}
