var xmlHttp
var str
var img
var usr
var pos

//For Year 2008

function showoptionmonth(titleid,previousyear)
{
//alert($currentyear);
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="archive/showoptionmonth.php";
url=url+"?titleid="+titleid;
url=url+"&previousyear="+previousyear;
//url=url+"?sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("show").innerHTML=xmlHttp.responseText;
}
else
	{ 
	document.getElementById("show").innerHTML="<img src=\"archive/images/003.gif\">";
	}
}



function showmonth(flag,titleid,previousyear)
{
	
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  
var url="archive/showmonth.php";
url=url+"?flag="+flag;
url=url+"&titleid="+titleid+"&previousyear="+previousyear;
//url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=statefin;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
//alert(titleid);
} 

function statefin() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("fin").innerHTML=xmlHttp.responseText;
}
else
	{ 
	document.getElementById("fin").innerHTML="<img src=\"archive/images/003.gif\">";
	}

}


//For year 2008

function showoptions1(titleid,currentyear)
{
//alert($currentyear);
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="archive/showoptions1.php";
url=url+"?titleid="+titleid;
url=url+"&currentyear="+currentyear;
//url=url+"?sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged1;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged1() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("show").innerHTML=xmlHttp.responseText;
}
else
	{ 
	document.getElementById("show").innerHTML="<img src=\"archive/images/003.gif\">";
	}
} 

function showfin(flag,titleid,currentyear)
{
	
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  
var url="archive/showfin.php";
url=url+"?flag="+flag;
url=url+"&titleid="+titleid+"&currentyear="+currentyear;
//url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=statefin1;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
//alert(titleid);
} 

function statefin1() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("fin").innerHTML=xmlHttp.responseText;
}
else
	{ 
	document.getElementById("fin").innerHTML="<img src=\"archive/images/003.gif\">";
	}

}





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;
}
//----------------------------------------------

