function mouseoverinit() {
	if (!document.getElementById) return;
	preloads=new Array();
	imgs=document.getElementsByTagName('img');
	for (i=0;i<imgs.length;i++) {
		for (j=0; j<imgs[i].attributes.length; j++) {
			tt = imgs[i].attributes[j].name.toUpperCase();
			if (tt == "SWAP") {
				soff = imgs[i].getAttribute('src'); son = soff.replace("_off","_on");
				preloads[i] = new Image(); preloads[i].src = son;
				imgs[i].onmouseover = new Function("imgs["+i+"].src='"+son+"'");
				imgs[i].onmouseout = new Function("imgs["+i+"].src='"+soff+"'");
			}
		}
	}
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}


function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}


brns4 = (document.layers)?true:false;
brie = (document.all && !window.opera)?true:false;
brie4 = (document.all && !document.getElementById)?true:false;
briewin = (window.ActiveXObject)?true:false;
brdom = (document.getElementById)?true:false;
brmoz = (window.sidebar)?true:false;
brns6 = (window.sidebar&&navigator.userAgent.indexOf('Netscape')!=-1)?true:false;
bropera = (window.opera)?true:false;
brmac = (navigator.userAgent.indexOf('Mac')!=-1)?true:false;
briemac = ((navigator.userAgent.indexOf('Mac')!=-1) && (document.all&&(!window.opera)))?true:false;

if (brns4) document.location.href="/oldbrowser.htm";

document.write('<STYLE>\n');
document.write('.menuitemover,.menuitem {\n');
if (brie) document.write('width:120px;\n');
else document.write('width:109px;\n');
document.write('padding-left:11px;\n');
document.write('cursor:default;\n');
document.write('}\n');
document.write('</STYLE>\n');

var hrefs,speed;
colon = new Array(); coloff = new Array();
bgcolon = new Array(); bgcoloff = new Array();
timo = new Array();

bgcoloff[0]="240,240,240"; 	bgcolon[0]="200,200,200";
coloff[0]="#404040";	colon[0]="#202020";
bgcoloff[1]="140,140,140"; 	bgcolon[1]="96,96,96";
coloff[1]="#F6F6F6";	colon[1]="#FFFFFF";

speed=30;
function fadein(i,n,p) {
	if (i>=100 && i<200) {
		hidemenus();

		posx=findPosX(document.getElementById('menu'+i))+document.getElementById('menu'+i).offsetWidth-1-10;
		posy=findPosY(document.getElementById('menu'+i));

		if (document.getElementById("submenu"+(i-100)).style.visibility!="hidden") {
			document.getElementById("submenu"+(i-100)).style.left=posx;
			document.getElementById("submenu"+(i-100)).style.top=posy-1;


		}
	}
}
function fadeout(i,n) {
//	document.getElementById("submenu"+(i-100)).style.left=-999;
}

function hidesub(i) {
	if (document.getElementById("submenu"+(i-100))) document.getElementById("submenu"+(i-100)).style.left=-999;
}
function hidemenus() {
	if (removemenus) {
		for (x=100;x<=105;x++) hidesub(x);
	}
	removemenus=true;
}

function checkmouse(e) {
	if (allloaded) {
		if (brie) {
			//if (event.clientY>285 || event.clientY<60) hidemenus();
		}
		if (brmoz) {
			//if (e.pageY>285 || e.pageY<60) hidemenus();
		}
	}
}

chosenpoll=-99;
function poll(n) {
	if (chosenpoll!=-99) document.images["poll"+chosenpoll].src="/_img/polloff.gif";
	document.images["poll"+n].src="/_img/pollon.gif";
	document.forms["pollform"].chosenpoll.value=n;
	chosenpoll=n;
}

function surfto(n) {
	if (brie) document.getElementById("cl_"+n).click();
	else document.location.href="/"+n+"/";
}

function init() {
	allloaded=true;
	mouseoverinit();
}
allloaded=false;
removemenus=true;
document.onclick=hidemenus;
document.onmousemove=checkmouse;
window.onload=init;