// Menu Actions
var visible,hidden,useMenu;
var actMenu="";
var menuDelay=3000;

if(document.layers) //NS 4
{
 visible='show';
 hidden='hide';
} else if(document.all || document.getElementById) { //IE & NS 6
 visible='visible';
 hidden='hidden';
}

function reveal(menu)
{
 if(document.layers) //NS 4
 {
  useMenu=document.layers['menuHolder'].document.layers[menu];
 } else if(document.all) { //IE
  useMenu=document.all(menu).style;
 } else if(document.getElementById) { //NS 6
  useMenu=document.getElementById(menu).style;
  useMenu.width=220+'px';
 }

 if(actMenu.visibility==visible && actMenu!=useMenu) actMenu.visibility=hidden;
 useMenu.visibility=visible;
 actMenu=useMenu;
};

function hide()
{
 if(actMenu.visibility==visible) actMenu.visibility=hidden;

 if(document.layers) //NS 4
 {
 } else if(document.getElementById) { //NS 6
  document.getElementById('menuHolder').style.width=100;
 }
}

// Floating menu
function floatMenu()
{
	var top_offset=105;

 if(document.all) //IE
 {
  if(document.body.scrollTop> top_offset )
  {
   document.all.menuHolder.style.pixelTop=document.body.scrollTop+5;
  } else {
   document.all.menuHolder.style.pixelTop= top_offset;
  }
 } else if(document.layers) { //NS 4
  if(window.pageYOffset> top_offset)
  {
   document.layers['menuHolder'].top=window.pageYOffset+5;
  } else {
   document.layers['menuHolder'].top= top_offset;
  }
 } else if(document.getElementById) { //NS 6
  if(window.pageYOffset> top_offset)
  {
   document.getElementById('menuHolder').style.top=window.pageYOffset+5+'px';
  } else {
  document.getElementById('menuHolder').style.top= top_offset+'px';
  }
 }
};

if(document.all)
{
 window.onscroll=floatMenu;
} else {
 setInterval('floatMenu()',100);
};
// End Floating Menu

// NS 4 CSS Resize Bug Fix
function nsCssFix()
{
 if (document.nsCss.nsCssFix.initWindowWidth != window.innerWidth || document.nsCss.nsCssFix.initWindowHeight != window.innerHeight)
  document.location = document.location;
};

function nsCssFixCheckIn()
{
 if(navigator.appName=='Netscape' && parseInt(navigator.appVersion)==4)
 {
  if(typeof document.nsCss=='undefined')
   document.nsCss = new Object;

  if(typeof document.nsCss.scaleFont=='undefined')
  {
   document.nsCss.nsCssFix=new Object;
   document.nsCss.nsCssFix.initWindowWidth=window.innerWidth;
   document.nsCss.nsCssFix.initWindowHeight=window.innerHeight;
  }
  window.onresize=nsCssFix;
 }
};

var timeHide;

function initPage()
{
hide();
nsCssFixCheckIn();
};

function popup(img)
{
 var avHeight=window.screen.availHeight-40;
 if(avHeight>1120) { avHeight=1120; }
// if(avHeight>960) { avHeight=960; }
 
 var popupwin=window.open(img,'popup','width=535,height='+avHeight+',scrollbars,resizable');
 popupwin.focus();
};

/* AJAX Method Check */
function checkAJAX()
{
 try { ajaxTMP=new XMLHttpRequest(); }// FF, Op8+, Safari
 catch(e) {
  try { ajaxTMP=new ActiveXObject("Msxml2.XMLHTTP"); }// IE6+
  catch(e) {
   try { ajaxTMP=new ActiveXObject("Microsoft.XMLHTTP"); }// IE5+
   catch(e) {
    alert("Your browser does not support AJAX!");
    return false;
   }
  }
 }
 return ajaxTMP;
};
/**/

function home_content_ajax(mode,item)
{
	var ajaxReq=checkAJAX();

	ajaxReq.onreadystatechange=function() { if(ajaxReq.readyState==4) { document.getElementById("home_content_ajax").innerHTML=ajaxReq.responseText; } }

	ajaxReq.open("GET","/ajax.usa?m="+mode+"&i="+item,true);
	ajaxReq.send(null);

}