function dropOut(idArray)	{
	$each(idArray, function(tagNames, id) {
		$each(tagNames, function(tagName) {
			var tempElement = $(id);
			if(tempElement) {
				tags = tempElement.getElementsByTagName(tagName);

				$each(tags, function(element, i){
					element.origClassName = element.className;
					element.onmouseover=function() {
						this.className+=' acthover';
					}
					element.onmouseout = function() {
						this.className=this.origClassName;
					}
				});
			}
		});
	});
}

function setMarginLeftToParentWidth()	{
	$each($$('div.secondlevel'), function(element, id)	{
		element.setStyle('padding-left', element.getParent().getStyle('width').toInt());
	});
}

function checkResolution()	{
	var wh = (window.getHeight() == 0) ?  window.getScrollHeight() : window.getHeight();
	
	if(wh < 693)	{
		new Element('link').setProperties({'rel': 'stylesheet', 'type': 'text/css', 'media' : 'screen', 'href': 'fileadmin/brigittegspan/css/stylesSmall.css'}).injectInside(document.head);
	}	
}

window.addEvent('domready', function() {
	checkResolution();
	dropOut({'navigation' : ['li']});
	setMarginLeftToParentWidth();
});
