  String.prototype.leftTrim = function () {
    return (this.replace(/^\s+/,""));
  };
  String.prototype.rightTrim = function () {
    return (this.replace(/\s+$/,""));
  };
//kombiniert "leftTrim" und "rightTrim";
  String.prototype.basicTrim = function () {
    return (this.replace(/\s+$/,"").replace(/^\s+/,""));
  };
//dampft leerzeichen(-sequenzen) innerhalb einer zeichenkette auf ein einzelnes "space" ein;
  String.prototype.superTrim = function () {
    return(this.replace(/\s+/g," ").replace(/\s+$/,"").replace(/^\s+/,""));
  };

//zugabe: entfernt alle leerzeichen aus einer zeichenkette;
  String.prototype.removeWhiteSpaces = function () {
    return (this.replace(/\s+/g,""));
  };

var change = 0;

function changetext(whichcontent){
  if (document.layers) {
    document.d1.document.d2.document.write(whichcontent);
    document.d1.document.d2.document.close();
  }

  if (document.all) {
    descriptions.innerHTML=whichcontent;
  }

  if (document.getElementById) {
    document.getElementById("descriptions").innerHTML=whichcontent;
  }
}

function changetext(whichcontent){
  if (document.layers) {
    document.d1.document.d2.document.write(whichcontent);
    document.d1.document.d2.document.close();
  }
  if (document.all) {
    descriptions.innerHTML=whichcontent;
  }
  if (document.getElementById) {
    document.getElementById("descriptions").innerHTML=whichcontent;
  }
}

var schlagwortchange = 0;

function changeSchlagwort(){
  var alert_temp="";
  for(var j=0; j<document.schlagwort_suche.elements.length; j++){
    if (document.schlagwort_suche.elements[j].checked) {
      alert_temp += document.schlagwort_suche.elements[j].value + ",";
    }
  }
  alert_temp = alert_temp.substring(0,alert_temp.length-1);
  document.form1.schlagwort.value=alert_temp;
}

var today = new Date();
var expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset, endstr));
	}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) {
			return getCookieVal (j);
			}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
		}
	return null;
	}

function DeleteCookie (name,path,domain) {
	if (GetCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
	}

var ms = new Array();
function openOrCloseElements (id) {
  for (var i = 0; i < ms.length; ++i)
  {
    document.getElementById(ms[i]).style.display="none";
  }
  document.getElementById(id).style.display="block";
}
function closeElements (id) {
  document.getElementById(id).style.display="none";
}
