function showmyinfo()
{
  document.getElementById('time').style.setAttribute("width","900px");
  document.getElementById('time').style.setAttribute("height","43px");
  document.getElementById('time').style.setAttribute("backgroundColor","#1770AD");
  if(loggedin==1)
  {
    var loggedinmsg="You are logged in";
  }
  else
  {
    var loggedinmsg="You are not logged in.";
  }
  var myinfo="<table cellspacing=0 cellpadding=0 width=100%><tr><td width=140 valign=top><a href='javascript:hidemyinfo();'><img border=0 src=images/myinfo.gif></img></a><br>"+speedinfo+"</td><td valign=top><table cellspacing=0 cellpadding=0 width=100% border=1 bordercolor=#FFFFFF><tr><td align=left><font size=2>IP:"+ip+"<br>Speed:"+kbs+"kbs</font></td><td>"+loggedinmsg+"</td></tr></table></td></tr></table>";
  document.getElementById('time').setAttribute("innerHTML",myinfo);
}
function hidemyinfo()
{
  document.getElementById('time').style.setAttribute("width","300px");
  document.getElementById('time').style.setAttribute("height","20px");
  document.getElementById('time').style.setAttribute("backgroundColor","");
  document.getElementById('time').setAttribute("innerHTML","<table cellspacing=0 cellpadding=0 width=100%><tr><td valign=top width=140><a href='javascript:showmyinfo();'><img border=0 src=images/myinfo.gif></img></a><br>"+speedinfo+"</td><td valign=top></td></tr></table>");

}

function linkclick(url,name)
{
  ajax_url='functions.inc.php?ajax_link_hit=1&url='+url+'&name='+name;
  globalurl=url;
  var xmlhttp=false;
  try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
   try {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (E) {
    xmlhttp = false;
   }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }
  xmlhttp.open("GET",ajax_url,true);
  xmlhttp.onreadystatechange = function() {
	if(xmlhttp.readyState == 4){
         // document.getElementById("debug").setAttribute("innerHTML",xmlhttp.responseText);
         document.location.href=globalurl;
       }
 }
  xmlhttp.send(null);
}

function scroll()
{
 //alert("scroll event detected! "+window.pageXOffset+" "+window.pageYOffset+" "+document.documentElement.scrollTop+" "+document.documentElement.scrollLeft+" "+document.body.scrollHeight+" "+document.body.scrollWidth+" "+document.body.clientHeight+" "+document.body.clientWidth);
 
 if(document.documentElement.scrollTop>233)
 {
   if(browser=="ie")
   {
     //document.getElementById("backtotop").style.setAttribute("top",(0));
     document.getElementById("backtotop").style.setAttribute("display","");
   }
   else
   {
     //document.getElementById("backtotop").style.setProperty("top",(0)+"px",null);
     document.getElementById("backtotop").style.setProperty("display","",null);
   }
 }
 else
 {
   if(browser=="ie")
   {
     //document.getElementById("backtotop").style.setAttribute("top",(0));
     document.getElementById("backtotop").style.setAttribute("display","none");
   }
   else
   {
     //document.getElementById("backtotop").style.setProperty("top",(0)+"px",null);
     document.getElementById("backtotop").style.setProperty("display","none",null);
   }
 }
 // note: you can use window.innerWidth and window.innerHeight to access the width and height of the viewing area
}
