  //处理返回信息的函数
  function processrequest(){
   if(http_request.readyState==4){//判断对象状态
     if(http_request.status==200){//信息已成功返回，开始处理信息
          var text=http_request.responseText;
		  if(text==1){
			  showWin('url','login.html','',300,200);
			  //alert(text);
			  }else if(text == 2){
				alert("用户名或密码输入错误!");  
			  }else if(text == "e"){
			  window.setTimeout("closeWindows();",1000); 
			  }else{
			  showWin('html',text,'',300,100);
			  }
         }
         else{//页面不正常
          alert("您所请求的页面不正常！");
         }
   }
  }
  //多岗位收藏
   function postfolder()
   {
	       if(checkbox()==false){
		   showWin('html',"请选择您要收藏的岗位！",'',300,100);
		   return false;
		   }else{
				var postid = document.getElementsByName("postid");
				var postids = "";
				for (var i=0;i<postid.length;i++ ){
					if(postid[i].checked){ 
					postids=postids+postid[i].value + ","; 
					}
				}
				var url = "collectjob.html";
    			var postdate = "postids="+postids;
				send_request("POST",url,postdate);			   
		   }
   }
   //多岗位应聘
   function jobemployAll()
   {
	       if(checkbox()==false){
		   showWin('html',"请选择您要应聘的岗位！",'',300,100);
		   return false;
		   }else{
				var postid = document.getElementsByName("postid");
				var postids = "";
				for (var i=0;i<postid.length;i++ ){
					if(postid[i].checked){ 
					postids=postids+postid[i].value + ","; 
					}
				}
				var url = "employjob.html";
    			var postdate = "postids="+postids;
				send_request("POST",url,postdate);		   
		   }
   }
  //单个岗位应聘
  function employ(postid,unitid,unitname){
   var id = postid;
   var uid = unitid;
   var uname = unitname;
   var url = "employjob.html?postid="+id+"&unitid="+uid+"&unitname="+uname+"&rand="+Math.random();
   send_request("GET",url);
  }
  //单个岗位收藏
  function collect(postid){
   var id = postid;
   var url = "collectjob.html?postid="+id+"&rand="+Math.random();
   send_request("GET",url);
  }
  function showAll(){
	   if(checkbox()==false){
	   showWin('html',"请选择您要显示的岗位！",'',300,100);
	   return false;
	   }
	   document.form.action="position.html";
	   document.form.target="_blank";  
	   document.form.submit();
  }
  function login(){
	showWin('url','login.html','',300,200);
  }
  function closeWindows(){
	$("#fullBg").css("display","none");
	$("#msg").css("display","none");
	window.location.reload();
  } 
