function test()
{
alert("test");	
}
function pstore(str)
{ 
var val = 0;

for( i = 0; i < document.form1.opt.length; i++ )
{
if( document.form1.opt[i].checked == true )
val = document.form1.opt[i].value;
}

if (val!="")
{
http.open("POST", "/akd/cms/pollsphp.php", true);
http.onreadystatechange = pollsHttpRes;
var params = "q1=" + encodeURI(str)+
	"&q2=" + encodeURI(val);
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");
http.send(params);
}
}


function result(str)
{
	
http.open("POST", "/akd/cms/pollsresult.php", true);
http.onreadystatechange = pollsHttpRes;
var params = "q1=" + encodeURI(str);

  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");
http.send(params);
}




function pollsHttpRes( ) {
if (http.readyState == 4 && http.status == 200) { 
res = http.responseText;  // These following lines get the response and update the page
document.getElementById("txtHint1").innerHTML=res;
  }
else
{
document.getElementById('txtHint1').innerHTML = "<div align='center'><img src='/akd/cms/images/loder.gif'></div>";
}
}


function getXHTTP( ) {
  var xhttp;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers…
      xhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttp = new XMLHttpRequest();
	    } catch (e3) {
	      xhttp = false;
	    }
      }
    }
  return xhttp; // Return the XMLHTTP object
}

var http = getXHTTP(); // This executes when the page first loads.

