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

if(ns4) {
document.write("<link rel=stylesheet href=\"ns4.css\" type=\"text/css\">")}

if(ie4){
document.write("<link rel=stylesheet href=\"ie4.css\" type=\"text/css\">")}

else if(ffx){
document.write("<link rel=stylesheet href=\"ffx.css\" type=\"text/css\">")}

 
function gotoCategory(index)
	{
	document.categories.submit();
	}


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('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 += 18;
	if (pos == old)
	{
    menu.style.top = pos;
	}
	old = pos;
	temp = setTimeout('movemenu()',300);
	if(document.body.id!="xx")
	return pos;
mbak();
}

function mbak(){

	if (window.innerHeight)
	{
   	pss = window.pageYOffset;
	}
	else if(document.documentElement && document.documentElement.scrollTop)
	{
	pss = document.documentElement.scrollTop;
	}
	else if(document.body)
	{
	pss = document.body.scrollTop;
	}
	if ((pss > 340) && (pss < 960))
		{
		if(ffx)
		{document.getElementById('lmen').style.backgroundColor = "#e8e0e0";}
		if(ie4)
		{document.all.lmen.style.backgroundColor = "#e8e0e0";}
		}else{
		if(ie4)
		{document.all.lmen.style.backgroundColor = "#e8e0e0";}
		if(ffx)
		{document.getElementById('lmen').style.backgroundColor = "transparent";}
	}
}
				// 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";}
	}


				// WRITE2LAYER

function rite(id,fcolor,text){
	var fcolor="<font color="+fcolor+">";
	if(ffx){
		document.getElementById(id).visibility="visible";
		document.getElementById(id).innerHTML = (fcolor+text);
		}
	else if(ie4)
		{
		var lyr= document.all[id];
		document.all[id].style.visibility="visible";
		lyr.innerHTML=(fcolor+text);
		}
	}
					// 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 popwin(foo) 
		{ 
myRemote = launch(foo+".html", "myRemote", "height=500,width=480,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0", "myWindow")
		}
