<!--
function fernbild(bild,w_breite,w_hoehe,fabrikat,modell,IDNummer)
  {
  var abmessung = "width="+(w_breite+22)+",height="+(w_hoehe+24);
  var title = fabrikat + "+" + modell;
  fBild=window.open("","Fernsteuerung",abmessung);
  fBild.location.href="bild.php?bild="+bild+"&title="+title+"&bgpic=0";
  fBild.focus();
  }

function info(Datei)
  {
  fInfo=window.open("","Fernsteuerung","width=400,height=360");
  fInfo.location.href=Datei;
  fInfo.focus();
  }

function fernstart(Daten) {
    fForm=window.open("","Fernsteuerung","width=415,height=415");
 		fForm.location.href="mehrinfo.php?"+Daten;
    fForm.focus();
}

function popupNews(message) {
    fNews=window.open("","Fernsteuerung","menubar=yes, scrollbars=yes, width=350,height=350");
 		fNews.location.href="newsdetail.php?"+message;
    fNews.focus();
}

function termine(plz) {
  	window.open("terminelist.php?fPLZ=" + plz, "_self");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

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 MM_findObj(n, d) { //v3.0
  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); return x;
}

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 fsLegende(Daten) {
    fern=window.open("","Fernsteuerung","scrollbars,width=300,height=415");
 		fern.location.href="kuerzel.php?" + Daten;
    fern.focus();
}

 function newSortResult(pageBack) {
  //Sortier-Kriterium auslesen
  strFOrder = document.forms[0].fOrder.options[document.forms[0].fOrder.selectedIndex].value;
  location.href = "d_tab1.php?" + pageBack + "&fOrder=" + strFOrder;
}

function SortResult() {
  //Sortier-Kriterium auslesen
  strFOrder = document.forms[0].fOrder.options[document.forms[0].fOrder.selectedIndex].value;
  location.href = "abgleich.php?fOrder=" + strFOrder;
}

function BwcSortResult() {
  //Sortier-Kriterium auslesen
  strFOrder = document.forms[0].fOrder.options[document.forms[0].fOrder.selectedIndex].value;
  location.href = "bwcabgleich.php?fOrder=" + strFOrder;
}

var KlickZaehlerCount = 0;
function KlickZaehler(MaschId) {
  if (MaschId.checked) {
    KlickZaehlerCount++;
    }    
  else {
    KlickZaehlerCount-=1;
    }
  parent.frames[0].document.getElementById('KlickCounter').firstChild.nodeValue = KlickZaehlerCount;
}
function KlickZaehlerReset() {
  KlickZaehlerCount = 0;
  parent.frames[0].document.getElementById('KlickCounter').firstChild.nodeValue = 0;
}

//Zaehler fuer Journalmeldungen
var JournalZaehlerCount = 0;
function JournalZaehler(MaschId) {
  if (MaschId.checked) {
    JournalZaehlerCount++;
    }    
  else {
    JournalZaehlerCount-=1;
    }
  document.getElementById('KlickCounter').firstChild.nodeValue = JournalZaehlerCount;
}
function JournalZaehlerReset() {
  JournalZaehlerCount = 0;
  document.getElementById('KlickCounter').firstChild.nodeValue = 0;
}

function sendToAuktion(mId) {
  svAuktionUrl = "/html/buytool/uebergabeBuytool.php?mID=" + mId;
  winPop=window.open(svAuktionUrl,"AuktionStart","width=621,height=500,scrollbars=yes");
  winPop.focus(); 
}

function tbVergleich() {
  document.forms[0].submit()
}

// VergleichsCheckboxen
var selectionCounter = 0;
var x=0;
var z=0;
var zMaxComp = 20;
OldMid  = new Array();
OldBild = new Array();
boxes = new Array('/tb/images/check_norm.gif','/tb/images/check_act.gif');
function checkcomp(bild,mId) {
        
  x=document.forms[0].elements[mId].value;
  if (x == 0) {
    selectionCounter++;
    x=1;
    z++;
    } 
  else {
    selectionCounter--; 
    x=0;
    } 
  document.images[bild].src=boxes[x];
  document.forms[0].elements[mId].value=x;
  if (selectionCounter > zMaxComp) {
    resetId = z-zMaxComp;
    resetFirstPic = OldBild[resetId];
    resetFirstMid = OldMid[resetId];
    document.images[resetFirstPic].src=boxes[0];
    document.forms[0].elements[resetFirstMid].value=0;
    selectionCounter--; 
    }
  OldBild[z] = bild;
  OldMid[z] = mId;
}
function RestoreVergleich(restMids) {
  for (var i=0; i<restMids.length; i++) {
    if (restMids[i] > 1) {
	    ic = i+1;
	    mId = "dtab1compId[" + restMids[i] + "]";
	    bild = "box" + restMids[i];
	    document.forms[0].elements[mId].value=1;
	    document.images[bild].src='/tb/images/check_act.gif';
	    OldBild[ic] = bild;
	    OldMid[ic] = mId;
	  }
  }
  selectionCounter = restMids.length - 1;
  z = selectionCounter;
}
function tbBildwechsel (tbBildnr, tbBildname) {
  window.document.images[tbBildnr].src = tbBildname;
}
// -->
