var WKMessage = "Dieses Bild befindet sich bereits im Warenkorb!";

function winopen(gross,filen) {
   document.zoom.gross.value = gross;
   document.zoom.filen.value = filen;
   fenster = window.open('/bild.html','bild','dependent=yes,menubar=no,height=530,width=496,status=no,location=no');
}

function setStart(start) {
   document.zoom.ypos.value = getypos();
   document.zoom.start.value = start;
   document.zoom.submit();
}

function bestellung(pfad,bild) {
   document.zoom.ypos.value = getypos();
   document.zoom.order.value = pfad+bild;
   document.zoom.submit();
}

function remove(bildid) {
   document.warenkorb.ypos.value = getypos();
   document.warenkorb.funktion.value = "delete";
   document.warenkorb.bildid.value = bildid;
   document.warenkorb.submit();
}

function kopiere(bildid) {
   document.warenkorb.ypos.value = getypos();
   document.warenkorb.funktion.value = "kopiere";
   document.warenkorb.bildid.value = bildid;
   document.warenkorb.submit();
}

function chformat(bildid,format) {
   document.warenkorb.ypos.value = getypos();
   document.warenkorb.funktion.value = "format";
   document.warenkorb.bildid.value = bildid;
   document.warenkorb.format.value = format;
   document.warenkorb.submit();
}

function bildanzahl(bildid,anzahl) {
   document.warenkorb.ypos.value = getypos();
   document.warenkorb.funktion.value = "anzahl";
   document.warenkorb.bildid.value = bildid;
   if (anzahl > 0) {document.warenkorb.anzahl.value = anzahl;}
   else {document.warenkorb.anzahl.value = 1;}
   document.warenkorb.submit();
}

function getypos() {
   var y;
   if (self.pageYOffset) {// all except Explorer
      y = self.pageYOffset;}
   else if (document.documentElement && document.documentElement.scrollTop) {// Explorer 6 Strict
      y = document.documentElement.scrollTop;}
   else if (document.body) {// all other Explorers
      y = document.body.scrollTop;}
   return (y);
}

function selectcountry(land) {
   if (land == "Deutschland") {
      document.getElementById('national').style.display = "block";
      document.getElementById('international').style.display = "none";}
   else {
      document.getElementById('national').style.display = "none";
      document.getElementById('international').style.display = "block";}
}

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="© Robert Kiderle Fotoagentur";

///////////////////////////////////
function clickIE4() {
   if (event.button==2) {
      alert(message);
      return false;
   }
}

function clickNS4(e) {
   if (document.layers||document.getElementById&&!document.all) {
      if (e.which==2||e.which==3) {
         alert(message);
         return false;
      }
   }
}

function disableRightButton() {
   if (document.layers) {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown=clickNS4;
   }
   else if (document.all&&!document.getElementById) {
      document.onmousedown=clickIE4;
   }

   document.oncontextmenu=new Function("alert(message);return false")
}