$(function(){ 
	   $("#home_jobsSearch li").click(function(){
	       clearClass();	//還原樣式
	  	  $(this).addClass("nonce");
	  	  $("#keywordType").val($(this).attr("id"));
	  });
		//還原樣式
	   function clearClass(){
	   	  $("#home_jobsSearch li").removeClass("nonce");
		  $("#home_jobsSearch li").addClass("");
	   }
   });
   
   function toTab(){
		if(event.keyCode==13)
		event.keyCode=9;
   }
   
   function submitSearchForm2(){
	if($("#jobLocation1_address").val()==0 && $.trim($("#keyword").val())=="關鍵字搜索..." ){
		$("#jobLocation1_address").focus();
		alert("請選擇搜索地區!");
		return ;
	}
	
	if($.trim($("#keyword").val())=="" && $("#jobLocation1_address").val()==0){	
		alert("請輸入正確的關鍵字!");
		$("#keyword").select();
		return ;
	}
	
	if($.trim($("#keyword").val())=="關鍵字搜索..."){
		$("#keyword").val("");
	}
	
	$("#searchForm_Center").attr("action","/personal/util/my_searchresult.do")
					.attr("target","_blank")
					.attr("method","post")
					.submit();
}
//個人推薦首頁查看簡歷腳本
function viewSingleResume(id) {
		showMeIndexForm.resId.value=id;
		showMeIndexForm.action="/showme/viewResume.do";
		showMeIndexForm.target="_blank";
		showMeIndexForm.submit();
	}
//地區職位圖層顯示
/*document.onkeydown = function(){
		if(event.keyCode==13){ //如果按下enter鍵
			if(document.getElementById("new_address")){
				if(document.getElementById("new_address").style.display=="block"){
				 	close_box(); //關閉div
				}
			}
			if(document.getElementById("_post_mian_div")) {
				if(document.getElementById("_post_mian_div").style.display=="block"){
				 	closePostDialog();//關閉div
				}
			}
			return false;
		}
	}
	
 */	
 /*document.onkeydown = function(){
		if(event.keyCode==13){ //如果按下enter鍵
			if(document.getElementById("new_address")){
				if(document.getElementById("new_address").style.display=="block"){
				 	close_box(); //關閉div
				}
			}
			if(document.getElementById("_post_mian_div")) {
				if(document.getElementById("_post_mian_div").style.display=="block"){
				 	closePostDialog();//關閉div
				}
			}
			return false;
		}
	}*/
