function getRes() {
		var width=0;
		width_cur = document.body.offsetWidth
		width_max = 947;
		diff = width_cur - width_max +180;
		box_width = 180;
		if (width_cur <= width_max) {
			//alert ('Achtung: '+width_cur );
			 document.getElementById("overlay").style.width = "1px";
		}else {
			/* html_inline_1 = 'Boxbreite: '+diff+'<br>';
			 html_inline_2 = 'Aktuelle Breite: '+width_cur+'<br>';
			 html_inline_3 = 'Maximale Breite: '+width_max+'<br>';
			 document.getElementById("overlay").innerHTML = html_inline_1 + html_inline_2 + html_inline_3;
			*/
			document.getElementById("overlay").style.width = box_width;
			document.getElementById("overlay").style.right = '0px';
		}
	}


function open_print_popup(url, width, height, winname) {
    var old = self;
    //var trails="width=" + width + ",height=" + height + ",toolbar=no,directories=no,status=no,scrollbars=no,resize=no,menubar=no";
    var trails="width=" + width + ",height=" + height + ",toolbar=yes,location=no,status=yes,scrollbars=yes,resizable=yes,left=0,top=0";
    newWindow=window.open(url,winname,trails);
    newWindow.focus();
    return false;
    }


function load_url(option) {
   var arg = load_url.arguments;
   var v = option.options[option.selectedIndex].value;
   if (arg.length > 1) {
      var w = arg[1];
   } else {
      var w = self;
   }
   if (v != "" && v != "#") {
      w.location.href = v;
   }
}

function mainmenu(){
	$(" #nav ul ").css({display: "none"}); // Opera Fix
	$(" #nav li").hover(function(){
			$(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).slideDown("fast");
			},function(){
			$(this).find('ul:first').css({visibility: "hidden",display: "none"});
			});
	}

	 $(document).ready(function(){
		mainmenu();
});


$(document).ready(function(){
	$("form#sorting-form").css("display","block");
	$("div#sorting-links").css("display","none");
}
);