function searchSubmit () {
	//alert($F("searchLabel"));
}

Nav = Class.create();
Nav.prototype = {

	initialize: function () {
		
		var subNav = $("nav").getElementsByTagName("ol");
		for (var i=0;i<subNav.length;i++) {
			Event.observe(subNav[i].parentNode,"mouseover",this.show.bindAsEventListener(this,subNav[i].parentNode));
			Event.observe(subNav[i].parentNode,"mouseout",this.show.bindAsEventListener(this,subNav[i].parentNode));
		}
		
		var tmp = $("nav").getElementsByTagName("li");
		for (var i=0;i<tmp.length;i++) {
			if (tmp[i].parentNode.tagName!="OL") {
				if (tmp[i].className!="on") {
					Event.observe(tmp[i],"mouseover",this.roll.bindAsEventListener(this));
					Event.observe(tmp[i],"mouseout",this.roll.bindAsEventListener(this));
				}
			}
		}
		
		for (var i=0;i<subNav.length;i++) {
			var tmp = subNav[i].getElementsByTagName("a");
			for (var j=0;j<tmp.length;j++) {
				Event.observe(tmp[j],"mouseover",this.rollParent.bindAsEventListener(this,true));
				Event.observe(tmp[j],"mouseout",this.rollParent.bindAsEventListener(this,false));
			}
		}
		
	},
	
	show: function (e,o) {
		var o = o.getElementsByTagName("ol")[0];
		o.style.visibility = (o.style.visibility=="hidden"||o.style.visibility=="") ?"visible" :"hidden";
	},
	
	roll: function (e) {
		var o = (Event.element(e).tagName=="LI") ?Event.element(e) :Event.element(e).parentNode;
		(Element.hasClassName(o,"on")) ?Element.removeClassName(o,"on") :Element.addClassName(o,"on");
	},
	
	rollParent: function (e,rolling) {
		var o = Event.element(e).parentNode.parentNode.parentNode;
		(rolling) ?o.addClassName("on") :o.removeClassName("on");
	}

}

function globalInit () {
	//Event.observe($("searchLaunch"),"click",searchSubmit);
	myNav = new Nav();
	
	//Maximise
	if(document.location.href.indexOf('maxi=true') != -1){
		window.moveTo(0,0);
		window.resizeTo(screen.availWidth,screen.availHeight);
	}
}

Event.observe(window,"load",globalInit);