function AGBChecke(){
	var radio;
	var auswahl;
	radio = document.agb_gelesen_form.gelesen;
	for(var i=0;radio[i];i++)
	{
	    if(radio[i].checked){
			auswahl = radio[i].value;
			if(auswahl == "ja" && document.getElementById('unsichtbar').className == "div_unsichtbar"){
				document.getElementById('unsichtbar').className = "div_sichtbar";
			
			}else{
				document.getElementById('unsichtbar').className = "div_unsichtbar";
			}
		}	
	}
}


function checkBoxForInput(obj) {
	if (obj.name == "login") {
		if (obj.value == "Kundenname") {
			obj.value = "";
			obj.className = "box-login-aktiv";		
		}
		else if (obj.value == "") {
			obj.value = "Kundenname";
			obj.className = "box-login-inaktiv";
		}
	}
	else if (obj.name == "password") {
		if (obj.value == "Passwort") {
			obj.value = "";
			obj.className = "box-login-aktiv";
			obj.type = "password";
		}
		else if (obj.value == "") {
			obj.value = "Passwort";
			obj.className = "box-login-inaktiv";
			obj.type = "password";
		}
	}
}

//Function zum Vorladen

try {
	(function($) {
		var cache = [];
		// Arguments are image paths relative to the current page.
		$.preLoadImages = function() {
			var args_len = arguments.length;
			for (var i = args_len; i--;) {
				var cacheImage = document.createElement('img');
				cacheImage.src = arguments[i];
				cache.push(cacheImage);
			}
		}
	})(jQuery)
}
catch (e) {
	//Fehlerbehandlung
}

try {
	$(document).ready(function() {
		/*
		z.B.
		"image1.gif",
		"/path/to/image2.png"
		*/
		//Hier zwischen Bilder zum Vorladen einfuegen (nur Bilder, die nicht sofort sichtbar werden ohne Interaktion!)
		jQuery.preLoadImages(
	
		);
		$("img.hover").hover(
		function() {
			oldsrc = $(this).attr("src");
			oldwidth = $(this).attr("width");
			oldheight = $(this).attr("height");
			oldalt = $(this).attr("alt");
			oldtitle = $(this).attr("title");
			newsrc = oldsrc;
			newsrc = newsrc.replace(".jpg","-gr.jpg");
			newsrc = newsrc.replace(".png","-gr.png");
			newsrc = newsrc.replace(".gif","-gr.gif");
			newsrc = newsrc.replace("images/","images/vergroesserung/");
//			$("#re-bi-hover").html('<img src="' + newsrc + '">');
//			$("#re-bi-hover").fadeIn("slow");
			$(this).removeAttr('alt');
			$(this).removeAttr('title');
			$(this).removeAttr('width');
			$(this).removeAttr('height');
			$(this).css({'position' : 'absolute'});
			$(this).css({'z-index' : '100'});
			$(this).attr({'src' : newsrc});
		}
		,
		function() {
			$(this).css({'position' : ''});
			$(this).attr({'height' : oldheight});
			$(this).attr({'width' : oldwidth});
			$(this).attr({'alt' : oldalt});
			$(this).attr({'title' : oldtitle});
			$(this).attr({'src' : oldsrc});
			$(this).css({'z-index' : '0'});
			}
		);
	});
}
catch (e) {
	//Fehlerbehandlung
}

