function dlg(dialog, newurl) {
	if (confirm(dialog)) {
		window.location.replace(newurl);
	}
}
function sw(pg,tab) {
	if (pg != -1)
		document.form2.pg.value=pg;
	if (tab != -1)
		document.form2.tab.value=tab;
	document.form2.act.value="calc";
	document.form2.submit();
}

function addtomap() {
	document.form2.act.value="addtomap";
	document.form2.submit();
}
function addtocart() {
	document.form2.act.value="addtocart";
	document.form2.submit();
}

function updatePrice(){
	updateNodes();	

	var preis = artikelPreis+additionalPrice;
	if (document.all) {
		document.all.Summe.innerText = formatNumber(preis, '.##0,00');
	} else if (document.getElementById) {
		document.getElementById("Summe").innerHTML = formatNumber(preis, '.##0,00');
	}
}

function calc(first, tar, nam) {
	var preis = artikelPreis;
	if (document.all) {
		document.all.Summe.innerText = formatNumber(preis, '.##0,00');
		if (tar!=null) {
			targ=eval("document.all."+tar);
			targ.innerText= nam;
		}
	} else if (document.getElementById) {
		document.getElementById("Summe").innerHTML = formatNumber(preis, '.##0,00');
		if (tar!=null) {
			document.getElementById(tar).innerHTML = nam;
		}
	} else if (first<1){
		document.form2.submit();
	}
}
function detailmerkmal(im,txt,show) {
	if (document.getElementById) {
		document.getElementById("dtxt").innerHTML = txt;
		document.getElementById("dimg").style.backgroundImage = "URL("+im+")";
		if (show) {
			document.getElementById("mdiv").style.visibility = "visible";
			document.getElementById("mdiv").style.zIndex=20;
		}
	} else if (document.all) {
		document.all.dtxt.innerText = txt;
		document.all["dimg"].style.backgroundImage ="URL("+im+")";
		if (show) {
			document.all.mdiv.style.visibility = "visible";
			document.all.mdiv.style.zIndex=20;
		}
	} 
	
}
function hidedetailmerkmal() {
	if (document.getElementById) {
		document.getElementById("mdiv").style.visibility = "hidden";
	} else if (document.all) {
		document.all.mdiv.style.visibility = "hidden";
		
	} 
}
function anfrage() {
	if (document.getElementById) {
		document.getElementById("adiv").style.left = pageWidth/2-160+"px";
		document.getElementById("adiv").style.visibility = "visible";
		document.getElementById("adiv").style.zIndex=15;
	} else if (document.all) {
		document.all.adiv.style.left = pageWidth/2-160+"px";
		document.all.adiv.style.visibility = "visible";
		document.all.adiv.style.zIndex=20;
	} 
}
function hideanfrage() {
	if (document.getElementById) {
		document.getElementById("adiv").style.visibility = "hidden";
	} else if (document.all) {
		document.all.adiv.style.visibility = "hidden";
	} 
}


