var light = new Array();

function initNavigation() {
	if (document.getElementById) {
		navRoot = document.getElementById("navigation");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className="";
				}
			}
		}
		
		bagRoot = document.getElementById("bagz");
		for (i=0; i<bagRoot.childNodes.length; i++) {
			node = bagRoot.childNodes[i];
			if (node.nodeName=="A") {
				light[light.length] = node.id;
				node.onmouseover=function(){
					for(i=0;i<light.length;i++){
						if(light[i]!=this.id){
							document.getElementById(light[i]).className+=' lolight';
						}
					}
				}
				node.onmouseout=function(){
					for(i=0;i<light.length;i++){
						document.getElementById(light[i]).className=document.getElementById(light[i]).className.replace(' lolight','');
					}
				}
			}
		}
	}
}

function initAgendaPaginering()	{
	if( paginering = document.getElementById('col1') )
	{
		html = '';
		e = paginering.getElementsByTagName('*');
		
		for(i = 0; i < e.length; i++ ){
			if( e[i].className == 'currentPage' ){
				html += '<option selected>'+e[i].innerHTML+'</option>';
			}
			else if( e[i].tagName == 'A' ){
				html += '<option value="'+e[i].href+'">'+e[i].innerHTML+'</option>';
			}
		}
		
		paginering.innerHTML = '<select onchange="window.location=this.value;">'+html+'</select>';
	}
	
	if( paginering = document.getElementById('col2') )
	{
		html = '';
		e = paginering.getElementsByTagName('*');
		
		for(i = 0; i < e.length; i++ ){
			if( e[i].className == 'currentPage' ){
				html += '<option selected>'+e[i].innerHTML+'</option>';
			}
			else if( e[i].tagName == 'A' ){
				html += '<option value="'+e[i].href+'">'+e[i].innerHTML+'</option>';
			}
		}
		
		paginering.innerHTML = '<select onchange="window.location=this.value;">'+html+'</select>';
	}
}