function hideAd(context)
{
   hideDiv('ad');
    
   var xmlHttp;
   try
   {
      //Firefox
      xmlHttp=new XMLHttpRequest();
   }
   catch (e)
   {
      //Internet Explorer
      try
      {
         xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
      }
      catch (e)
      {
         try
         {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
         }
         catch (e)
         {
            return false;
         }
      }
    }
    
    xmlHttp.onreadystatechange = function()
    {
      if(xmlHttp.readyState==4)
      {
         if (  xmlHttp.responseText )
         {

         }
      }
    }

    xmlHttp.open("GET",context + "/am/hidead.html");
    xmlHttp.send(null);
}

function showHelp(context,helpId)
{
    window.open(context+"/am/showhelp.html?id="+helpId,"help","width=500,height=700,scrollbars=yes,location=no,titlebar=no,toolbar=no,menubar=no");
}


function toggleDiv(id)
{
	if (document.getElementById)
	{
		if ( document.getElementById(id).style.display == "block" )
		{
		  document.getElementById(id).style.display = "none";
		}
		else
		{
		  document.getElementById(id).style.display = "block";
		}
	}
}


function reportAbuse(context,a,b)
{
    var link = context + "/reportabuse.html?a=" + a + "&b=" + b;
    window.open(link,"","height=430,width=450");
}

function subStyle(obj,cn)
  {
   obj.className = cn;
  }


function props(obj)
  {
   for ( prop in obj) 
       {
        document.writeln( prop + " " + obj[prop] + "<BR>" );
       }
  }


function selectedIndex(e)
{
    for ( i = 0; i < e.length; i++ )
    {
        if ( e[i].checked ) 
        return i;
    }

    return -1;
}


function setAll(f,b,e)
{
  e = f[e];
  if ( e )
  {
     if ( e.length )
     {
       for (i = 0; i < e.length; i++)
       {
           e[i].checked = b.checked;
       }
     }
     else
     {
       e.checked = b.checked;
     }
  }
}

function selectAll(who,e,b)
{
  f = document.forms[who];
  e = f[e];

  if ( e )
  {
     if ( e.length )
     {
       for (i = 0; i < e.length; i++)
       {
           e[i].checked = b.checked;
       }
     }
     else
     {
       e.checked = b.checked;
     }
  }  
}


function hl(obj,b)
{
  while (obj.tagName!="TR")
  {
    obj=obj.parentElement;
  }
 
  obj.className = ( b ) ? "row" : "";
}

function showDiv(id)
{
   if (document.getElementById)
   {
      document.getElementById(id).style.display = "block";
   }
   else if (document.all)
   {
      document.all[id].style.display = "block";
   }
}

function hideDiv(id)
{
   if (document.getElementById)
   {
      document.getElementById(id).style.display = "none";
   }
   else if (document.all)
   {
      document.all[id].style.display = "";
   }
}

function loadRSS(context)
{ 
   var xmlHttp;
   try
   {
      //Firefox
      xmlHttp=new XMLHttpRequest();
   }
   catch (e)
   {
      //Internet Explorer
      try
      {
         xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
      }
      catch (e)
      {
         try
         {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
         }
         catch (e)
         {
            return false;
         }
      }
    }
    
    xmlHttp.onreadystatechange = function()
    {
      if(xmlHttp.readyState==4)
      {
         if (  xmlHttp.responseText )
         {
             if (document.getElementById)
             {
                document.getElementById("rssblock").innerHTML = xmlHttp.responseText;
             }
             else if (xmlHttp.responseText)
             {
                document.all["rssblock"].innerHTML = xmlHttp.responseText;
             }
         }
      }
    }

    xmlHttp.open("GET",context + "/am/rsscontent.html");
    xmlHttp.send(null);
}