ie4=(document.all)?true:false;
ffx=(document.getElementById)?true:false;
mac=(navigator.platform.indexOf("PPC"));

if(ie4){
document.write("<link rel=stylesheet href=\"ie.css\" type=\"text/css\">")}

else if(ffx){
document.write("<link rel=stylesheet href=\"ffx.css\" type=\"text/css\">")}


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;
	}
}

var menu;
var theTop='';
var old='';


function init(foo)
    {
	menu = new getObj('lmen');
	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 += 0;
	if (pos == old) 
		{ 
		menu.style.top = pos; 
		}
	old = pos;
	temp = setTimeout('movemenu()',300);
}

				// ROLLOVERS

function navOn(foo){
	if(ie4){document.all[foo].style.backgroundColor="35605B";}
	else if(ffx){document.getElementById(foo).style.backgroundColor="35605B";}
	}

function navOff(foo){
	if(ie4){document.all[foo].style.backgroundColor="40B3A2";}
	else	if(ffx){document.getElementById(foo).style.backgroundColor="40B3A2";}
}


function linkon(id, foo){
		if(ie4){
		if(foo==1){
			document.all[id].style.color="#FFF";
		}
		else document.all[id].style.color="#27F18C";
		}
		if(ffx){
		if(foo==1){
		document.getElementById(id).style.color="FFF";
		}
	else document.getElementById(id).style.color="#27F18C";
	}
}

			// SHOW - HIDE TIERS

a="";b="";c="";d="";e="";f="";g="";

function showTier(foo){
		switch (foo){
		case  "1": 
clearTimeout(a);showDiv('top11d');
clearTimeout(b);showDiv('top12d');
clearTimeout(c);showDiv('top13d');
		break;
		case  "2": 
clearTimeout(d);showDiv('top21d');
clearTimeout(e);showDiv('top22d');
clearTimeout(f);showDiv('top23d');
		break;
		case  "3": 
clearTimeout(g);showDiv('top31d');
		break;
	}
}

function hideTier(bar){
		switch(bar) {
		case "1": 
a=setTimeout("hideDiv('top11d')",400);
b=setTimeout("hideDiv('top12d')",400);
c=setTimeout("hideDiv('top13d')",400);
		break;

		case  "2": 
d=setTimeout("hideDiv('top21d')",400);
e=setTimeout("hideDiv('top22d')",400);
f=setTimeout("hideDiv('top23d')",400);
		break;
		case  "3":
g=setTimeout("hideDiv('top31d')",400);
		break;
	}
}
				// SHOW - HIDE


function showDiv(id){
	if(ie4){document.all[id].style.visibility="visible";}
	else if(ffx){document.getElementById(id).style.visibility="visible";}
	}
	
function hideDiv(id){
	if(ie4){document.all[id].style.visibility="hidden";}
	else if(ffx){document.getElementById(id).style.visibility="hidden";}
	}

					// WINDOW OPENER

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 launchRemote() 
		{ 
myRemote = launch("contact.html", "myRemote", "height=520,width=410,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0", "myWindow")
		}


function popWin(htm) 
		{
myRemote = launch(htm, "myRemote", "height=480,width=440,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0", "myWindow")
		}
