/* Warenkorb Check ___________________________________*/

function CheckAnzahl(sFormular) {
	var j;
	
	for (j = 0; j < sFormular.nAnzahl.value.length; j++) {
	
		if (sFormular.nAnzahl.value.charAt(j) < "0" || sFormular.nAnzahl.value.charAt(j) > "9") {
			alert(textmenge);
			sFormular.nAnzahl.focus();
			return;   
		}								
	}
	
	if (sFormular.nAnzahl.value < 1) {
		alert(textmenge);
		sFormular.nAnzahl.focus();
		return;
	} else {
		sFormular.submit();	
	}
}


/* PopUp ______________________________________________*/

	function openWin( windowURL, windowName, windowFeatures ) {
		return window.open(windowURL, windowName, windowFeatures); 
	}

	function openImage(windowURL) {
		newWindow = window.open(windowURL , 'Picture', 'width=200,height=200,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0'); 
		newWindow.focus();
	}


/* PopUp Resize _______________________________________*/

	function resize() { 
		
		var x, y;
		
		window.moveTo(0, 0);

		x = document.bild.width;
		y = document.bild.height;

		window.resizeTo(x+10,y+56);
	}

	function checksize() {

		if (document.bild.complete == true)	{
			resize();
		}
		else {
			window.setTimeout("checksize()", 200);
		}
	}


/* Image Change _______________________________________*/

	function wechseln(sThis, sImage) {

		if (document.images) {
			document.getElementById(sThis).src = sImage;
		}
	}


/* Submenu Visibility _________________________________*/

	var aktiv, letztes = null, letztesaufzu = null;

	function aufzu (welches) {

		if (document.getElementById(welches).style.display == 'block') {
			document.getElementById(welches).style.display = 'none';
		}
		else {
			document.getElementById(welches).style.display = 'none';
			document.getElementById(welches).style.display = 'block';
		}
		
		void(0);
	}

	function aufzuauto (welches) {
	
		if (letztesaufzu != null && letztesaufzu != welches) {
			document.getElementById(letztesaufzu).style.display = 'none';
			letztesaufzu = null;
		}

		if (document.getElementById(welches).style.display == 'block') {
			document.getElementById(welches).style.display = 'none';
		}
		else {
			document.getElementById(welches).style.display = 'none';
			document.getElementById(welches).style.display = 'block';
			letztesaufzu = welches;
		}
		
		void(0);
	}
	
	function nurzu () {

		if (letztes != null) {
			document.getElementById(letztes).style.display = 'none';
			clearTimeout(aktiv);
			letztes = null;
		}
		return false;
	}

	function nurauf (aktuelles) {

		if (letztes != null) {
			clearTimeout(aktiv);
			document.getElementById(letztes).style.display = 'none';
		}
		
		document.getElementById(aktuelles).style.display = 'block';
		letztes = aktuelles;
		return false;
	}
	  
	function nurzutimer () {
		aktiv = setTimeout('verzoegern()', 1000);
	}

	function verzoegern () {

		if (letztes != null) {
			document.getElementById(letztes).style.display = 'none';
			letztes = null;
		}
		
		return false;
	}

	function stop () {
		clearTimeout(aktiv);
	}
