// getBrowserWidth is taken from The Man in Blue Resolution Dependent Layout Script
// http://www.themaninblue.com/experiment/ResolutionLayout/
	function getBrowserWidth(){
		if (window.innerWidth){
			return window.innerWidth;}	
		else if (document.documentElement && document.documentElement.clientWidth != 0){
			return document.documentElement.clientWidth;	}
		else if (document.body){return document.body.clientWidth;}		
			return 0;
	}

//addEvent() by John Resig
	function addEvent( obj, type, fn ){ 
	   if (obj.addEventListener){ 
	      obj.addEventListener( type, fn, false );
	   }
	   else if (obj.attachEvent){ 
	      obj["e"+type+fn] = fn; 
	      obj[type+fn] = function(){ obj["e"+type+fn]( window.event ); } 
	      obj.attachEvent( "on"+type, obj[type+fn] ); 
	   } 
	} 

	if (formObj = document.getElementById("cdu_nrw_aktuell")) {
	}
	
	function dynamicLayout(){
		var browserWidth = getBrowserWidth();

		buttonObj = document.getElementById("cdu_nrw_aktuell_button");

		if (formObj = document.getElementById("cdu_nrw_aktuell")) {
			menuDropDownHide(formObj);
			menuDropDownHide(buttonObj);

			if (browserWidth > 1280){
				formObj = menuDropDownShow(formObj,"outside");
				buttonObj = menuDropDownShow(buttonObj,"outside");

			} else {
				formObj = menuDropDownShow(formObj,"inside");
				buttonObj = menuDropDownShow(buttonObj,"inside");
			}
		}
	}

//Run dynamicLayout function when page loads and when it resizes.
	addEvent(window, 'load', dynamicLayout);
	addEvent(window, 'resize', dynamicLayout);// dynamicLayout by Kevin Hale

