function mrSetCookie (pstrName, pstrWert) {
	var astrPV = mrSetCookie.arguments;
	var intLength = mrSetCookie.arguments.length;
	var strExpires = (intLength > 2) ? astrPV[2] : null;
	var strPath  = (intLength > 3) ? astrPV[3] : null;
	var strDomain = (intLength > 4) ? astrPV[4] : null;
	var strSecure  = (intLength > 5) ? astrPV[5] : false;
	document.cookie = pstrName + "=" + escape(pstrWert) +
		((strExpires == null) ? "" : ("; expires=" +
			strExpires.toGMTString())) +
		((strPath  == null) ? "" : ("; path =" + strPath )) +
		((strDomain == null) ? "" : ("; domain=" + strDomain)) +
		((strSecure  == null) ? "; strSecure" : "");
}

function mrGetCookie(pstrName) {
	pstrName += "=";
	var intLength = pstrName.length;
	var intCookieLength = document.cookie.length;
	var i = 0;
	while (i < intCookieLength) {
		var j = i + intLength;
		if (document.cookie.substring(i,j) ==  pstrName)
			return mrGetCookieValue(j);
		i = document.cookie.indexOf(" ", i)  + 1;
		if (i == 0)
			break;
	}
	return null;
}

function mrGetCookieValue(pintPosition) {
	var intLast = document.cookie.indexOf(";", pintPosition);
	if (intLast == -1)
		intLast = document.cookie.length;
	return unescape(document.cookie.substring(pintPosition ,intLast));
}

function mrSetLang(pstrLangID) {
	strName="language"
	var datDate = new Date (2100, 11, 31, 1, 0, 0)
	if (pstrLangID== 1) {
		mrSetCookie ("language","deutsch",datDate,"/") 
		window.location.target = "_parent"
		parent.location.href = "../index.html"
	}
	if (pstrLangID== 2) {
		mrSetCookie ("language","english",datDate,"/") 
		window.location.target = "_parent"
		parent.location.href = "../index_e.html"
	}
}
