function offCart(zeile){
	x_offCart(zeile,showCart);
}

function makeOrder(AufNum){
	x_makeOrder(AufNum,danke);
}

function danke(IN){
	document.location.href="danke.html";
	document.getElementById("dankeIN").innerHTML = IN;
}

function checkForm(countForm) {
	var MC = "";
	for (var x=1; x<=countForm; x++){
		var feld = document.adressenForm["adresse_" + x];
		if (feld.value==""){
			var MC = "<b>Achtung!</b><br>Bitte f&uuml;llen Sie alle Felder aus.<br>Vielen Dank.";
		}
	}
	if (MC == ""){ document.adressenForm.submit();}
	else{
		document.getElementById("messenger").innerHTML = MC;
		document.getElementById("MessG").style.visibility = "visible";
	}
}

function hideArtMenu(){
		document.getElementById("ArtikelDIV").style.visibility = "hidden";
		document.getElementById("ArtPfeil").src = "bilder/pfeil_rechts.gif";
}

function hideMSG(){
		document.getElementById("MessG").style.visibility = "hidden";	
}

function showArtMenu(){
	var status = document.getElementById("ArtikelDIV").style.visibility;
	if (status == "visible"){
		document.getElementById("ArtPfeil").src = "bilder/pfeil_rechts.gif";
		document.getElementById("ArtikelDIV").style.visibility = "hidden";
		}
	else{
		document.getElementById("ArtikelDIV").style.visibility = "visible";
		document.getElementById("ArtPfeil").src = "bilder/pfeil_runter.gif";
		}
}

function einsdazu(zeile){
	x_einsdazu(zeile,showCart);
}

function einsweg(zeile){
	x_einsweg(zeile,showCart);
}

function inCart(AId){
	var MC = "<b>Vielen Dank!</b><br>Der Artikel wurde im Warenkorb abgelegt.";
	document.getElementById("messenger").innerHTML = MC;
	document.getElementById("MessG").style.visibility = "visible";	
	var Summe = document.getElementById("menge").value;
	x_inCart(AId,Summe,"");
}

function showCart(){
	var blind;
	x_showCart(blind,writeCart);
}

function writeCart(WK){
	document.getElementById("warenKorb").style.visibility = "visible";	
	document.getElementById("warenKorb").innerHTML = WK;
//	FadeThisIn("warenkorb",0);
}

function FadeThisIn(FO,step){
	var DesDo = document.getElementById(FO).style;
    step = step || 0;
    DesDo.opacity = step/100;
    DesDo.filter = "alpha(opacity=" + step + ")"; // IE
    step = step + 1;
    if (step < 100) {
        setTimeout(function () { FadeThisIn(FO,step); }, 1);
    }else{
		DesDo.visibility="visible";
    }
}

function hideCart(){
	document.getElementById("warenKorb").style.visibility = "hidden";	
}

function StartScreen(){
	IntroSleep = setTimeout('StartFade(100)',2000);
}
function StartFade(step){
	var img = document.getElementById("IntroOverlay");

    step = step || 100;

    img.style.opacity = step/100;
    img.style.filter = "alpha(opacity=" + step + ")"; // IE

    step = step - 1;

    if (step > 0) {
        fader = setTimeout(function () { StartFade(step); }, 1);
    }else{
		document.getElementById("IntroOverlay").style.visibility="hidden";
    }
}


function doIntro(){
var myHeight = 0;
 if (typeof( window.innerHeight ) == 'number') { //Non-IE
  myHeight = window.innerHeight;
 }
 else if (document.documentElement && document.documentElement.clientHeight) { //IE 6+ in 'standards compliant mode'
  myHeight = document.documentElement.clientHeight;
 }
 else if (document.body && document.body.clientHeight) { //IE 4 compatible
  myHeight = document.body.clientHeight;
 }
	window.document.body.style.padding = ((myHeight - 530)/2) + "px 0px 0px 0px";
	var M = x_setMargin(((myHeight - 530)/2),"");
}

function StepIn(){
//clearTimeout(IntroSleep);
StartFade(100);
}

