// JavaScript Document

function vImage(url,pic) 
	{ 
	myWin3 = open("/articleImages/"+url+"/"+pic+"/","gallery",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=995,height=650'); myWin3.focus();
	} 
	
	
// 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 postComment()
  {


	var nameTxt=document.getElementById('commName').value;
	var articleID=document.getElementById('articleID').value;
	var location=document.getElementById('location').value;
	var commentTxt=document.getElementById('commentPara').value;
	
	
  	  document.getElementById('postComForm').innerHTML='<b><BR><BR>Sending comment...</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('postComForm').innerHTML=self.xmlHttpReq.responseText;
			 }	 
	}

    qstr ='action=comment&name='+nameTxt+'&articleID=' + escape(articleID)+'&comment='+commentTxt+'&location='+location;  
    self.xmlHttpReq.send(qstr);
  
  }

///////////