
	function highlight_menu(highlight_type, menu_name, submenu_name, submenu_page) {
		$("ul.css-tabs > li > a").removeClass("current");
		$("ul.css-menu-tabs > li > a").removeClass("current");
		
		// mainmenu - highlight the main menu entry and swipe the submenu pane
		if (highlight_type == 'mainmenu') {
			$("ul.css-tabs > li > a[href='"+menu_name+"']").addClass("current");
			if (eval("typeof " + $('div.submenu_wrapper').scrollable().seekTo + " == 'function'")) { // check if the function exists
				$('div.submenu_wrapper').scrollable().seekTo(submenu_page);
			}
		}
		
		// submenu
		if (highlight_type == 'submenu') {
			$("ul.css-tabs > li > a[href='"+menu_name+"']").addClass("current");
			$("ul.css-menu-tabs > li > a[href='"+submenu_name+"']").addClass("current");
			if (eval("typeof " + $('div.submenu_wrapper').scrollable().seekTo + " == 'function'")) { // check if the function exists
				$('div.submenu_wrapper').scrollable().seekTo(submenu_page);
			}
		}
		// no menu
		if (highlight_type == 'nomenu') {
			if (eval("typeof " + $('div.submenu_wrapper').scrollable().seekTo + " == 'function'")) { // check if the function exists
				$('div.submenu_wrapper').scrollable().seekTo(submenu_page);
			}
		}
		
	}
	
	function menu_click(menu_id) {
		
			$.ajax({
			  url: "getcontent.php?page=" + menu_id,
			  success: function(data) {
			  	$("#css-panes > div").html(data);
			  }
			});

		}
		
		function submenu_click(submenu_id) {
			$.ajax({
			  url: "getcontent.php?page=" + submenu_id,
			  success: function(data) {
			  	$("#css-panes > div").html(data);
			  }
			});
		}
		
		function submenu2_click(submenu2_id) {
			$.ajax({
			  url: "getcontent.php?page=" + submenu2_id,
			  success: function(data) {
			  	$("#css-panes > div").html(data);
			  }
			});
		}
		
		
		function getSize(imgSrc){
			var aImg = new Image();
			aImg.src = imgSrc;
			aHeight = newImg.height; aWidth = newImg.width;
			alert (aHeight);
		}
		
		
		
		function kop_backgr_anim(imgSrc, divBackground, counter, shadow, fadeIn) {
			var newImg = new Image();
			newImg.src = imgSrc;
			if (newImg.height > 0) { // if the background image is ok
				var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
				if ( (fadeIn == true) || (IE6 == true) ) { // fade in
						divBackground.css('background', 'url("' + imgSrc + '") no-repeat scroll left top #FFFFFF');
						if (shadow) {
							divBackground.html('<img src="img/shadow.png" />');
						}
					divBackground.fadeTo("slow", 1);
				} else { // without fade in
					divBackground.css('background', 'url("' + imgSrc + '") no-repeat scroll left top #FFFFFF');
					if (shadow) {
						divBackground.html('<img src="img/shadow.png" />');
					}
					
				}
				var height = 265 - newImg.height;
				
				var aImg = new Image();
				aImg.src = newImg.src;
				aHeight = newImg.height;

				var durationSec = 35 * (newImg.height - 265);
			
				while (counter > 0) {
					divBackground.animate({backgroundPosition:"(0px " + height + "px)"}, {duration:durationSec});
					divBackground.animate({backgroundPosition:"(0px 0px)"}, {duration:durationSec});
					counter = counter - 1;
				}
			} else {
				var delay = function() { kop_backgr_anim(imgSrc, divBackground, counter, shadow, false); };
				setTimeout(delay, 1200);
			}
		}
	
		
		
		
		
		
		$(document).ready(function(){
			
			$("#footer").fadeTo("slow", 0.3); // This sets the opacity of the thumbs to fade down to 30% when the page loads
			$("#footer").hover(function(){
			$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
			},function(){
				$(this).fadeTo("slow", 0.3); // This should set the opacity back to 30% on mouseout
		 	});
		 	
		 	
		 	
		 	
		 	
		 	$("p.footer_left > a > img").fadeTo("fast", 0)
		 	$("p.footer_left > a").hover(function(){
		 		$("img", this).fadeTo("fast", 1.0);
	 		},function(){
	 			$("img", this).fadeTo("fast", 0);
			});
		 	
		 	
		 	// set the current URL in the print-footer
		 	$("#footer_url").text("URL: " + window.location.href);

		 	
		});
