function showlayer(i) {
	document.getElementById(i).style.display = 'block';
}

function hidelayer(i) {
	document.getElementById(i).style.display = 'none';
}


    function _onload() {
        var menu = document.getElementById('menu');
        var list_elements = menu.getElementsByTagName('li');
        for (i in list_elements) {
            e = list_elements[i];
            e.onmouseover = function() {
                this.className += ' hover';
                if (typeof(gallery_pause_if_ie) != "undefined") {
                	gallery_pause_if_ie();
                }
            }
            
            e.onmouseout = function() {
                this.className = '';
                if (typeof(gallery_resume) != "undefined") {
                	gallery_resume();
                }
            }
        }
    }

function getURLVar(urlVarName) {
	//divide the URL in half at the '?' 
	var urlHalves = String(document.location).split('?');
	var urlVarValue = '';
	if(urlHalves[1]){
		//load all the name/value pairs into an array 
		var urlVars = urlHalves[1].split('&');
		//loop over the list, and find the specified url variable 
		for(i=0; i<=(urlVars.length); i++){
			if(urlVars[i]){
				//load the name/value pair into an array 
				var urlVarPair = urlVars[i].split('=');
				if (urlVarPair[0] && urlVarPair[0] == urlVarName) {
					//I found a variable that matches, load it's value into the return variable 
					urlVarValue = urlVarPair[1];
				}
			}
		}
	}
	return urlVarValue;   
}

// Dropobjekt
window.addEvent("domready", function() {
	$$('.drop').each(function(extendable) {
		extendable.triggerElement = extendable.getElementsBySelector('.drop-rub')[0];
		
		if (extendable.triggerElement != null) {
			extendable.triggerElement.style.cursor = "pointer";
			extendable.triggerElement.fxAnimator = new Fx.Slide(extendable.getElementsBySelector('.drop-content', {duration: 500})[0]);
			extendable.triggerElement.addEvent('click', function() {
			  if (window.ie6) {
			    // IE6 doesn't like Fx.Slider.
			    this.fxAnimator.show();
			  } else {
			    this.fxAnimator.toggle();
		    }
			});
			if (extendable.getElementsBySelector('.error').length == 0) {
			  extendable.triggerElement.fxAnimator.hide();
		  }
		}
	});
});