var picIndex;
function slide(picIndex){}

function ne()
{
}

function datum()
{
var jetzt = new Date();
var Tag = jetzt.getDate();
var Jahr = jetzt.getFullYear();
var Jahresmonat = jetzt.getMonth();
var Monat = new Array("Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
document.write(Tag + ". " + Monat[Jahresmonat] + " " + Jahr);
}

function MM_openBrWindow(theURL,winName,features) 
       {
        window.open(theURL,winName,features);
       }

function tigra_tables (
		str_tableid, // table id (req.)
		num_header_offset, // how many rows to skip before applying effects at the begining (opt.)
		num_footer_offset, // how many rows to skip at the bottom of the table (opt.)
		str_odd_color, // background color for odd rows (opt.)
		str_even_color, // background color for even rows (opt.)
		str_mover_color, // background color for rows with mouse over (opt.)
		str_onclick_color // background color for marked rows (opt.)
	) {

	 // skip non DOM browsers
	if (typeof(document.all) != 'object') return;

	// validate required parameters
	if (!str_tableid) return alert ("No table(s) ID specified in parameters");
	var obj_tables = (document.all ? document.all[str_tableid] : document.getElementById(str_tableid));
	if (!obj_tables) return alert ("Can't find table(s) with specified ID (" + str_tableid + ")");

	// set defaults for optional parameters
	var col_config = [];
	col_config.header_offset = (num_header_offset ? num_header_offset : 0);
	col_config.footer_offset = (num_footer_offset ? num_footer_offset : 0);
	col_config.odd_color = (str_odd_color ? str_odd_color : '#FFFFFF');
	col_config.even_color = (str_even_color ? str_even_color : '#F5F5F5');
	col_config.mover_color = (str_mover_color ? str_mover_color : '#E7E7E7');
	col_config.onclick_color = (str_onclick_color ? str_onclick_color : '#E7E7E7');
	
	// init multiple tables with same ID
	if (obj_tables.length)
		for (var i = 0; i < obj_tables.length; i++)
			tt_init_table(obj_tables[i], col_config);
	// init single table
	else
		tt_init_table(obj_tables, col_config);
}

function tt_init_table (obj_table, col_config) {
	var col_lconfig = [],
		col_trs = obj_table.rows;
	for (var i = col_config.header_offset; i < col_trs.length - col_config.footer_offset; i++) {
		col_trs[i].config = col_config;
		col_trs[i].lconfig = col_lconfig;
		col_trs[i].set_color = tt_set_color;
        col_trs[i].onmouseover = tt_mover; 
		col_trs[i].onmouseout = tt_mout;
		col_trs[i].onmousedown = tt_onclick;
		col_trs[i].order = (i - col_config.header_offset) % 2;
		col_trs[i].onmouseout();
	}
}
function tt_set_color(str_color) {
	this.style.backgroundColor = str_color;
}

// event handlers
function tt_mover () {
	if (this.lconfig.clicked != this)
		//this.set_color(this.config.mover_color);
		this.set_color(this.config);
}
function tt_mout () {
	if (this.lconfig.clicked != this)
		this.set_color(this.order ? this.config.odd_color : this.config.even_color);
}
function tt_onclick () {
	if (this.lconfig.clicked == this) {
		this.lconfig.clicked = null;
		this.onmouseover();
	}
	else {
		var last_clicked = this.lconfig.clicked;
		this.lconfig.clicked = this;
		if (last_clicked) last_clicked.onmouseout();
		this.set_color(this.config.onclick_color);
	}
}





















function tuts()
         {
         alert('Hallo')
		 }

function tauscheBild(bildName,bildNeu)
         {
         window.document[bildName].src = bildNeu;
         }

var popFenster;
function neuesFenster(url,name,parameter)
         {
	     popFenster=window.open(url,name,parameter);
		 popFenster.focus();
         }

function zuFenster()
         {
		 popFenster.close();
         }

function checkFon(formular,feld)
         {
         var fonZeichen="0123456789()+- /";
		 var element;
         element=window.document.forms[formular].elements[feld].value;
         for(var i=0; i < element.length; i++)
            {
            ziffer=element.charAt(i);
		    if(fonZeichen.indexOf(ziffer)<0)
		      {
			  //alert(i);
			  window.document.forms[formular].elements[feld].value='';
              window.document.forms[formular].elements[feld].focus();
              alert('Buchstaben im Feld '+feld+' sind nicht zugelassen!');
              return false;
			  }
            }
         return true;
         }

function checkEmail(formular,feld)
         {
		 var element;
         element=window.document.forms[formular].elements[feld].value;
         if(element.length>0&&element.search(/@/gi)==-1)
		   {
           window.document.forms[formular].elements[feld].focus();
           ok=false;
           }
         if(element.length>0&&element.search(/[.]/gi)==-1)
		   {
           window.document.forms[formular].elements[feld].focus();
           ok=false;
           }
	     if(!ok)
	       {
           ok=confirm("Sind Sie sicher, daß dies eine gültige E-Mail-Adresse ist?");
           return ok;
		   }
         return true;
         }


function pruefeForm(formname,feldnamen,feldtypen,feldflags)
         {
         var errors="";
		 var flag=true;
         var form=formname;
		 var felder=feldnamen.split(',');
		 var typen=feldtypen.split(',');
		 var flags=feldflags.split(',');
		 for(i=0;i<felder.length;i++)
		    {
            zurueck="";
            if(flags[i]>0)
			  {
			  zurueck=checkTextFeld(form,i,felder[i]);
			  }
			if(zurueck=="")
			  {
			  switch(typen[i])
			        {
				    case 'int':
                        zurueck=nurZahlen(form,i,felder[i]);
				        break;
				    case 'real':
                        zurueck=nurDezimalen(form,i,felder[i]);
				        break;
				    }
			   }
            if(zurueck>""&&flag)
			  {
			  window.document.forms[form].elements[i].focus()
			  flag=false;
			  }
            errors=errors+zurueck;
			}
         if(errors>"")
           {
		   alert(errors);
		   return false;
		   }
		 else
		   {
		   return true;
		   }
		 }

function checkTextFeld(formular,feld,feldname)
         {
		 element=window.document.forms[formular].elements[feld].value;
         if(element==""||element==0)
		   {
		   zurueck=feldname+' ist leer\n';
		   return zurueck;
		   }
         else
		   {
		   return "";
		   }
		 }

function nurBuchstaben(formular,feld,feldname)
         {
         element=window.document.forms[formular].elements[feld].value;
		 if(element.search(/[^a-zA-ZäöüÄÖÜß /]/gi)>-1)
		   {
		   window.document.forms[formular].elements[feld].value=element.replace(/[^a-zA-ZäöüÄÖÜß ]/gi, '');
           zurueck='Im Feld '+feldname+' sind nur Buchstaben erlaubt\n';
           return zurueck;
           }
		 else
		   {
		   return "";
		   }
		 }

function nurDezimalen(formular,feld,feldname)
         {
         element=window.document.forms[formular].elements[feld].value;
		 if(element.search(/[^0123456789\-\,\.]/gi)>-1)
		   {
		   window.document.forms[formular].elements[feld].value=element.replace(/[^0123456789\-\,\.]/gi, '');
           zurueck='Im Feld '+feldname+' sind nur Dezimalen erlaubt\n';
           return zurueck;
           }
		 else
		   {
		   return "";
		   }
		 }

function nurZahlen(formular,feld,feldname)
         {
         element=window.document.forms[formular].elements[feld].value;
		 if(element.search(/[^0123456789]/gi)>-1)
		   {
		   window.document.forms[formular].elements[feld].value=element.replace(/[^0123456789]/gi, '');
           zurueck='Im Feld '+feldname+' sind nur Zahlen erlaubt\n';
           return zurueck;
           }
		 else
		   {
		   return "";
		   }
		 }

function nurText(formular,feld,feldname)
         {
         element=window.document.forms[formular].elements[feld].value;
		 if(element.search(/[^a-zA-ZäöüÄÖÜß \.\,\-]/gi)>-1)
		   {
		   window.document.forms[formular].elements[feld].value=element.replace(/[^a-zA-ZäöüÄÖÜß ]/gi, '');
           zurueck='Im Feld '+feldname+' sind nur Buchstaben erlaubt\n';
           return zurueck;
           }
		 else
		   {
		   return "";
		   }
		 }

/* $Id: functions.js,v 1.25 2002/08/21 12:42:07 lem9 Exp $ */


/**
 * Displays an confirmation box beforme to submit a "DROP/DELETE/ALTER" query.
 * This function is called while clicking links
 *
 * @param   object   the link
 * @param   object   the sql query to submit
 *
 * @return  boolean  whether to run the query or not
 */
function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function


/**
 * Displays an error message if a "DROP DATABASE" statement is submitted
 * while it isn't allowed, else confirms a "DROP/DELETE/ALTER" query before
 * sumitting it if required.
 * This function is called by the 'checkSqlQuery()' js function.
 *
 * @param   object   the form
 * @param   object   the sql query textarea
 *
 * @return  boolean  whether to run the query or not
 *
 * @see     checkSqlQuery()
 */











/**
 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;


/**
 * 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

    // 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;
        }
    }
    // 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;
        }
    }
    // 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;
        }
    } // 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


