﻿// create by cjp 2009-2-18
var url="http://www.job910.com";
///已查看职位
function loadzpfcom(id)
 { 
    $.ajax({
	    type: "GET",
	    url:"/Ajax/GetZhaopinfang.aspx",
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
 }
function loadzpfnotice(id)
 { 
    $.ajax({
	    type: "GET",
	    url:"/Ajax/GetZhaopinfangForenotice.aspx",
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
 }

 function loadreadjob(id)
 {
      $.ajax({
	    type: "GET",
	    url: url+"/Ajax/ReadJobHistoy.aspx",
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        //$("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");
        },
	    success: function (data){
        $("#"+id).html(data);}
    });
 }
  function loadabout(id,classid)
 {
      $.ajax({
	    type: "GET",
	    url: url+"/Ajax/GetAbout.aspx?classid="+classid,
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
 }
 
 function loadhotkeywords(id,classid)
 {
      $.ajax({
	    type: "GET",
	    url: url+"/Ajax/HotKeyWords.aspx?id="+classid,
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
 }
///紧缺职位
 function loadShortagejob(id,classid)
 {
      $.ajax({
	    type: "GET",
	    url: url+"/Ajax/ShortageJob.aspx?id="+classid,
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
 }
 ///最新人才
  function loadnewuser(id,classid)
 {
      $.ajax({
	    type: "GET",
	    url: url+"/Ajax/GetNewUser.aspx?id="+classid,
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
 }
 
  ///城市站点最新人才
  function loadcitynewuser(id,classid)
 {
      $.ajax({
	    type: "GET",
	    url: url+"/Ajax/GetCityNewUser.aspx?id="+classid,
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
 }
 ///二级首页广告
    function loadrightad(id,classid)
    {
      $.ajax({
	    type: "GET",
	    url: url+"/Ajax/GetRightAd.aspx?id="+classid,
	    dataType: "html",
        contentType: "gb2312",
        beforeSend:function(){
        $("#"+id).html("正在加载,请稍候...");},
	    success: function (data){
        $("#"+id).html(data);}
    });
   }
   
   ///城市站点广告
    function loadcityad(id,citycode)
     {
          $.ajax({
	        type: "GET",
	        url: url+"/Ajax/GetCityAD.aspx?area="+citycode,
	        dataType: "html",
            contentType: "gb2312",
            beforeSend:function(){
        $("#"+id).html("<img src='"+url+"/images/loading.gif'>正在加载,请稍候...");},
	        success: function (data){
            $("#"+id).html(data);}
        });
     }

    function showjob(id)
     {
        document.Form1.action="jobs.aspx?classID="+id;
        document.Form1.submit();
     }
     function setshowjobcss()
    { 
        var strUrl=window.location.href; 
        var arrUrl=strUrl.split("/"); 
        var strPage=arrUrl[arrUrl.length-1]; 
        if(strPage.indexOf("_")>0)
        {
            var arrPage=strPage.split("_");
            var id=arrPage[arrPage.length-1];
            id=id.substring(0,id.indexOf("."));
            if(id=="00"){
            document.getElementById("j"+id).className="setclass_0";
            }
            else
            {
            document.getElementById("j"+id).className="setclass";
            }
        }
        else{
            id="00";
            document.getElementById("j"+id).className="setclass_0";
        }
    }
    
   
function checkonclick() {
    if (document.getElementById("seach5").value == "请输入关键词...") {
        document.getElementById("seach5").value = "";
        document.getElementById("seach5").style.color = "";
    }
}

function checkblur() {
    if (document.getElementById("seach5").value == "") {
        document.getElementById("seach5").value = "请输入关键词...";
        document.getElementById("seach5").style.color = "#cccccc";
    }
}

function checksearch() {
    if (document.getElementById("seach5").value == "请输入关键词...") {
        document.getElementById("seach5").value = "";
    }
}



 function GetDiploma(code)
{
    var name="";
    if(code!="")
    {
        switch(code)
        {
            case "10":
            name="博士";
            break;
            case "20":
            name="硕士";
            break;
            case "30":
            name="大学本科";
            break;
            case "40":
            name="大专";
            break;
            case "50":
            name="中专";
            break;
            case "60":
            name="职高/技校";
            break;
            case "70":
            name="高中";
            break;
            case "80":
            name="初中";
            break;
        }
    }
    document.write(name);
}