	var newwindow = "";
	
	function arvato_openHelpWindow(url) {
		windowprops = "height=300,width=290,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes, statusbar=no, screenX=500, screenY=100";
		if (newwindow.location && !newwindow.closed) {
			newwindow.location.href = url;
		} else {
			newwindow = window.open(url, "name", windowprops);
			if (!newwindow.opener) {
				newwindow.opener = self;
			}
		}
		if (window.focus) {
			newwindow.focus(); 
		}
	}
	
	function jumpToSelected(selectField) {
		var url = selectField.options[selectField.selectedIndex].value;
		if (url != "") {
			window.location.href = url;
		}
	}
	function closeWindow() {
	 		// if there is a frame ...
		if (top.frame1) {
			top.close();
		} else {
			window.close();
		}
	}
	
	// close this window and dispatch to given uri in opener window
	function closeAndDispatch(dispatchTo) {
		if (top.opener != null && !top.opener.closed) {
			top.opener.location.href = dispatchTo;
			top.opener.focus();
			if (top.close) {
				top.close();
			}
		} else {
			window.location.href = dispatchTo;
			if (window.focus) {
				window.focus();
			}
		}
	}
	
	function openNeuesFenster(location, title, hoehe, breite) {
		var neuesFenster;
		var achtsechs = 0;
		if (hoehe == 600 && breite == 800) {
			if (screen.availHeight > 600) {
				hoehe = 600;
			} else {
				hoehe = screen.availHeight - 50;
				achtsechs = 1;
			}
			if (screen.availWidth > 800) {
				breite = 900;
			} else {
				breite = screen.availWidth - 50;
				achtsechs = 1;
			}
		}
		if (achtsechs == 1) {
			neuesFenster = window.open(location, title, "width=" + breite + ",height=" + hoehe + ",status,resizable,screenX=0,screenY=0");
		} else {
			neuesFenster = window.open(location, title, "width=" + breite + ",height=" + hoehe + ",status,resizable");
		}
		neuesFenster.focus();
	}
	
	//added for complaint textarea (Schepp)
	function limitchars(textfield, limit) {
		if (textfield.value.length > limit) {
			textfield.value = textfield.value.substr(0, limit);
		}
		document.forms["BillServiceForm"].remaining.value = "Zeichenz\xef\xbf\xbdhler: " + textfield.value.length + ", Rest " + (limit - textfield.value.length);
	}
	

