// JavaScript Document
// XML Setup 

    var xmlHttpReq = false;
    var self = this;
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
	


function vote(rate,girlID)
  {

  	  document.getElementById('vote').innerHTML='<b>Placing Vote!...</b>';
	    
  /// runXML

    self.xmlHttpReq.open('POST', '/includes/ajaxfeed.php', true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {	
 		
			 document.getElementById('vote').innerHTML=self.xmlHttpReq.responseText;
			 }	 
	}
    qstr ='action=vote&rate='+rate+'&girlID=' + escape(girlID);  
    self.xmlHttpReq.send(qstr);
  
  }




function searchGirls()
  {

if (document.forms.searcher.terms.value){
  	  document.getElementById('girlThumbs').innerHTML='<b>Searching for girls content..</b>';
	    
  /// runXML

    self.xmlHttpReq.open('POST', '/includes/ajaxfeed.php', true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {	
 		
		document.getElementById('girlThumbs').innerHTML=self.xmlHttpReq.responseText;
			 }	 
	}
    qstr ='action=searchGirls&terms='+document.forms.searcher.terms.value;  
    self.xmlHttpReq.send(qstr);
  
  
}

else {window.alert('Please enter a search term!');}
  }



function searchGirlsMembers()
  {

if (document.forms.searcher.terms.value){
  	  document.getElementById('girlThumbs').innerHTML='<b>Searching for girls content..</b>';
	    
  /// runXML

    self.xmlHttpReq.open('POST', '/includes/ajaxfeed.php', true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {	
 		
		document.getElementById('girlThumbs').innerHTML=self.xmlHttpReq.responseText;
			 }	 
	}
    qstr ='action=searchGirlsMembers&terms='+document.forms.searcher.terms.value;  
    self.xmlHttpReq.send(qstr);
  
  
}

else {window.alert('Please enter a search term!');}
  }




function searchWebGems()
  {

if (document.forms.searcher.terms.value){
  	  document.getElementById('girlThumbs').innerHTML='<b>Searching for WebGems content..</b>';
	    
  /// runXML

    self.xmlHttpReq.open('POST', '/includes/ajaxfeed.php', true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {	
 		
		document.getElementById('girlThumbs').innerHTML=self.xmlHttpReq.responseText;
			 }	 
	}
    qstr ='action=searchWebGems&terms='+document.forms.searcher.terms.value;  
    self.xmlHttpReq.send(qstr);
  
  
}

else {window.alert('Please enter a search term!');}
  }



///////////