// /_admin/gebraucht/index.php
function confirm_delete_geraet(strID) {
    check =  confirm("Wollen Sie dieses Gerät wirklich löschen?");
	if(check == true) {
		location.href='loeschen.php?id='+strID;
	}
}

function CheckCapchta(FormSCode) {
	if (document.kontaktform.sCode.value!=FormSCode || document.kontaktform.sCode.value=='') {
		alert("Sie haben den Sicherheitscode falsch eingegeben!");
		document.kontaktform.sCode.value='';
		document.kontaktform.sCode.focus();
		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();
	}  
}

// Navigaion Rollover
function rolloverPfeilKlein(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/navigation/pfeil_klein_aktiv.gif' }
}
function rolloutPfeilKlein(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/navigation/pfeil_klein.gif' }
}


function rolloverPfeil(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/navigation/pfeil_aktiv.gif' }
}
function rolloutPfeil(Bildname) {
   if (document.images) {
      document.images[Bildname].src = '/_standards/bilder/navigation/pfeil.gif' }
}


// 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);
}

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

function init() {
	bilderLaden();
}

// Hier die Bilder-Funktionen
function bilderLaden(pfade) {
	var d = document;
	if (d.images) {
		d.pfad = "/_standards/bilder/nav/";
		var bildPfade = new Array("agentur", "arbeit", "kontakt");
		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];}
}

