/**
 * This function creates a loading queue for the page and adds events to it. 
 * Using this function is a good idea when you need to load a lot of different
 * things along side the page.
 */
function addLoadEvent(func) {
	var oldonload = window.onload;

	if (typeof window.onload != 'function')
		window.onload = func;
	else
		window.onload = function() {
			oldonload();
			func();
		}
}

addLoadEvent(function() {
	var browser_sucks = /*@cc_on!@*/false;
	
	if (browser_sucks) {
		var drops = document.getElementById('navbuttons').getElementsByTagName('li');
		
		for (x in drops) {
			drops[x].onmouseover = function() { 
				this.className = 'hovered'; 
				
				var sels = document.getElementsByTagName('select');
				
				for (x in sels) {
					if (typeof(sels[x]) != 'object') continue;
					sels[x].style.visibility = 'hidden';
				}
			};
			
			drops[x].onmouseout  = function() { 
				this.className = ''; 
				
				var sels = document.getElementsByTagName('select');
				
				for (x in sels) {
					if (typeof(sels[x]) != 'object') continue;
					sels[x].style.visibility = 'visible';
				}
			};
		}
	}
});