function changeLeftTab(tab,tabset,category,value,defaults,position)
{
if(tab!='' && tabset !='')
{
	for(var i=1;i<10;i++)
	{
	if(document.getElementById('left_tab_'+tabset+'_'+i))
	{
	if(i==tab)
	{
	document.getElementById('left_tab_'+tabset+'_'+i).className='menuselected';
	}
	else
	{
	document.getElementById('left_tab_'+tabset+'_'+i).className='menu';
	}
	}
	}
	if (value=="")
	  {
	  document.getElementById("left_div_"+tabset).innerHTML="";
	  return;
	  }
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		document.getElementById("left_div_"+tabset).innerHTML=xmlhttp.responseText;
		}
		else
		{
		document.getElementById("left_div_"+tabset).innerHTML="<div style='text-align:center;padding-top:40px;padding-bottom:40px;'>News Loading...<br><img src='myimages/deshabhimani_loading.gif'></div>";
		}
	  }
	xmlhttp.open("GET","leftInnerNews.php?category="+category+"&value="+value+"&defaults="+defaults+"&p="+position+"&ttime="+Math.random(),true);
	xmlhttp.send();
}	
}


/****************WEATHER************************/
function showWeather(str)
{
if (str=="")
  {
  document.getElementById("div_weatherwidget").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("div_weatherwidget").innerHTML=xmlhttp.responseText;
    }
	else
	{
	document.getElementById("div_weatherwidget").innerHTML="<div style='text-align:center;padding-top:40px;padding-bottom:40px;'>News Loading...<br><img src='myimages/deshabhimani_loading.gif'></div>";
	}
  }
xmlhttp.open("GET","getWeather.php?str="+str+"&ttime="+Math.random(),true);
xmlhttp.send();
}
/*****************EOF WEATHER********************/

/************************************************/
function changeDistrict(district_id)
{
if (district_id=="")
  {
  document.getElementById("constituency_div").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("constituency_div").innerHTML=xmlhttp.responseText;
    }
	else
	{
	document.getElementById("constituency_div").innerHTML="<img src='myimages/deshabhimani_loading.gif'>";
	}
  }
xmlhttp.open("GET","getConstituency.php?district_id="+district_id+"&ttime="+Math.random(),true);
xmlhttp.send();
}

function changeConstituency(constituency_id)
{
if (constituency_id=="")
  {
  document.getElementById("election_result_div").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("election_result_div").innerHTML=xmlhttp.responseText;
    }
	else
	{
	document.getElementById("election_result_div").innerHTML="<div style='text-align:center;padding-top:40px;padding-bottom:40px;'><img src='myimages/deshabhimani_loading.gif'></div>";
	}
  }
xmlhttp.open("GET","election_result_2011.php?constituency_id="+constituency_id+"&ttime="+Math.random(),true);
xmlhttp.send();
}
function changeState(state_id)
{
if (state_id=="")
  {
  document.getElementById("kakshinila_div").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("kakshinila_div").innerHTML=xmlhttp.responseText;
    }
	else
	{
	document.getElementById("kakshinila_div").innerHTML="<div style='text-align:center;padding-top:40px;padding-bottom:40px;'><img src='myimages/deshabhimani_loading.gif'></div>";
	}
  }
xmlhttp.open("GET","kakshinila.php?state_id="+state_id+"&ttime="+Math.random(),true);
xmlhttp.send();
}
function changeDistrict1(district_id1)
{
if (district_id1=="")
  {
  document.getElementById("constituency1_div").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("constituency1_div").innerHTML=xmlhttp.responseText;
	document.getElementById("election_result_div1").innerHTML="";
    }
	else
	{
	document.getElementById("constituency1_div").innerHTML="<img src='myimages/deshabhimani_loading.gif'>";
	}
  }
xmlhttp.open("GET","getConstituency1.php?district_id1="+district_id1+"&ttime="+Math.random(),true);
xmlhttp.send();
}

function changeConstituency1(constituency_id1)
{
if (constituency_id1=="")
  {
  document.getElementById("election_result_div1").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("election_result_div1").innerHTML=xmlhttp.responseText;
    }
	else
	{
	document.getElementById("election_result_div1").innerHTML="<div style='text-align:center;padding-top:40px;padding-bottom:40px;'><img src='myimages/deshabhimani_loading.gif'></div>";
	}
  }
xmlhttp.open("GET","election_result_20111.php?constituency_id1="+constituency_id1+"&ttime="+Math.random(),true);
xmlhttp.send();
}
/***********************************************/
