/*

startList = function() {
	if (document.all && document.getElementById && document.getElementById("subNav")) {
		navRoot = document.getElementById("subNav");
		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=this.className.replace(" over", "");
			}
		}
	}
}
}
//window.onload=startList;



zoomInOut = function() {
	articleRoot = document.getElementById("article");
	if(articleRoot.style.fontSize == undefined || articleRoot.style.fontSize == "" || articleRoot.style.fontSize == "100%"){
		articleRoot.style.fontSize = "132%";
		articleRoot.style.lineHeight = "1.8em";
	} else {
		articleRoot.style.fontSize = "100%";
		articleRoot.style.lineHeight = "1.6em";
	}
	zoomObj = document.getElementById("zoomContainer");
	for (i=0; i<zoomObj.childNodes.length; i++) {
		node = zoomObj.childNodes[i];
		if (node.nodeName=="A") {
			if(node.className == "zoomin") {
				node.className = node.className.replace("zoomin", "zoomout");
			} else {
				node.className = node.className.replace("zoomout", "zoomin");
			}
		}
	}
}

*/


	
/*
Written by Jonathan Snook, http://www.snook.ca/jonathan
Add-ons by Robert Nyman, http://www.robertnyman.com
*/

function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)
}


sfHover = function() {
	var sfEls = getElementsByClassName(document, "div", "subNav");
	
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
	
}
//if (window.attachEvent) window.attachEvent("onload", sfHover);

//Init's onload
var inits = [
	'loginbutton'
];

 /**
	name			loginbutton
	description		Functionality concerning the login button
	author			[GB]
**/
var loginbutton = {
	init: function () {
		document.getElementById("loginWrppr").onmouseover = function (){
			loginbutton.showMenu();
		}
		document.getElementById("loginWrppr").onmouseout = function (){
			loginbutton.hideMenu();
		}
		loginbutton.hideMenu();
	},
	showMenu: function () {
		document.getElementById("loginBtn").className = "loginBtn_over";
		document.getElementById("loginMn").style.display = "block";
	},
	hideMenu: function (){
		document.getElementById("loginBtn").className = "loginBtn_normal";
		document.getElementById("loginMn").style.display = "none";
	}
}

var init = new Boolean(false);
function initializeAll() {
	if(init){
		init=false;
		sfHover;
		for (var i=0;i<inits.length;i++) {
			if (window[inits[i]])
				window[inits[i]].init();
		}
	}
}

/* for Mozilla/Opera9 */
if (document.addEventListener) {
	document.addEventListener("DOMContentLoaded", initializeAll, false);
}
/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
	var _timer = setInterval(function() {
		if (/loaded|complete/.test(document.readyState)) {
			initializeAll(); // call the onload handler
		}
	}, 10);
}

/* for other browsers */
window.onload = initializeAll;











