﻿var xml_top;
var page_name='volume';
function but_click(img_id1,pn)
	{
		document.all("top"+img_id1).className="saa";
			
		for(img_no=1;img_no<=4;img_no++)
		{
			if(img_no!=img_id1)
			{
				document.all("top"+img_no).className="sma";
			}
				
		}
		//get_on_change(img_id1-1)
		page_name=pn
		load_top(pn)
	}

function change_hand2(img_id,hand)
	{
		if(hand==true)
			document.all(img_id).style.cursor ="hand";
		else	
			document.all(img_id).style.cursor ="default";
	}
	
function DoCallback2(url)
{
var xmlRequest=null;
	try
	{
		xmlRequest=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			xmlRequest=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(oc)
		{
			xmlRequest=null;
			xmlRequest= new XMLHttpRequest(); 
		}
	}
	if(!xmlRequest&&typeof XMLHttpreqADSuest!="undefined")
	{
		xmlRequest=new XMLHttpreqADSuest();
	}
 xmlRequest.open("POST", url, true);
   xmlRequest.send(null);
   return  xmlRequest;
}

function looping_top_fun(t)
{
page_name=t;
load_top(page_name);

setTimeout("looping_top_fun(page_name)",300000);
}

function load_top(t)
{
try
{
	var url="backend/get_top.aspx?t="+t;
	
	 xml_top=DoCallback2(url);

	if (xml_top!=null)
	{
	xml_top.onreadystatechange=ref_top
	}
}
catch(e)
{
//alert(e)
}
}

function ref_top()
{
try
{
if (xml_top.readyState==4)
	{
	if (xml_top.status==200)
		{
		var str1=xml_top.responseText 
//alert(str1)
//td_ms.innerHTML=str1;
if (str1==0)
{

}
else
{
document.getElementById("td_top").innerHTML=str1;
}
}
}
}
catch(e)
{
//alert(e)
}

}




