var _W=window,_D=document;

function sniff(){
	var t=this,T=true,F=false,n=navigator,ua=n.userAgent.toLowerCase();
	t.ver=parseInt(n.appVersion);
	t.mac=ua.indexOf('mac')!=-1;
	t.win=!t.mac&&ua.indexOf('wind')!=-1||ua.indexOf('16bit')!=-1;
	t.safari=ua.indexOf('safari')!=-1&&t.mac;
	t.konq=ua.indexOf('konqueror')!=-1;
	t.khtml=t.safari||t.konq;
	t.opera=_W.opera?T:F;
	t.opera5=ua.indexOf('opera 5')!=-1||ua.indexOf('opera/5')!=-1;
	t.opera6=ua.indexOf('opera 6')!=-1||ua.indexOf('opera/6')!=-1;
	t.opera7=t.opera&&_D.createComment?T:F;
	t.ie5=t.ie55=t.ie6=F;
	t.ie=_D.all&&!t.opera&&ua.indexOf('msie')!=-1?T:F;
	if(t.ie){
		t.ieBox=_D.compatMode!='CSS1Compat';
		t.ie5=!_D.fireEvent?T:F;
		t.ie55=_D.fireEvent&&!_D.createComment?T:F;
		t.ie6=_D.fireEvent&&_D.createComment?T:F
	}
	t.gecko=!t.khtml&&!_D.all&&!t.opera&&_D.getElementById?T:F;
	t.ns4=n.appName=='Netscape'&&t.ver==4
}
var is=new sniff(),op=is.opera;
function gE(e){if(_D.getElementById)return _D.getElementById(e);if(_D.all)return _D.all[e]}
function sE(e){e.style.visibility='visible'}
function hE(e){e.style.visibility='hidden'}
function SE(e){e.style.display=''}
function HE(e){e.style.display='none'}
function sX(e,x){op?e.style.pixelLeft=x:e.style.left=x+'px'}
function sY(e,y){op?e.style.pixelTop=y:e.style.top=y+'px'}
function sW(e,w){op?e.style.pixelWidth=w:e.style.width=w+'px'}
function sH(e,h){op?e.style.pixelHeight=h:e.style.height=h+'px'}
function wH(e,h){e.innerHTML=h}



function toggleMenu(item, nrItems) {
	var curItem = item, sub;
	// Set al submenus hidden
	for(var x=1; x<=nrItems; x++) {
		sub = gE('sub_'+x);
		if(sub == null) { continue; }
		sub.className = 'subHidden';
	}
	sub = gE('sub_'+curItem);
	if(sub == null) { return }
	sub.className = 'subVisible';
}