/*
 * Poll anti-spam submit via AJAX
 * 
 * uses ajax.js
 *     
 */

var pollDiv;

function SubmitPoll ( a, PollId, Script ) {

	var PollSubmit = "&" + "Poll" + "Submit";
	a.href = a.href + PollSubmit;
	pollDiv = PollId;
	Script += PollSubmit;
	
	return PM_ajax.openHttpRequest ( "GET", Script, true, "pollHandleServerResponse()" );

}

function pollHandleServerResponse () {

	// vote in the poll
	var Div = document.getElementById ( "PollView_" + pollDiv );
	var response = PM_ajax.XmlHttp.responseText;
	Div.innerHTML = response;

}


