//N E R V I G E   N A C H R R I C H T E N
/*
<a href="#"
onMouseover="alert('Warum fährst Du mit der Maus hierer?');
alert('Ich habe Dir nicht gesagt, daß Du das darfst!');
alert('Ich glaube, Du solltest mir eine Entschuldigung mailen!');
alert('Ja, das solltest Du besser gleich tun bevor ich böse werde!!!');

window.location.href=('mailto:mail.admin@procar.bmw-net.de.de?subject=Tut mir leid!')"
target="_top">Halt Abstand</a> </p>
*/


//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////


//ZOOM
/*
<input type="radio" name="z" onclick="document.body.style.zoom=1.0;this.blur();">100%<br>
<input type="radio" name="z" onclick="document.body.style.zoom=1.5;this.blur();">150%<br>
<input type="radio" name="z" onclick="document.body.style.zoom=2.0;this.blur();">200%<br>
<input type="radio" name="z" onclick="document.body.style.zoom=5.0;this.blur();">500%<br>
<input type="radio" name="z" onclick="document.body.style.zoom=10.0;this.blur();">1000%<br><p></p>
*/


//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////


//S C H N E E F L O C K E N   Ü B E R   D E N   B I L D S C H I R M
//IN DEN TEXT KOPIEREN -> DAS BILD NICHT VERGESSEN snow.gif
/*
var no = 14; // snow number
var speed = 5; // smaller number moves the snow faster
var snowflake = "http://c00023/intranet/BILDER/snow.gif";

var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0;                        // set coordinate variables
xp[i] = Math.random()*(doc_width-50);  // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;         // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random();     // set step variables
if (ns4up) {                      // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
   }
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
      }
   }
}
function snowNS() {  // Netscape main animation function
for (i = 0; i < no; ++ i) {  // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE() {  // IE main animation function
for (i = 0; i < no; ++ i) {  // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
*/
// Ende von Snow


//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////


// D A T U M  U H R Z E I  A N Z E I G E N
/* DIESE DATEN GEHÖREN ZUR FUNKTION UND MÜSSEN IM HTML/PHP CODE HINTERLEGT WERDEN

 // Ruft die Funktion auf / muß in den Body im die Uhrenfunktion autom. zu öffnen
 onload="window.setTimeout ('uhr ()', 1000)"

 // Dieser Code kann irgendwo auf die Seite
 <form name="Datum">
 <table width='100%' border='0' cellspacing='0' cellpadding='0'>
  <tr>
   <td width='355' align='left'>
    <img src='BILDER/start2.jpg' width='353' height='50'>
   </td>
   <td width='355' align='left'>
    <img src='BILDER/cargo-logo.jpg' width='353' height='50'>
   </td>
   <td width='100%'></TD>
   <td>
     Datum:<br>
     <input size="10" name="Date" readonly>
   </TD>
   <td>
     Uhrzeit:<br>
     <input size="10" name="Time" readonly>
   </TD>
  </TR>
 </TABLE>
 </FORM>
*/
function uhr ()
{
 var jahr, monat, jahr, stunden, minuten, sekunden;
 var AktuellesDatum = new Date ();

 jahr  = AktuellesDatum.getYear ();
 monat = AktuellesDatum.getMonth ()+1;
 tag   = AktuellesDatum.getDate ();
 stunden  = AktuellesDatum.getHours ();
 minuten  = AktuellesDatum.getMinutes ();
 sekunden = AktuellesDatum.getSeconds ();

 window.document.Datum.Date.value=tag+"."+monat+"."+jahr;
 window.document.Datum.Time.value=stunden+":"+minuten+":"+sekunden;
 window.setTimeout ('uhr ()',1000);
}
// Ende von Uhr()


//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////


// F E N S T E R  I M M E R  I M  V O R D E R G R U N D
/* DIESE DATEN GEHÖREN ZUR FUNKTION UND MÜSSEN IM HTML/PHP CODE HINTERLEGT WERDEN
 // Ruft die Funktion auf / muß in den Body im die gewünschte Seite zu aktualisieren
 onLoad="immervorn()"

Die Zahl ist der Time Out in Mikrosekunden wann das Fenster in den Vordergrund
geholt wird.
*/
function immervorn()
{
 self.focus();
 window.setTimeout("immervorn()",10000);
}
//Ende von immervorn()


//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////


// P O P U P  F E N S T E R  Ö F F N E N
/* DIESE DATEN GEHÖREN ZUR FUNKTION UND MÜSSEN IM HTML/PHP CODE HINTERLEGT WERDEN
 // Ruft die Funktion auf / muß in den Body im die gewünschte Seite automatisch zu öffnen
 onload=fenster_oeffnen("fzg_bestand_legende.php","FZG_Bestand","width=130,height=110")

Der Pfad und die Beschreibung werden als Variable übergeben
*/
function fenster_oeffnen(Datei,Beschreibung,Groesse)
{
 window.open (Datei,Beschreibung,Groesse,"screenX=100,screenY=100,resizeable=no,dependent=yes");
}
// Ende fenster_oeffnen()


//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////


// Z E I L E N  M A R K I E R E N
/* DIESE DATEN GEHÖREN ZUR FUNKTION UND MÜSSEN IM HTML/PHP CODE HINTERLEGT WERDEN
  // Ruft die Funktion auf / über den <tr> Tag hinterlegen
  $on_mouse1 = ' onmouseout="setPointer(this, '.$zeilennummer.', \'out\', \'\#FFFDD9\', \'\#CCFFCC\', \'\#FFCC99\');" ';
  $on_mouse2 = ' onmousedown="setPointer(this, '.$zeilennummer.', \'click\', \'\#FFFDD9\', \'\#CCFFCC\', \'\#FFCC99\');" ';
  $on_mouse3 = ' onmouseover="setPointer(this, '.$zeilennummer.', \'over\', \'\#FFFDD9\', \'\#CCFFCC\', \'\#FFCC99\');" ';

  // Ruft die Variablen mit den Funktionen auf / in den <tr> Tag hinterlegen
  $on_mouse3 $on_mouse1 $on_mouse2

  //Zählt die Zeilen / über die Schleife setzen
  // Für Java Script Function um die Zeilen zu Markieren
  $zeilennummer=0;

  //Zählt die Zeilen / ans ende der Schleife setzen
 // Für Java Script Function um die Zeilen zu Markieren
 $zeilennummer++;

 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;

/* $Id: functions.js,v 2.2 2004/01/05 16:10:15 garvinhicking Exp $ */

/**
 * Sets/unsets the pointer and marker in browse mode
 *
 * @param   object    the table row
 * @param   interger  the row number
 * @param   string    the action calling this script (over, out or click)
 * @param   string    the default background color
 * @param   string    the color to use for mouseover
 * @param   string    the color to use for marking a row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
    var theCells = null;

    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 3.3 ... Opera changes colors set via HTML to rgb(r,g,b) format so fix it
    if (currentColor.indexOf("rgb") >= 0)
    {
        var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1,
                                     currentColor.indexOf(')'));
        var rgbValues = rgbStr.split(",");
        currentColor = "#";
        var hexChars = "0123456789ABCDEF";
        for (var i = 0; i < 3; i++)
        {
            var v = rgbValues[i].valueOf();
            currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16);
        }
    }

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor              = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
	   marked_row[theRowNum] = true;
            // Garvin: deactivated onclick marking of the checkbox because it's also executed
            // when an action (like edit/delete) on a single item is performed. Then the checkbox
            // would get deactived, even though we need it activated. Maybe there is a way
            // to detect if the row was clicked, and not an item therein...
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
             && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
        if (theAction == 'out') {
            newColor              = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
	   marked_row[theRowNum] = true;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor              = (thePointerColor != '')
                                  ? thePointerColor
                                  : theDefaultColor;
	   marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
	   ? true
	   : null;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = false;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
}
// end of the 'setPointer()' function


//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////


// S E I T E   K O P F   S T E H E N   L A S S E N
//IN DEN TEXT -> DER BEREICH DER IN DEM DIV STEHT WIRD GEKIPPT
/*
<div id="Seite" style="position:absolute; visibility:visible">
<p align="center">
 <strong>
  <font face="arial" size="+2" color="#ff0000">
   <a href="#" onMouseOver="SeitenFlipV()">Berühr mich mal</a>
  </font>
 </strong>
</p>
</div>
*/
function SeitenFlipV() {
	if(document.all) {
		document.all.Seite.style.filter="FlipV()"
		var timer=setTimeout("SeitenFlipH()",500)
	}
}
function SeitenFlipH() {
		document.all.Seite.style.filter="FlipH()"
		var timer=setTimeout("FlipRetour()",500)
}
function FlipRetour() {
		history.go(0)
}
// Ende von SeitenFlipV




