ie4=(document.all)?true:false;
ns6=(document.getElementById)?true:false;
mac=(navigator.platform.indexOf("PPC"));



function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

var menu;
var theTop='';
var old='';

function init(foo)
    {
	menu = new getObj('leftxt');
	theTop = foo;
	old = theTop;
	movemenu();
    }

function movemenu()
    {
	if (window.innerHeight)
	{
    pos = window.pageYOffset
	}
	else if(document.documentElement && document.documentElement.scrollTop)
	{
	pos = document.documentElement.scrollTop
	}
	else if(document.body)
	{
    pos = document.body.scrollTop
	}
	if (pos < theTop) pos = theTop;
	else pos += 18;
	if (pos == old)
	{
    menu.style.top = pos;
	}
	old = pos;
	temp = setTimeout('movemenu()',300);
}

				// DIV & HISTORY OBJs

ho= new Array('home', 'ctr1', 'ctr2', 'ctr3', 'ctr4', 'ctr5', 'ctr6', 'ctr7');

nxt=1;

function bodx(){
document.body.title='';
nxt-=1;
}

function nxx(){nxt=0;}

				// DISPLAY BLOX

function play(foo){
	if(ie4){
		hidalgo();
		document.all[ho[foo]].style.display = "block";
		document.body.title='Double-Click for Return to Main Menu';
		nxt=foo+1;
		}
	else if(ns6){
		hidalgo();
		document.getElementById(ho[foo]).style.display = "block";
		document.body.title='Double-Click for Return to Main Menu';
		nxt=foo+1;
	}
}

function hidalgo(){
	if(ie4){
		location.href='#top';
		for(i=0; i< ho.length; i++){
		document.all[ho[i]].style.display = "none";
		}
	}
	else if(ns6){
		location.href='#top';
		for(i=0; i< ho.length; i++){
		document.getElementById(ho[i]).style.display = "none";
		}
	}
}

				// LIGHT-UP!

function linkon(foo){
	if(ie4){document.all[foo].style.color='#66CCFF';}
	else if(ns6){document.getElementById(foo).style.color='#66CCFF';}
}
function linkoff(foo){
	if(ie4){document.all[foo].style.color='#B34057';
			document.all[led].style.color='#66CCFF';}
	else if(ns6){document.getElementById(foo).style.color='#B34057';
			document.getElementById(led).style.color='#66CCFF';}
}


			// DOUBLE-CLICK ACTIONS

function clickIt(e)
{
	if(ie4)
	{
	locX=window.event.clientX;
	locY=window.event.clientY;
		if ((locX > 100) && (locY > 100))
			{
			hidalgo();window.location.reload();
			}
		}
		else if(ns6){
		hidalgo();window.location.reload();
	}
	else return true;
}	

		    	// REAL TURN-ON

function turnon(foo){
	if(document.images){
	imgOn=eval(foo+"on.src");
	document[foo].src=imgOn;
	}
}

function turnoff(foo){
	if(document.images){
	imgOff=eval(foo+"off.src");
	document[foo].src=imgOff;
	}
}
				// TOGGLE VIZ

function show(foo){
	if(ie4){
	document.all[foo].style.visibility="visible";
	return true;
	}
	else if(ns6)
	{
	document.getElementById(foo).style.visibility="visible";
	return true;
	}
else return false;
}

function hide(foo){
	if(ie4){
	document.all[foo].style.visibility="hidden";
	return true;
	}
	else if(ns6)
	{
	document.getElementById(foo).style.visibility="hidden";
	return true;
	}
else return false;
}

			    	// SCRIBBLER

function rite(foo,text){
clr="<font color='white'>";
fx	="</font>";
if(ie4)	{
		var lyr= document.all[foo];
		lyr.innerHTML=(clr+text+fx);
		}
else if(ns6)
		{
		document.getElementById(foo).innerHTML = (clr+text+fx);
		}
	}
					// POP WIN

function launch(newURL, newName, newFeatures, momma) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
  remote.opener = window;
  remote.opener.name = momma;
  return remote;
}

function popwin(foo) { 
myRemote = launch(foo+".html", "myRemote", "height=460,width=560,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0", "myWindow")
}
