

function browsercheck(){
	if (navigator.appName.IndexOf = "Netscape"){
		//document.write('<link href="../stylesheet_mozilla.css" rel="stylesheet" type="text/css">');
	}
}

// This function gets called when the end-user clicks on some date.
function selected(cal, date) {
  cal.sel.value = date; // just update the date in the input field.
  if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
   cal.callCloseHandler();
}

// And this gets called when the end-user clicks on the _selected_ date,
// or clicks on the "Close" button.  It just hides the calendar without
// destroying it.
function closeHandler(cal) {
  cal.hide();                        // hide the calendar
//  cal.destroy();
  _dynarch_popupCalendar = null;
}


function showCalendar(id, format, showsTime, showsOtherMonths) {
  var el = document.getElementById(id);
  if (_dynarch_popupCalendar != null) {
	_dynarch_popupCalendar.hide();               
  } else {
    var cal = new Calendar(1, null, selected, closeHandler);
   	if (typeof showsTime == "string") {
      cal.showsTime = true;
      cal.time24 = (showsTime == "24");
    }
    if (showsOtherMonths) {
      cal.showsOtherMonths = true;
    }
    _dynarch_popupCalendar = cal;                  // remember it in the global var
    cal.setRange(2006, 2010);        // min/max year allowed.
    cal.create();
  }
  _dynarch_popupCalendar.setDateFormat(format);    // set the specified date format
  _dynarch_popupCalendar.parseDate(el.value);      // try to parse the text in field
  _dynarch_popupCalendar.sel = el;                 // inform it what input field we use
	_dynarch_popupCalendar.showAtElement(el.nextSibling, "Br");        // show the calendar

  return false;
}

var MINUTE = 60 * 1000;
var HOUR = 60 * MINUTE;
var DAY = 24 * HOUR;
var WEEK = 7 * DAY;


///Zeichenbregrenzung
function CountMax(alles,feldname) { 
	var wert,max,anzahl_zeichen; 
	max = alles; 
	var feld = eval("document.form."+feldname+".value");
	var anzahl_zeichen = eval("document.form."+feldname+".value.length");

	wert = max-anzahl_zeichen; 
	
	if (wert < 0) { 
		alert("Es dürfen nicht mehr als " + max + " Zeichen eingegeben werden!"); 
		feld = feld.substring(0,max); 
		wert = max-anzahl_zeichen; 
		document.form.rv_counter.value = wert; 
	} else { 
		document.form.rv_counter.value = max - anzahl_zeichen; 
	} 
} 



function select_index(sName) {
	document.form.tab_select.value = sName;
}

function tabselect(wert){
	tabPane1_main.setSelectedIndex(wert);
}

 function send(params,id_tag,datei){
	var remote =new Ajax(datei,{
			method: 'get',
			data: params,
			encoding: 'iso-8859-1',
			evalScripts: true,
			update: $(id_tag),
			onComplete: function(){
			
			}
		});
	
remote.setHeader('Content-Type','content="text/html; charset=iso-8859-1');	
	remote.request();
}
	
