function checkAll(thisForm,elmnt,tf,x) {
	var o = document.forms[thisForm].elements
	if (o){
		for (i=0; i<o.length; i++){
			if (elmnt != ''){
				if ((o[i].type == 'checkbox')&&(o[i].name.indexOf(elmnt+"") != -1)){
					o[i].checked = tf
				}
			}
			else {
				if (o[i].type == 'checkbox'){
					o[i].checked = tf
				}
			}
		}
	}
	for (var j = 0; j < document.links.length; j++){
		if ((document.links[j].href.indexOf(thisForm) != -1) && (document.links[j].href.indexOf('checkAll') != -1)){
			if (tf == true){
				document.links[j].href = "javascript:checkAll('"+thisForm+"','"+elmnt+"',false)";
				//document.links[j].innerText = "- all";
			}
			else {
				document.links[j].href = "javascript:checkAll('"+thisForm+"','"+elmnt+"',true)";
				//document.links[j].innerText = "+ all";
			}
		}
	}
}

function OpenPrintWindow(action, width) {

	if (width == undefined)
	{
		width = 650;
	}

	if (width >= 800)
	{
		alert("Um diese Seite korrekt ausdrucken zu können, empfehlen wir den Ausdruck im Querformat durchzuführen");
	}


	var any = "";
	var wf = "";
	wf = wf + "width="+width;
	wf = wf + ",height=480";
	wf = wf + ",resizable=yes";
	wf = wf + ",scrollbars=yes";
	wf = wf + ",menubar=yes";
	wf = wf + ",toolbar=no";
	wf = wf + ",directories=no";
	wf = wf + ",location=no";
	wf = wf + ",status=yes";
	window.open(action,"Print",wf);
}

function OpenExtraWindow(action, width, height) {

	var any = "";
	var wf = "";
	wf = wf + "width="+width;
	wf = wf + ",height="+height;
	wf = wf + ",resizable=yes";
	wf = wf + ",scrollbars=yes";
	wf = wf + ",menubar=yes";
	wf = wf + ",toolbar=yes";
	wf = wf + ",directories=yes";
	wf = wf + ",location=yes";
	wf = wf + ",status=yes";
	window.open(action,"Print",wf);
}

function OpenPicsWindow(action) {
	var any = "";
	var wf = "";
	wf = wf + "width=640";
	wf = wf + ",height=480";
	wf = wf + ",resizable=yes";
	wf = wf + ",scrollbars=yes";
	wf = wf + ",menubar=no";
	wf = wf + ",toolbar=no";
	wf = wf + ",directories=no";
	wf = wf + ",location=no";
	wf = wf + ",status=yes";
	window.open(action,"Pictures",wf);
}

function timeAfterTime(){
  var ID=window.setInterval('CheckStr()',100)};

function CheckStr(userInput){
  StrLen = window.document.Flash.text.value.length;
  if (StrLen > 340 ){
    window.document.Flash.value = window.document.Flash.text.value.substring(0,340);
    StrLeft = 0;
  }
  else{
    StrLeft = 340 - StrLen;
  }
  document.Flash.LEN.value = StrLeft;
}

function highlight(oElement) {
  var sEClass = oElement.className;
  if ( sEClass.indexOf(' highlight') != -1 ) {
    oElement.className = oElement.className.replace(' highlight', '');
  } else {
    oElement.className += ' highlight';
  }
}


