
    	function printPage() {
    		var currUrl = document.location.href;
    		
    		currUrl = currUrl.replace(/\.html/g, "/drucken.html");

		if(!currUrl.match(/\.html/g)) {
			currUrl += "drucken.html";
		}
		    	
    		var pp = window.open(currUrl, "printWnd", "width=800,height=600,scrollbars=yes,status=no,toolbar=no,menubar=yes,resizeable=yes");
    		pp.focus();

    	}
    	var showSitemap = true;
    	$(document).ready( function() {

    	fontSizerOnLoad(readCookie("size"));
    	
    	
    	
    	// add tip a friend link
    	$("#naviFooter").append("<li>" + $("#tipAFRIEND_container").html() + "</li>");
    	$("#tipAFRIEND_container").remove();
    	
    	// add the searchbox into the tab menu
    	$("#upperSearchBox").html( $(".tx-macinasearchbox-pi1").html() );
    	$(".tx-macinasearchbox-pi1").remove();
    	
    	// add the fontsizer to the footer
    	$("#naviFooter").append("<li>" + $("#fontSizer").html() + "</li>");
    	$("#fontSizer").remove();
    	
    	// add a print page link
    	
    	$("#naviFooter").append('<li><a href="javascript:printPage();">Seite drucken</a></li>');
    	
    	if($.cookie('cdaSitemap') == "false" ) {
    		$("#sitemap .tx-flseositemap-pi1").hide();
      showSitemap = false;
      document.getElementById("erweiternSM").style.display='block';
      document.getElementById("reduzierenSM").style.display='none';
    	}

    $("#toggleSM").click(function () {
    if(showSitemap) {
      $("#sitemap .tx-flseositemap-pi1").hide();
      showSitemap = false;
      document.getElementById("erweiternSM").style.display='block';
      document.getElementById("reduzierenSM").style.display='none';

      
   
     }
     else {
      $("#sitemap .tx-flseositemap-pi1").show();
      showSitemap = true;
      document.getElementById("erweiternSM").style.display='none';
      document.getElementById("reduzierenSM").style.display='block';
    
      }
      
      $.cookie('cdaSitemap', showSitemap, { expires: 7, path: '/' });

   });    
});
