 /*
* This is the JavaScript function that activates AJAX functionality in the txt form. 
*Note that this script defines the sendSMS() function called when the document loads and calls feedback1.php. 

This function then displays the results of feedback1.php within the div allocated to be ajaxed in the index.php which 
is named sms in this case.  
*Written by Alan Galiwango
*Aug. 6 2007
*/var xmlHttp

function sendSMS(int)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var url="feedback1.php"
//url=url+"?vote="+int
//url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged() 
{ 
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("sms").
 innerHTML=xmlHttp.responseText;
 } 
} 

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
 {
 objXMLHttp=new XMLHttpRequest()
 }
else if (window.ActiveXObject)
 {
 objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
 }
return objXMLHttp
}
