function AnzPlus(WhatForm) {
	nAktMenge = WhatForm.menge.value;
	if (nAktMenge + "" == "") nAktMenge = 0;
	nNeuMenge = Number(nAktMenge)+1;
	WhatForm.menge.value = nNeuMenge;
}

function AnzMinus(WhatForm) {
	nAktMenge = WhatForm.menge.value;
	if (nAktMenge + "" == "") nAktMenge = 0;
	if (Number(nAktMenge) > 1) {
		nNeuMenge = Number(nAktMenge)-1;
	} else {
		nNeuMenge = 1;
	}	
	WhatForm.menge.value = nNeuMenge;
}

function CheckBestellForm(whatForm) {
	if (!CheckNumbers(whatForm.menge.value) ) {
		alert("Bitte nur Zahlen verwenden");
		whatForm.menge.focus();
		return false;
	}
	return true;
}

function CheckNumbers(strString) {
	var strNumbers=new String("0123456789");
	for (var i=0;i<strString.length;i++) {
		if (strNumbers.indexOf(strString.charAt(i))<0) return false;
	}
	return true;
}


	var EditWin=null;
	
function OpenPopupVersandkosten () {
	var url="PopupVersandkosten.asp";
	var w=510;
	var h=360;
	var t=(screen.height-h)/2;
	var l=(screen.width-w)/2;
	if (EditWin!=null) {
		if (EditWin.closed == false) EditWin.close();	
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	else {
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	EditWin.focus();
}

function OpenPopupAGB () {
	var url="PopupAGB.asp";
	var w=600;
	var h=460;
	var t=(screen.height-h)/2;
	var l=(screen.width-w)/2;
	if (EditWin!=null) {
		if (EditWin.closed == false) EditWin.close();	
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	else {
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	EditWin.focus();
}

function OpenPopupWiderruf () {
	var url="PopupWiderruf.asp";
	var w=600;
	var h=460;
	var t=(screen.height-h)/2;
	var l=(screen.width-w)/2;
	if (EditWin!=null) {
		if (EditWin.closed == false) EditWin.close();	
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	else {
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	EditWin.focus();
}

function OpenPopupDatenschutz () {
	var url="PopupDatenschutz.asp";
	var w=600;
	var h=460;
	var t=(screen.height-h)/2;
	var l=(screen.width-w)/2;
	if (EditWin!=null) {
		if (EditWin.closed == false) EditWin.close();	
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	else {
		EditWin=window.open(url,'Popup','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width='+w+' , height='+h+', left='+l+', top='+t);
	}
	EditWin.focus();
}


if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}

function popLayer(nAll, strProdText, yPos2){

if (nAll == 1 || String(nAll) == "undefined") { 
	strText = " Der Artikel wurde in den Warenkorb gelegt.<br /><br />"; 
} else {
	strText = strProdText + "<br /><br />";
}	

strText = strText + "<div style=\"float:left; width:120px; text-align:center\"><a href=\"javascript:hideLayer()\">Weiter einkaufen</a></div><div style=\"float:left; width:120px; text-align:center; padding-left:5px; \"><a href=\"warenkorb-1.asp\">Zum Warenkorb</a></div><br style=\"clear:both\">";
strText = strText + "<div class=\"abstand\" style=\"height:10px\"></div>";
strText = strText + "<div style=\"text-align:center;\"><a href=\"javascript:hideLayer()\">Fenster schliessen</a></div>"
desc = "<div style=\"border: 1px solid #000; background-color:#FFF; width:250px; height:100px; margin: 10px;\">" + strText + "</div>";

if(navigator.family =="nn4") {
	xPos = 280;
	yPos = 0;
	if (String(yPos2) != "undefined") yPos = yPos2 + 10; else { yPos = 300;  xPos = 350; } 
	
	document.object1.document.write(desc);
	document.object1.document.close();
	document.object1.left = xPos;
	document.object1.top = yPos;
}
else if(navigator.family =="ie4"){
	xPos = 280;
	yPos = 0;

	if (String(yPos2) != "undefined") yPos = yPos2 + 180; else { yPos = 340; xPos = 350;}
	
	object1.innerHTML=desc;
	object1.style.pixelLeft = xPos;
	object1.style.pixelTop = yPos;
}
else if(navigator.family =="gecko"){
	xPos = 280;
	yPos = 0;
	if (String(yPos2) != "undefined") yPos = yPos2 + 10; else { yPos = 380;  xPos = 350; } 
	
	xPos = String(xPos) + "px";
	yPos = String(yPos) + "px";
    document.getElementById("object1").innerHTML=desc;
	document.getElementById("object1").style.left = xPos;
    document.getElementById("object1").style.top = yPos;
	}
	

}
//  :::::::: versteckt die PopUp-Box ::::::::
function hideLayer(){
	if(navigator.family =="nn4") {eval(document.object1.top="-500");}
    else if(navigator.family =="ie4"){object1.innerHTML="";}
    else if(navigator.family =="gecko") { document.getElementById("object1").style.top="-500px";}
}
//  :::::::: überwacht Maus-Position / plaziert die Box dementsprechend ::::::::
var isNav = (navigator.appName.indexOf("Netscape") !=-1);
function handlerMM(e){
	x = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
	y = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
}

if (isNav){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = handlerMM;


function Bookmark() {
	strURL = "http://www.mondogusto.de";
	strTitel = "Mondogusto.de - Die Welt des Geschmacks";
	if(navigator.family =="nn4") { window.sidebar.addPanel(strTitel, strURL, strTitel);  }
    else if(navigator.family =="ie4") { window.external.AddFavorite(strURL, strTitel);}
    else if(navigator.family =="gecko") { window.sidebar.addPanel(strTitel, strURL, strTitel); }
	
}