function tbWriteEml(s1, s2, sCaption){
	document.write("<a href='m" + "ailt" + "o:" + s1 + "&" + "#" + "6" + "4" + ";" + s2+ "'>")
	if (sCaption == '')
		document.write(s1 + "&" + "#" + "6" + "4" + ";" + s2);
	else
		document.write(sCaption);
	document.write("</a>");}

function SendForm(frm){
	var obj = frm
	if (CheckFieldsfromDB(obj))
		obj.submit();}

function ChangeStyle(oElement, newStyle) {document.getElementById(oElement).className=newStyle;}

function writeInner(sLayer, sInhalt){
	if (sLayer+"" != ""){
		if (document.getElementById) {
			document.getElementById(sLayer).innerHTML = sInhalt;
		} else { //für safaribrowser
			 document.layers[sLayer].document.open();
			 document.layers[sLayer].document.write(sInhalt);
			 document.layers[sLayer].document.close();
		}
	}
}

function setOpacity(sLayer, iWertIE, iWertOther){
	if (sLayer+"" != ""){
		document.getElementById(sLayer).style.filter = "alpha(opacity="+ iWertIE +")";
		document.getElementById(sLayer).style.MozOpacity = iWertOther;
		document.getElementById(sLayer).style.opacity = iWertOther;
	}	
}

function urlencode (str) {
 var code = "";
 for (var i = 0; i < str.length; i++) {
  if (str.charAt(i) == " ") {
   code += "+";
  } else if (str.charAt(i) == "+") {
   code += "%2B";
  } else if (str.charCodeAt(i) > 127) {
   code += encodeURI(str.charAt(i));
  } else {
   code += escape(str.charAt(i));
  }
 }
 return code;
}

function getSelectedCmb(buttonGroup) {
	// returns the array number of the selected radio button or -1 if no button is selected
	if (buttonGroup) { // if the button group is an array (one button is not an array)
	    for (var i=0; i<buttonGroup.length; i++) {
	       if (buttonGroup[i].selected) {
	          return i
	       }
	    }
   } else {
      if (buttonGroup.selected) { return 0; } // if the one button is checked, return zero
   }
   // if we get to this point, no radio button is selected
   return -1;
} // Ends the "getSelectedCmb" function	


function FeldLeerSetzenII(objFeld,nStandardwert) {
	if (objFeld.value == nStandardwert)
	objFeld.value =""
}

	function setNewAbsBottom(){
		height = document.getElementById("page").offsetHeight;	//Höhe ermitteln
		document.getElementById("LElternInformation").style.top = (height - 118 - 33) +"px";	//neue Höhe setzen
		document.getElementById("LBackPaging").style.top = (height - 80 - 60) +"px";
		document.getElementById("bot").style.top = (height - 44 - 21) +"px";
	}