$(document).ready(function() {
	
	// Minimale Hoehe links anpassen
	/*
	var hoeheRight = 0;
	
	$("#image_right img").each(function(){
		var hthis = $(this).height();
		hoeheRight = hoeheRight+hthis+20;
		alert(hthis);
	});




	$("#content").css({
		minHeight: hoeheRight+"px",
		height: "auto !important",
		height: hoeheRight+"px"
	});
	
	
	$("#search-query:[class!=hasBeenFocused]").live("focus", function(){
		$(this).val("").addClass("hasBeenFocused");
	});
	*/
	$("#navigation").append('<div style="position:absolute;right:25px;top:62px;" id="mehr-container"><a href="#" onClick="return false;" style="position:absolute;right:0px;top:-30px;padding-left:40px;"><img src="/_bilder/mehr.jpg" alt="mehr" id="mehr-button" /></a></div>');
	$("#mehr-container").append('<div id="mehr-navi" style="display:none;"><ul style="margin-top:2px;margin-right:14px;"></ul></div>')
	
	$("#mehr-container").hover(function(){
		$("#mehr-navi").show();
	}, function(){
		$("#mehr-navi").hide();
	});
	
	var breite = 0;
	$("#navigation ul#garn-navi li").each(function(i){
	//	$("#content").append( i+": "+$(this).position().top + " - " + $(this).position().left + "<br>" );
		breite = breite+$(this).width();
		
		if(breite > 830) {
			$("#mehr-navi ul").append( '<li>' + $(this).html() + "</li>");
			$(this).remove();
		}
		
		
		
	});
	
	
	
	
});


function validEmail(email) {
  var strReg = "^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$";
  var regex = new RegExp(strReg);
  return(regex.test(email));
}

function checkdateformat(datum){
	var dateformat = /^\d{2}(\.)\d{2}(\.)\d{4}$/;
	var result = dateformat.test(datum);
	return result;
}

function checktimeformat(time){
	var dateformat = /^\d{2}(\:)\d{2}$/;
	var result = dateformat.test(time);
	return result;
}
