﻿function viewpost(uid,url){
window.open ('/apply.do?motion=viewPost&domain=sjob.taihainet.com&uid='+uid,'','');
}
function checkLogin(content,n) {
	if (n == 0 && content.value == "输入关键字-例如：销售"){
	   
		content.value="";
	}
	if (n == 1){
		if(content.value == "输入关键字-例如：销售"){content.value="";}
		
	}
	if (n == 2 && content.value == ""){content.value = "输入关键字-例如：销售";}
}
	function readcookie()
    {
	 var c = document.cookie.split(";");
	 for(var j=0;j<c.length;j++){
       var cookiepair = c[j].split("=");
        if(cookiepair[0] != null
           && cookiepair[1] != null)
        {
            var truevalue = "";
            var arraycode = cookiepair[1].split("+");
            for(var i = 0; i < arraycode.length; ++i)
                truevalue += String.fromCharCode(arraycode[i]);
            if(cookiepair != null)
            {        
              if("pro"==Trim(cookiepair[0])){					  
					  pro.value=cookiepair[1];
					  citylist(pro,city);
					  searchForm.province.value=cookiepair[1];
			   } 
			   if("city"==Trim(cookiepair[0])){
			   
					showcity(pro,city,cookiepair[1]);
					searchForm.province.value=pro.value;
					searchForm.location.value=city.value;
			   }  
			}
        }
	}
        
    }
    function Trim(str){
 if(str.charAt(0) == " "){
  str = str.slice(1);
  str = Trim(str); 
 }
 return str;
}
function  selPovince(){
	citylist(pro,city);
	searchForm.province.value=pro.value;
	searchForm.location.value='';
	el=document.getElementById("locationtext");
	if(el!=null){
		if(pro.selectedIndex>0){
			el.innerHTML=pro.options[pro.selectedIndex].text;
		}
	}
}
function selCity(){
	searchForm.location.value=city.value;
	el=document.getElementById("locationtext");
	if(el!=null){
		if(city.selectedIndex>0){
			el.innerHTML=city.options[city.selectedIndex].text;
		}
	}
}
function  setLocationView(){
	el=document.getElementById("locationtext");
	if(el!=null){
		if(city.selectedIndex>0){
			
			el.innerHTML=city.options[city.selectedIndex].text;
		}else if(pro.selectedIndex>0){
			
			el.innerHTML=pro.options[pro.selectedIndex].text;
		}
	}
}

function onchecksubmit() {

	document.searchForm.postkind.value=document.searchForm.ppostkind.value;

}
	
function changesel(thesel,id){
	
	document.searchForm.postkind.value=id;
	document.searchForm.ppostkind.value=id;
	document.searchForm.submit();
}	
function  findPostBycorpname(name){        
			document.searchForm.content.value=name;
		    document.searchForm.province.value="";
			document.searchForm.location.value="";
			document.searchForm.postkind.value="";
			document.searchForm.publishdate.value="";
			el=document.searchForm.kinfo;
			if(el!=null){
				el="";
			}
			document.searchForm.submit();	 
}

function openapply(url){
	window.open ('/apply.do?postId='+url,'u_apply','');
}
  function selpostkind(id){
  
  	document.searchForm.postkind.value=id;
	document.searchForm.page.value=1;
	checktime();
	
  }
 function gosubmit(){  
  	document.searchForm.domain.value="";	
  	document.searchForm.page.value=1;
  	checktime();
 }
lasttime=0;
function checktime(){	
	d = new Date();
	nowtime=d.getTime();
	
	
	if((nowtime-lasttime)<5000){
		alert("请稍候");		
	}else{	
		lasttime=nowtime;		
		document.searchForm.submit();
	}


}
  function dosubmit(page2){  
  	document.searchForm.page.value=page2;
	checktime();
  }  

