function onblur_keyword(){
	curkey_val=document.getElementById("keyword").value;
	if(curkey_val=="")
      {document.getElementById("keyword").value=document.getElementById("current_id").value;}
}
function onfocus_keyword(){
	document.getElementById("keyword").value="";
}

$(function(){
  //news action
  $(".sub-news li").each(function(index){
		$(this).mouseover(function(){
			$(".sub-news .on-set").addClass("off-set");
			$(".sub-news .on-set").removeClass("on-set");
			$(this).removeClass("off-set");
			$(this).addClass("on-set");
			$("#sub-tabs > div").css("display","none");
			$("#sub-tabs > div:eq("+index+")").css("display","block");
		});
	});
//menu action
	$("#web-menu li").each(function(){
	$(this).mouseover(function(){
	$(this).removeClass("MSoff");
	$(this).addClass("MSon");	
	}).mouseout(function(){
	$(this).removeClass("MSon");
	$(this).addClass("MSoff");	
	});});
	
	//button
	$("button").each(function(){
		var buttonclass=$(this).attr("class");
		$(this).mouseover(function(){		
			$(this).addClass(buttonclass + "-hover");									  
		}).mouseout(function(){			
			$(this).removeClass(buttonclass + "-hover");									  
		});								
	});
	//search
	$(".search-job-see01").click(function(){
		$(this).addClass("search-job-see01-on");
		$(".search-job-bewrite").css("display","none");	
		$(".search-job-see02").removeClass("search-job-see02-on");	
	});
	$(".search-job-see02").click(function(){
		$(this).addClass("search-job-see02-on");
		$(".search-job-bewrite").css("display","block");	
		$(".search-job-see01").removeClass("search-job-see01-on");	
	});
		//person left menu
	$("#personLmenu .PLM").click(function(){		
		var dk = $(this).next("ul");
		dk.slideToggle("slow"); 
	});
	//person base resume
	$(".base-resume a").each(function(index){
		$(this).click(function(){
			$(".base-resume .Rclick").removeClass("Rclick");				   
			$(".base-resume li:eq("+index+")").addClass("Rclick");				   
		});
	});
});
function newscommend(tage,id,tbnum,tabls)
{
   for(i=1;i<tbnum+1;i++){
	   document.getElementById(tage+"-"+i).className="off-set";	 
	   document.getElementById(tabls+"-"+i).style.display="none";	
   }
   document.getElementById(tage+"-"+id).className="on-set";
   document.getElementById(tabls+"-"+id).style.display="";

}

function zpcommend(tage,id,tbnum,tabls)
{
   for(i=1;i<tbnum+1;i++){
	   document.getElementById(tage+"-"+i).className="off-set";	 
	   document.getElementById(tabls+"-"+i).style.display="none";	
   }
   document.getElementById(tage+"-"+id).className="on-set";
   document.getElementById(tabls+"-"+id).style.display="";

}
//最新招聘信息的菜单切换
function MenuSwitch(id) {
    var oid = $(".default")[0].id;
    $("#" + oid).removeClass();
    $("#" + oid).addClass("off-set");
    $("#" + id).removeClass();
    $("#" + id).addClass("on-set");
    $("#" + id).addClass("default");
    //最新招聘信息的更多连接
    LinkMore(id);
}
//最新招聘信息的更多连接
function LinkMore(id) {
    switch(id) {
        case "li_Default" : {
            document.getElementById("href_More").href = "http://search.people258.com/SearchResult.aspx";
            //最新招聘信息绑定
            NewJobBind(1);
            break;
        }
        case "li_Nb" : {  
            document.getElementById("href_More").href = "http://search.people258.com/SearchResult.aspx?area=3302&AreaNamesContent=宁波";
            //最新招聘信息绑定
            NewJobBind(2);
            break;
        }
        case "li_Hz" : {
            document.getElementById("href_More").href = "http://search.people258.com/SearchResult.aspx?area=3301&AreaNamesContent=杭州";
            //最新招聘信息绑定
            NewJobBind(4);
            break;
        }
        case "li_Wz" : {
            document.getElementById("href_More").href = "http://search.people258.com/SearchResult.aspx?area=3303&AreaNamesContent=温州";
            //最新招聘信息绑定
            NewJobBind(3);
            break;
        }
        case "li_Zj" : {
            document.getElementById("href_More").href = "http://search.people258.com/SearchResult.aspx?area=3206&AreaNamesContent=镇江";
            //最新招聘信息绑定
            NewJobBind(14);
            break;
        }
    }
}
