var xmlHttp=createXmlHttpRequestObject();
function makehit(section,paper){
	if(xmlHttp){
		if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0){
			//alert("./include/hitmaker.php?id="+section+"&type="+paper);
        	xmlHttp.open("GET", "./include/hitmaker.php?id="+section+"&type="+paper, true);
	        xmlHttp.onreadystatechange = hitHandler;
    	    xmlHttp.send(null);
		}
	}
}

function hitHandler(){
	//alert(xmlHttp.responseText);
}

function makePoll(){
	var val = 0;
	for( i = 0; i < document.pollForm.vote.length; i++ ){
		if( document.pollForm.vote[i].checked == true )
			val = document.pollForm.vote[i].value;
	}
	if(val>0){
		//alert("here1");
		 /*try {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
   } catch (e) {
    alert("Permission UniversalBrowserRead denied.");
   }*/
		/*var url = "http://websitegoodies.com/vote.php";
		var params = "id=7703&vote="+val;
		//xmlHttp.open("GET", "www.websitegoodies.com/vote.php?"+params, true);
		xmlHttp.open("POST", url, true);
		//Send the proper header information along with the request
		xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlHttp.setRequestHeader("Content-length", params.length);
		xmlHttp.setRequestHeader("Connection", "close");
		xmlHttp.onreadystatechange = pollHandler;
		xmlHttp.send(params);*/
		return true;
	}else{
		alert("Select one option and poll");
		return false;
	}
}
function pollHandler(){
	alert(xmlHttp.responseText);
}
