var cnt=-1;
function show_stats(count,webid)
{
   close_popup();
   document.getElementById("popup").style.width="365px"; 
   if(count!=cnt)
   {
   var content='<div id=pphdr>Blog watch</div><div id=ppcnt>Loading, please wait.....<img src="images/ajax_loader.gif"></div>';
   cnt=count;
   stats_popup(content);
   var param='sts.e?webid='+webid;
   var loader=new net.ContentLoader(param,loddata,'popup',null,'GET',null);
   }
   else
	document.getElementById('popup').style.display='block';
  cnt=count;
   
}

function loddata()
{
        var data = this.req.responseText;
        stats_popup(data);
}

function stats_popup(content) {

	left=document.getElementById("news").offsetLeft+72;
	var top=0;
        var browserName=navigator.appName;
	var objid=document.getElementById('rowid'+cnt);
	do
        {
                top+=objid.offsetTop;
        } while(objid = objid.offsetParent);

        if(browserName=="Microsoft Internet Explorer"){
	top +=30;
	}
	else top+=26;
        document.getElementById("popup").style.top=top+"px";
	document.getElementById("popup").style.left=left+"px";
	document.getElementById("popup").innerHTML=content;
	document.getElementById("pphdr").style.width=document.getElementById("ppcnt").style.width;
        document.getElementById("popup").style.display="block";
}
function close_popup()
{
        document.getElementById("popup").style.display="none";
}



