function xmlhttpPost(strURL,temp,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11) {
		
		var xmlHttpReq = false;
		var self = this;
		try{
			// Opera 8.0+, Firefox, Safari
			self.xmlHttpReq = new XMLHttpRequest();
		} catch (e){
			// Internet Explorer Browsers	
			try{
				self.xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try{
					self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e){
					// Something went wrong
					alert("Your browser does not support to ajax!");
					return false;
				}
			}
		}
		self.xmlHttpReq.open('POST', strURL, true);
		self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		self.xmlHttpReq.onreadystatechange = function() {
			if (self.xmlHttpReq.readyState == 4	) {
				
				updatepage(self.xmlHttpReq.responseText,temp,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11);
			}
		}
	
		self.xmlHttpReq.send(getquerystring(temp,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11));
	
	
	
	}

	function getquerystring(temp,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11) {
		
		
		var qstr='';
	   
		if (temp == 1) {
			qstr='TEMP='+temp+'&CH='+s1;
		}
		
		if (temp == 2) {
			
			
			qstr='TEMP='+temp+'&NFP='+s1;
		}
		
		if (temp == 3) {
			
			var L = '';
			var C = '';
			var E = '';
			var P = '';
			var LR = '';
			var A = '';
			var K = '';
			var W = '';
			var O = '';
			
			for(i=0;i<s1.length;i++){
			
			  if(s1[i].checked) L += s1[i].value+'#@#';
		      
			  
			}
			
			for(i=0;i<s2.length;i++){
			
			  if(s2[i].checked) C += s2[i].value+'#@#';
		      
			  }
			  
			 for(i=0;i<s3.length;i++){
			
			  if(s3[i].checked) E += s3[i].value+'#@#';
		      
			  } 
			  
			   for(i=0;i<s4.length;i++){
			
			  if(s4[i].checked) P += s4[i].value+'#@#';
		      
			  } 
			  
			   for(i=0;i<s5.length;i++){
			
			  if(s5[i].checked) LR += s5[i].value+'#@#';
		      
			  } 
			  
			   for(i=0;i<s6.length;i++){
			
			  if(s6[i].checked) A += s6[i].value+'#@#';
		      
			  } 
			  
			   for(i=0;i<s7.length;i++){
			
			  if(s7[i].checked) K += s7[i].value+'#@#';
		      
			  } 
			  
			   for(i=0;i<s8.length;i++){
			
			  if(s8[i].checked) W += s8[i].value+'#@#';
		      
			  } 
			  
			  for(i=0;i<s9.length;i++){
			
			    if(s9[i].checked) O += s9[i].value+'#@#';
		      
			  } 
			
			
	    qstr='TEMP='+temp+'&L='+L+'&C='+C+'&E='+E+'&P='+P+'&LR='+LR+'&A='+A+'&K='+K+'&W='+W+'&O='+O+'&PID='+s10;
		
		}
		
		if(temp==4){
		   
		   qstr='TEMP='+temp+'&PETPOLICY='+s1+'&PID='+s2;
		
		}
		
		if(temp==5){
		   
		   qstr='TEMP='+temp+'&LEASETERMS='+s1+'&PID='+s2;
		
		}
		
		if(temp==6){
		   
		   qstr='TEMP='+temp+'&NEIGHBORHOOD='+s1+'&PID='+s2;
		
		}
		
		
		if(temp==7){
		   
		  var SP ='';
		  
		  for(i=0;i<s1.length;i++){
			
			  if(s1[i].checked){ 
			  
			    if(s1[i].value==1){
				  
				  SP += s1[i].value+'*'+document.getElementById('dollar').value+'#@#';
				
				
				}else if(s1[i].value==5){
				  
				  SP += s1[i].value+'*'+document.getElementById('firstmonthrent').value+'#@#';
				
				
				}else if(s1[i].value==6){
				  
				  SP += s1[i].value+'*'+document.getElementById('firstmonthdiscount_at').value+'#@#';
				
				
				}else if(s1[i].value==7){
				  
				  SP += s1[i].value+'*'+document.getElementById('weeksfree_nb').value+'#@#';
				
				
				}else{
				
				  SP += s1[i].value+'#@#';
				
				 }
			  
			  
			  }
			  
			
			
			
			}
		  
		 
		   qstr='TEMP='+temp+'&SPECIALS='+SP+'&PID='+s4+'&ED='+s3+'&SD='+s2;
		
		}
		
		if(temp==8){
			
			qstr='TEMP='+temp+'&PID='+s1;
		}
		
		if(temp==9){
			
			qstr='TEMP='+temp+'&PHOTOID='+s1+'&PID='+s2+'&PHOTO='+s3;
		}
		
		if(temp==10){
			
			qstr='TEMP='+temp+'&PID='+s1+'&UID='+s2+'&TYP='+s3;
			//alert(qstr);
		}
		if(temp==11){

			qstr='TEMP='+temp+'&PID='+s1+'&UID='+s2+'&TYP='+s3;
			//alert(qstr);
		}
		

		if(temp==12){
		    qstr='TEMP='+temp+'&CID='+s1;
		}
		if(temp==13){
		    qstr='TEMP='+temp+'&randval='+s1+'&uid='+s2;
		}
        if(temp==16){
		    qstr='TEMP='+temp+'&C='+s1;
		}
		if(temp==14){
			
		    qstr='TEMP='+temp+'&sname='+s1+'&uid='+s2+'&sstype='+s3+'&ssaddress='+s4+'&bed='+s5+'&bat='+s6+'&minr='+s7+'&maxr='+s8+'&sspet='+s9+'&sspname='+s10+'&type='+s11;
		//alert(qstr);
		}
		
		 if(temp==15){
		    qstr='TEMP='+temp+'&C='+s1+'&S='+s2;
		}
		
		 if(temp==18){
		    qstr='TEMP='+temp+'&PID='+s1;
		}
		
		if(temp==19){
		    qstr='TEMP='+temp+'&ad1='+s1+'&city='+s2+'&state='+s3+'&zip='+s4;
		}
		if(temp == 20){
		 	
			qstr='TEMP='+temp+'&id='+s1+'&uid='+s2;
			//alert(qstr);
		}
		
        return qstr;
   }
	

	function updatepage(str,e,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11){
		
        
		if(e==1){
		  
		   str1 = str.split('#@#');
		  document.getElementById('states').innerHTML=str1[0];
		}

	    
		if(e==2){
		  
		  str1 = str.split('#@#');
		  for(i=2;i<=trim(str1[0]);i++){
			  
			document.getElementById('floorplan'+i).style.display = 'block';  
		  }
		  
		  
		  for(i=parseInt(trim(str1[0]))+1;i<=20;i++){
			  
			document.getElementById('floorplan'+i).style.display = 'none';  
		  }
		  
		  //document.getElementById('floorplans').innerHTML=str;
		}
	  
	    if(e==3 || e==4 || e==5 || e==6 || e==7){
		
		  
		  alert('Data Saved successfully.');
		}
	
	    if(e==8 || e==9){
		  
		  str1 = str.split('#@#');
		  document.getElementById('footer1').innerHTML=str1[0];
		}
	     
	    if(e==10){
		  
		  str1 = str.split('#@#');
		  if(trim(str1[0])==1){
		     alert('You have already added as your favourites');
		  
		  }else{
			 alert('Property added as your favourites'); 
		  
		  }
		
		
		}
		 if(e==11){
		  // do nothing
		 
		  		
		}
	
	   if(e==12){
	     
		 str1=str.split('#@#');
		 document.getElementById('state2').selectedIndex = trim(str1[0]);
		 document.getElementById('state2').disabled = true;
		 document.getElementById('state4').value = document.getElementById('state2').value;
		 if(trim(str1[2])==1){
			 document.getElementById('city2').value = trim(str1[1]);
			 document.getElementById('city2').readOnly  = true;
			 document.getElementById('zip2').readOnly  = false;
			 document.getElementById('zip2').value = '';
		 }
		 
		 if(trim(str1[2])==2){
			 document.getElementById('zip2').value = trim(str1[1]);
			 document.getElementById('zip2').readOnly  = true;
			 document.getElementById('city2').readOnly  = false;
			 document.getElementById('city2').value ='';
		    
		 }
		
	   }
	
	 if(e==13){
		  
		  document.getElementById('featured-property').innerHTML = str;
	}
		
	if(e==16){
		
		
		str1 = str.split('#@#');
		document.getElementById('filter_state').innerHTML=str1[0];
		//document.getElementById('channels_list').innerHTML=str1[1];
		
	}
	    if(e==20){
		  if(str == 1){
		  alert('Search Deleted Successfully');
		  }else {
		  alert('Error: Search could not be deleted');
		  }
		}
		if(e==14){
		  // do nothing
		  var str1 = str.split("<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>");
		 //alert(str);
		  if(trim(str1[0])==1){
		     alert('You have already saved 5 search criterias');
		  
		  }else if(trim(str1[0])==2){
			 alert('Search saved successfully'); 
		  
		  }else if(trim(str1[0])==3){
			  alert('Save search name is already exist.');
		  }else {
			  alert('Error: Search could not be saved'); 
		  }
		}
	if(e==15){
	
		str1 = str.split('#@#');
		document.getElementById('channels_list').innerHTML=str1[0];
		document.getElementById('filter_state1').innerHTML=str1[1];
		
	}
	
	if(e==18){
	
		str1 = str.split('#@#');
		divid = 'togglebutton'+str1[1];
		document.getElementById(divid).innerHTML=str1[0];
		
	}
	
	
	if(e==19){
	   
	   str1 = str.split('#@#');
	   if(trim(str1[0])==1){
	       document.getElementById('indicator').style.display ='none';
		   document.getElementById('needvalidation').value = 1;
		   alert('Address has been validated successfully.');
	   }else if(trim(str1[0])==2){
	       document.getElementById('indicator').style.display ='block';
		   alert('Please enter valid address');
	       
	   }
	
	}
	
	
	
	}
	
    function trim(stringToTrim) {
		return stringToTrim.replace(/^\s+|\s+$/g,"");
	}
	
    function isEMailAddr(cntID,i) {
			//alert(cntID);
			var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
			var cnt = document.getElementById(cntID);
			var str= cnt.value;
			if (!str.match(re)) {
				cnt.style.borderColor='#CA8959';
				//if(i==1)
				  // alert("Enter a valid E-mail ID");
				return false;
			}
			return true;
	 }
	 
	 function displayType(type){
	 
	    if(trim(type)=="home"){
		    document.getElementById("property_totalunits").style.display='none';
			document.getElementById("property_unitsmanaged").style.display='none';
		}else if(trim(type)=="apartment" || trim(type)=="condo" ){
			
			document.getElementById("property_totalunits").style.display='block';
			document.getElementById("property_unitsmanaged").style.display='block';
		}else if(trim(type)=="Duplex" || trim(type)=="Triplex"){
		  
		    document.getElementById("property_totalunits").style.display='none';
			document.getElementById("property_unitsmanaged").style.display='block';
		    
		}
		    
	 
	 
	 }
	 
	 
	 
