/* === Copyright Complocated 2008 === */

  function newPollQuestion(thisQuestion) {
		
    httpObject = getHTTPObject();

			if (httpObject != null) {
			httpObject.open("GET", "/ajax/cPoll.php?not=" + thisQuestion , true);                
			httpObject.send(null);
			httpObject.onreadystatechange = reloadPoll;

			}

            
     }
	 
	 
	 function responseQuestion(question, option) {
		 
		    httpObject = getHTTPObject();

			if (httpObject != null) {
			httpObject.open("GET", "/ajax/cPoll.php?q=" + question + "&ans=" + option , true);                
			httpObject.send(null);
			httpObject.onreadystatechange = reloadPoll;

			}
            
     }
	 
	 function startupPoll() {
		 
		 httpObject = getHTTPObject();

			if (httpObject != null) {
			httpObject.open("GET", "/ajax/cPoll.php", true);                
			httpObject.send(null);
			httpObject.onreadystatechange = reloadPoll;
			}
			
	 }
		 
     
    // Reload the poll window
	function reloadPoll(){
	
		if(httpObject.readyState > -1 && httpObject.readyState < 4) {
		document.getElementById("cPollDynamic").innerHTML = 
		'<div class="loadingBar"><img src="http://evenicoulddoit.com/uploads/images/48112907.gif" /></div>';
		
		}
		
		else if(httpObject.readyState == 4){
        document.getElementById("cPollDynamic").innerHTML = httpObject.responseText;
		}

	}
	
	
		