// JavaScript Document
		
		function hilfethemen() {
			$(".hilfethemen").accordion({
				header: "h3"
			});	
		}
		
		function jQuery_function() {
			$("#spalte_links").css("height", $(window).height()-85-33);
			$("#spalte_rechts").css("height", $(window).height()-85-33);
			$("#spalte_mitte").css("left", $("#spalte_links").width());
			$("#spalte_mitte").css("right", $("#spalte_rechts").width());
			$("#spalte_mitte").css("height", $(window).height()-85-33);
			$("#spalte_mitte").css("width", $(window).width()-$("#spalte_links").width()-$("#spalte_rechts").width());
			$("#spalte_links .box").css("width", $("#spalte_links").width()-6);
			
			$("#spalte_links").resizable(
				{
				handles:"e",
				transparent: true,
				minWidth: 125,
				maxWidth: 150,
				resize:
					function() {
						$("#spalte_mitte").css("left", $("#spalte_links").width());
						$("#spalte_mitte").css("width", $(window).width()-$("#spalte_links").width()-$("#spalte_rechts").width());
						$("#spalte_links .box").css("width", $("#spalte_links").width()-6);
						$("#box4").css("width", $("#spalte_mitte").width());
					}
				}
			);	
			
			$("#spalte_rechts").resizable(
				{
				handles:"w",
				transparent: true,
				minWidth: 150,
				maxWidth: 300,
				resize:
					function() {
						$("#spalte_mitte").css("right", $("#spalte_rechts").width());
						$("#spalte_mitte").css("width", $(window).width()-$("#spalte_links").width()-$("#spalte_rechts").width());
						$("#spalte_links .box").css("width", $("#spalte_links").width()-6);
						$("#box4").css("width", $("#spalte_mitte").width());
					}
				}
			);
			
			$("#box2").css("height", $("#spalte_links").height()-$("#box1").height());
			$("#box2 .text").css("height", $("#box2").height()-36);
			$("#box1").css("height", $("#spalte_links").height()-$("#box2").height());
			$("#box1 .text").css("height", $("#box1").height()-36);
			
			
			$("#box2").resizable(
				{
				handles:"n",
				transparent: true,
				minHeight: 37,
				maxHeight: $("#spalte_links").height()-35,
				resize:
					function() {
						$("#box1 .text").css("height", $("#spalte_links").height()-$("#box2").height()-35);
						$("#box2 .text").css("height", $("#box2").height()-36);
						$("#box1").css("overflow", "visible");
					},
				start:
					function() {
						$("#box1").css("overflow", "hidden");	
					}
				}
			);
						
			$("#box4").css("height", $("#spalte_mitte").height()-$("#box3").height());
			$("#box4 .text").css("height", $("#box4").height()-36);
			$("#box3").css("height", $("#spalte_mitte").height()-$("#box4").height());
			$("#box3 .text").css("height", $("#box3").height()-36);
			
			$("#box4").css("width", $("#spalte_mitte").width());
			
						
			$("#box4").resizable(
				{
				handles:"n",
				transparent: true,
				minHeight: 36,
				maxHeight: $("#spalte_mitte").height()-35,
				resize:
					function() {
						$("#box3 .text").css("height", $("#spalte_mitte").height()-$("#box4").height()-35);
						$("#box4 .text").css("height", $("#box4").height()-36);
						$("#box3").css("overflow", "visible");
					},
				start:
					function() {
						$("#box3").css("overflow", "hidden");	
					},
				stop:
					function() {
						$("#box3").css("overflow", "visible");	
					}
				}
			);
			
			$("#box6").css("height", $("#spalte_rechts").height()-$("#box5").height());
			$("#box6 .text").css("height", $("#box6").height()-36);
			$("#box5").css("height", $("#spalte_rechts").height()-$("#box6").height());
			$("#box5 .text").css("height", $("#box5").height()-36);
			
						
			$("#box6").resizable(
				{
				handles:"n",
				transparent: true,
				minHeight: 37,
				maxHeight: $("#spalte_rechts").height()-35,
				resize:
					function() {
						$("#box5 .text").css("height", $("#spalte_rechts").height()-$("#box6").height()-35);
						$("#box6 .text").css("height", $("#box6").height()-36);
						$("#box5").css("overflow", "visible");
					}
				}
			);
			
		}
   
		function doSomething() {
			jQuery_function();
		};
		
		function forms() {
			$(":password").addClass("password");
			$(":text").addClass("text2");
			$(":submit").addClass("submit");
			$(":reset").addClass("reset");
			$(":button").addClass("button");
			$(":radio").addClass("radio");
			$(":checkbox").addClass("checkbox");
			$(":file").addClass("file");
			$("select").addClass("select");	
		}
		
		var resizeTimer = null;
		
		$(window).bind('resize', function() {
			if (resizeTimer) clearTimeout(resizeTimer);
			resizeTimer = setTimeout(doSomething, 1);
		});
		

		// Füge bestimmte "class" zu allen Form-Elementen hinzu

		$(document).ready(function(){
			
			jQuery_function();
			
			// Schicke das Formular beim Drücken von Enter ab
			
			$("form input").keypress(
				function (e) {
					if( e.which == 13 ) {
						$(this).parents("form").submit();	
					}
				}
			);
			
			
			forms();
			
			
			
			$("table td").attr("valign", "top");
			
			$("#logo").click(
				function() {
					window.location.href = "index";	
				}
			);
			
			$("#jquery_jplayer").jPlayer();
			$("#jquery_jplayer").jPlayerId("play", "play");
			$("#jquery_jplayer").jPlayerId("pause", "pause");
			$("#jquery_jplayer").jPlayerId("stop", "stop");
			$("#jquery_jplayer").jPlayerId("volumeMin", "vmute");
			$("#jquery_jplayer").jPlayerId("volumeMax", "vmax");
			$("#jquery_jplayer").jPlayerId("volumeBar", "vhalf");
			
		});
			
		$("*").ajaxStop(function(){
			forms();
		});
		
		function minimieren(id) {
			$("div[aria-labelledby='ui-dialog-title-"+id+"']").hide();
			$("#"+id+"_windowbar").effect("highlight");
		}
		
		function oeffnen(id, windowbar) {
			$("#windowbar").append('<div id="'+id+'_windowbar" class="windowbox" style="display:none;">'+windowbar+'</div>');
			$("#"+id+"_windowbar").corners();
			$("#"+id+"_windowbar").fadeIn("slow");
			$("#"+id+"_windowbar").click(function() {
				$("div[aria-labelledby='ui-dialog-title-"+id+"']").show();
				$("#"+id+"_windowbar").effect("highlight");
				$("#"+id).dialog("moveToTop");
			});
			$(".onfocus").focus();	
		}
		
		function schliessen(id) {
			$("#"+id+"_windowbar").fadeOut("slow", function() { $("#"+id+"_windowbar").remove(); });
		}