// Deaktivierung rechte Maustaste
/* function click (e) {
  if (!e)
    e = window.event;
  if ((e.type && e.type == "contextmenu") || (e.button && e.button == 2) || (e.which && e.which == 3)) {
	  alert("© setron GmbH. Alle Rechte vorbehalten")
      if (window.opera)
      	window.alert("Sorry: Diese Funktion ist deaktiviert.");
    return false;
  }
}*/

// Select go to
function Go(x) {    
	if(x == "nothing") {      
		document.forms[0].reset();      
		document.forms[0].elements[0].blur();
		return;   
	} else if(x == "end") {
		top.location.href = document.location;
	} else {      
		document.location.href = x;
		document.forms[0].reset();
		document.forms[0].elements[0].blur();
	}  
}

// /shop/anmelden.tmpl
function CheckNGo() {
	if (document.MyForm.AGBs.checked==false) {
		alert ("Sie müssen unsere AGBs akzeptieren, um Ihre Bestellung abzusenden.");
		document.MyForm.AGBs.focus();
		return false;
	} else {
		if (document.MyForm.bezahlung.value=='Kreditkarte') {
			document.MyForm.action = '<we:url id="640"/>';
		} else {
			document.MyForm.action = '<we:url id="608"/>';
		}
	}
}

// Navigaion Rollover
function rolloverPfeil(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/pfeilrot.gif' }
}
function rolloutPfeil(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/pfeilgrau.gif' }
}

// Navigaion Rollover Kleiner Pfeil
function rolloverPfeilKlein(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/pfeilrot_klein.gif' }
}
function rolloutPfeilKlein(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/pfeilgrau_klein.gif' }
}

// Collection Vergroesserung
function popUpZoomCollection(artikelnummer, sprache, dbid) {
	var popup = window.open('/_standards/flash/zoom/collection.php?artnr=' + artikelnummer + '&sprache=' + sprache + '&dbid=' + dbid + '',"zoom", "left=300,top=100,toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=445,height=520");
}

// ShopLogin
function ShopFenster() {
	ShopFenster = window.open("http://shop.setron.de/High/frmMain.aspx", "ShopFenster", "left=100,top=100,toolbar=0,location=no, directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1020,height=690");
	parent.window.location.reload(); // notwendig, da sonst bei nochmaligem Login kein PopUp-Fenster geöffnet wird.
	ShopFenster.focus();
}

// Allgemeine Funktionalitaeten
function popUpFenster(seite, fenstername, breite, hoehe) {
	var popup = window.open(seite,fenstername, 'left=300,top=100,toolbar=0,location=0, directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + breite + ',height=' + hoehe);
}

// Nur für Kicktipp
function popUpFensterKicktipp() {
	var popupkick = parent.window.open("/de/tippspiel/nutzungsbedingungen.php?OhneNavigation=1", "nutzungsbedingungen", "left=100,top=100,toolbar=0,location=no, directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=640,height=450");
	popupkick.focus();
}

function popUpXmas() {
	var popupxmas = parent.window.open("/xmas/tree/treeAS2.htm", "setron", "left=100,top=100,toolbar=0,location=no, directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=400");
	popupxmas.focus();
}

function CloseAndOpen(ziel) {
	opener.location.href  = ziel;
	window.self.close();
}

function init() {
	bilderLaden();
}

function BilderVorladen() {
    document.Vorladen = new Array();
    if(document.images) {
        for(var i = 0; i < BilderVorladen.arguments.length; i++) {
            document.Vorladen[i] = new Image();
            document.Vorladen[i].src = BilderVorladen.arguments[i];
        }
    }
}

// Hier die Bilder-Funktionen
function bilderLaden(pfade) {
	var d = document;
	if (d.images) {
		d.pfad = "/_standards/bilder/nav/";
		var bildPfade = new Array("ueber_setron", "produkte", "service", "vertrieb", "kontakt","about_setron", "products", "service", "sales", "contact");
		var bilder = new Array();
		for (i = 0; i < bildPfade.length; i++) {
			bilder[i] = new Image;
			bilder[i].src = d.pfad + bildPfade[i] + "_h.gif";
		}
	}
}

function bilderTauschen(bild, anAus) {
	var d = document;
	if (d.images && d.pfad) {
		var suffix = "";
		if (anAus) suffix = "_h";
		d.images[bild].src = d.pfad + bild + suffix +".gif";
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function drucken(seite) {
	var popup = window.open(seite,'print','toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=640,height=680');
}