// JavaScript Document
// JavaScript Documentvar xmlHttp

function add_cand(str)
{
	//document.getElementById(str).style.display='block';
	//alert('hi');
	//return false;
//alert(str);
document.getElementById(str).innerHTML="";
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="add.php";
url=url+"?q="+str;
alert(url);
//url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById('test').innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}


function check_other()
{
	//document.getElementById(str).style.display='block';
	//alert('hi');
	//return false;
//alert(document.candidate.cloc.value);
if(document.candidate.cloc.value=="Other"){
	//alert("sd");
	document.getElementById('other_country').style.visibility='visible';
	document.getElementById('other_country1').style.visibility='visible';
}
else
{
	document.getElementById('other_country').style.visibility='hidden';
	document.getElementById('other_country1').style.visibility='hidden';
}
}
