nav = document.layers;
IE4 = document.all;

isNav4 = (nav) ? true : false;
isIE4 = (IE4) ? true : false; 

if(isNav4)
{
	function allobj(ID)
	{ 
		this.style = document.layers[ID]; 
	}
	document.all = new Array(); 
}

function init()
{ 
	if(isNav4)
	{ 
		end = document.layers.length;
		for(i=0; i < end; i++)
		{
			id = document.layers[i].name;
			document.all[id] = new allobj(id);
		}
	}
} 
function hideME()
{
 if (isIE4)
 {
  document.all["sknav"].style.display = "none";
  tmp.innerHTML = "<small><A HREF=\"\" onClick=\"showME(); return false;\">Show Nav</A></small>";
 }
 if (isNav4)
 {
  document.layers["sknav"].style.visible = "false";
  tmp.innerHTML = "<small><A HREF=\"\" onClick=\"showME(); return false;\">Show Nav</A></small>";
 }
}

function showME()
{
 if (isIE4)
 {
  document.all["sknav"].style.display = "";
  tmp.innerHTML = "<small><A HREF=\"\" onClick=\"hideME(); return false;\">Hide Nav</a></small>";
 }
 if (isNav4)
 {
  document.layers["sknav"].style.visible = "true";
  tmp.innerHTML = "<small><A HREF=\"\" onClick=\"showME(); return false;\">Show Nav</A></small>";
 }
}
function moveIt2()
{
 var test
 if (isIE4)
 {
  
  document.all["ts"].style.left = 500
 }
 if (isNav4)
 {

 }
}


function showINFO()
{
 var test
 if (isIE4)
 {
  yada.innerHTML = "<A HREF=\"\" onclick=\"hideINFO(); return false;\">Hide Area Info</a>";
  document.all["info"].style.display = "";
 }
 if (isNav4)
 {

 }
}
function hideINFO()
{
 var test
 if (isIE4)
 {
  yada.innerHTML = "<A HREF=\"\" onclick=\"showINFO(); return false;\">Show Area Info</a>";
  document.all["info"].style.display = "none";
 }
 if (isNav4)
 {

 }
}

function moveIt(){
 if (isIE4)
 {
  realleft = eval(document.all["st"].style.left.substring(0,document.all["st"].style.left.length - 2)); 
  if (realleft < 640) 
  {
   document.all["st"].style.left = realleft += 1;
   timerId = setTimeout("moveIt()",20);
  }
 }

 if (isNav4)
 {
  function moveIt()
  {
   if (document.layers["st"].left < 640) 
   {
    document.layers["st"].left += 1;
    timerId = setTimeout("moveIt()",20);
   }
  }
  moveIt();
 }
}


function catchEvent(id,event_type,function_name){

 if (isNav4)
 {
  event_to_capture = "Event." + event_type.toUpperCase();
             
  if(id=="document")
  {
   dom = document;
   eval("document.captureEvents(" + event_to_capture + ")");
  }else{             
   dom = document.layers[id];
   eval("document.layers['" + id + "'].captureEvents(" + event_to_capture + ")");
  }
 }
 else if(isIE4)
 {
  if(id == "document")
  {
   dom = document;
  }else{
   dom = document.all[id];
  }
 }
 temp_event = "on" + event_type.toLowerCase();
 dom[temp_event] = eval(function_name);
}



function letgoEvent(id,event_type,function_name)
{
 if (isNav4)
 {
  dom = document.layers[id];            
 }
 else if(isIE4)
 {
  dom = document.all[id];
 }
 temp_event = "on" + event_type.toLowerCase();
 dom[temp_event] = null;
}