function PCA_showHideLayers(L2show, L2hide) {
  if (document.layers){ //ns
    for (i=0; i<(document.layers.length); i++){
      if (document.layers[i].name.search(L2hide) != -1){document.layers[i].visibility = 'hide';}
      if (document.layers[i].name.search(L2show) != -1){document.layers[i].visibility = 'show';}
    }
  }else
  if (document.all != null){ //ie
    var yydiv = document.all.tags("div");
    for (i=0; i<(yydiv.length); i++){
      if (yydiv[i]) {var yydivname = yydiv[i].id;} else {var yydivname = '';}
      if (yydivname.search(L2hide) != -1) document.all[yydivname].style.visibility = 'hidden';
      if (yydivname.search(L2show) != -1) document.all[yydivname].style.visibility = 'visible';
        }
  }else
  if (document.getElementById){ //mz
    var yydiv = document.getElementsByTagName("div");
    for (i=0; i<(yydiv.length); i++){
      if (yydiv[i]) {var yydivname = yydiv[i].id;} else {var yydivname = '';}
      if (yydivname.search(L2hide) != -1) document.getElementById(yydivname).style.visibility = 'hidden';
      if (yydivname.search(L2show) != -1) document.getElementById(yydivname).style.visibility = 'visible';
    }
  }
}

function StartOrder() {
 PCA_showHideLayers('Waiting','show');
 document.getElementsByName("orderstart")[0].value = " Bestellung wird ausgelöst. Bitte warten Sie ... ";
 document.getElementsByName("orderstart")[0].disabled = true;
 document.orderform.submit();
}

function adventskalender() {
 var param=",screenX=2,screenY=2,toolbar=no,location=no,resizable=no,menubar=no,status=no,copyhistory=no";
 param="width=780,height=560" + param;
 xs=780;
 ys=560;
 win = open('/xmas/index.php','vxgs',param);
 xs=(screen.width / 2) - (xs / 2);
 ys=(screen.height / 2) - (ys / 2);
 win.moveTo(xs,ys);
}

function neu() {
 var param=",screenX=2,screenY=2,toolbar=no,location=no,resizable=no,menubar=no,status=no,copyhistory=no";
 param="width=780,height=560" + param;
 xs=780;
 ys=560;
 win = open('/xmas/index.php','vxgs',param);
 xs=(screen.width / 2) - (xs / 2);
 ys=(screen.height / 2) - (ys / 2);
 win.moveTo(xs,ys);
}

function neu2() {
 var param=",screenX=2,screenY=2,toolbar=no,location=no,resizable=no,menubar=no,status=no,copyhistory=no,scrollbars=1";
 param="width=780,height=560" + param;
 xs=780;
 ys=560;
 win = open('/xmas/gewinner.html','vxgs',param);
 xs=(screen.width / 2) - (xs / 2);
 ys=(screen.height / 2) - (ys / 2);
 win.moveTo(xs,ys);
}

function OrderWin(url) {
  LinkWindow = window.open(url,'order', 'width=720,height=540,toolbar=0,directories=0,menubar=0,status=1,resizable=0,scrollbars=1')
}

function Fenster( Seite ) {
  F1 =window.open(Seite, 'check', 'width=795,height=600,toolbar=0,directories=0,menubar=0,status=0,resizable=1,scrollbars=1')
}

function FensterPT( Seite ) {
  F1 =window.open(Seite, 'PaketTracking', 'width=675,height=300,toolbar=0,directories=0,menubar=0,status=0,resizable=1,scrollbars=1')
}

function PreisTracking( artnr,vid ) {
  F1 =window.open('shop_tracking.php?artikel='+artnr+'&vid='+vid, 'check', 'width=550,height=400,toolbar=0,directories=0,menubar=0,status=0,resizable=0,scrollbars=0')
}

function Delete( theurl) {
 if(confirm('Soll der Eintrag gelöscht werden ?'))
 {
  location=theurl;
 }
}

function Abholung() {
 Check = prompt("Bestellung kann angeholt werden ab:","");
 if(Check) document.forms[0].t_mailtext.value+='Ihre Bestellung kann ab '+Check+' Uhr abgeholt werden.';
}

function ArtInfo( Seite ) {
 ArtikelFenster = window.open(Seite, 'ArtikelDetails','width=675,height=500,toolbar=0,directories=0,menubar=0,status=0,resizable=1,scrollbars=1')
 ArtikelFenster.focus();
}

function SBasketDelete(bskname, theurl) {
 if(confirm('Warenkorb "'+bskname+ '"wirklich löschen ?'))
 {
  location=theurl;
 }
}

function SBasketLoad(theurl) {
 if(confirm('Es befinden sich Artikel in Ihrem aktuellen Warenkorb. Wenn Sie jetzt fortfahren werden alle Artikel aus Ihrem Warenkorb gelöscht und der gespeicherte Warenkorb geladen. Weiter ?'))
 {
  location=theurl;
 }
}
