
	/**
	*
	* Print Preview
	*
	*/
	var truePrint = false;

	function PrintOrNot() {
  		var myPrint = location.search;
  		if (myPrint.indexOf("print=true") > -1) {
    		truePrint = true;
  		}
	}
	PrintOrNot();

	function printWindow(x) {
		window.open(x+"?print=true","_new","toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
	}
	if (truePrint == true) {
		document.write('<style type="text/css" media="screen">@import url(_SYSTEM/css/print/print.css);</style>');
	}



	/**
	*
	* Reads all a Elements within col2 and rewrites it in the footer div
	*
	*/
	
	var oldBrowser = navigator.appVersion.indexOf("MSIE 5");

if (oldBrowser == -1) {
	if (truePrint == true && oldBrowser == -1) {
		$(document).ready(function(){
	
			var links = new Array();
			var content = "<h4>Verwendete Links:</h4>";

			var dateAndTime = new Date();
			var day = dateAndTime.getDate();
			var month = dateAndTime.getMonth() + 1;
			var year = dateAndTime.getFullYear();
			var hours = dateAndTime.getHours();
			var minutes = dateAndTime.getMinutes();
			if (minutes < 10)	{ 
				Minuten= "0" + String(minutes);
			}
			var dateString = "<p>&nbsp;</p><p>Erzeugt am: "+day+"."+month+"."+year+" um " + hours + ":"+minutes+"</p>";

			$("#footer").html(dateString);

//			links =  $("#col2:visible a[@href]").get();
			links =  $("#col2:visible a.tbl").get();

			for (var i = 0; i < links.length; i++) {
				content += "<p style='margin:0;padding:0;'>" + links[i] + "</p>"; 
			} 
			content += dateString;

			if (links.length > 0) {
				$("#footer").html(content);
			}
			else {
				$("#footer").html("&nbsp;");
			}

 		});
	}
	else {
		$(document).ready(function(){
			var blendStatus = true; 
			$("a.blend").click(function() { 
				if (blendStatus == true) {
					$("a.ausblenden").css({ background: "#551285", color: "#FFFFFF" });
					$("a.einblenden").css({ background: "#FFFFFF", color: "#005EC2" });
					$("ul.sitemap").find("ul:visible").slideUp("slow"); 
					$("a.blend").text("Dritte Ebene einblenden");
					blendStatus = false;
					return;
				}
				if (blendStatus == false) {
					$("a.blend").css({ background: "#551285", color: "#FFFFFF" });
					$("a.blend").css({ background: "#FFFFFF", color: "#005EC2" });
					$("ul.sitemap").find("ul:hidden").slideDown("slow");
					$("a.blend").text("Dritte Ebene ausblenden");
					blendStatus = true;
					return;
				}
			});
		
	
 		});
	}
}
	
/*test*/

/*
$(document).ready(function() {
  var toggle = function(direction, display) {
    return function() {
      var self = this;
      var ul = $("ul", this);
      if( ul.css("display") == display && !self["block" + direction] ) {
        self["block" + direction] = true;
        ul["slide" + direction]("slow", function() {
          self["block" + direction] = false;
        });
      }
    };
  }
  $("ul.sitemap li").hover(toggle("Down", "none"), toggle("Up", "block"));
  $("ul.sitemap li ul").hide();
});
*/
