function jslFormSetPost(name) {
	document.forms[name].method = "POST";
}
function jslFormSetGet(name) {
	document.forms[name].method = "GET";
}
function jslFormSubmit(name) {
	UpdateDateTime();
	document.forms[name].submit();
}
function jslGoTo(Menu,Page) {
	if ((Menu!=null) && (Menu!="")) jslSetValue("uiPostMenu", Menu);
	if ((Page!=null) && (Page!="")) {
		jslSetValue("uiPostPageName", Page);
		jslSetValue("uiPostErrorPageName", Page);
	}
	jslFormSetGet("uiPostForm");
	jslFormSubmit("uiPostForm");
}
function UpdateDateTime() {
	var date = new Date();
	jslSetValue("uiPostDateTime", Math.floor(date.getTime()/1000) + "," + date.getTimezoneOffset());
}
function jslGetValue (id) {
	if (navigator.appName=='Microsoft Pocket Internet Explorer') {
		return eval('document.uiPostForm.'+id+'.value');
	} else {
		var h = document.getElementById(id);
		if (h != null) return h.value;
	}
	return "";
}
function jslSetValue(id, wert) {
	if (navigator.appName=='Microsoft Pocket Internet Explorer') {
		eval('document.uiPostForm.'+id+'.value="'+wert+'"');
	} else {
		var h1 = document.getElementById(id);
		if (h1 != null) h1.value=wert;
	}
}
function jslPopHelp(pagename) {
	jslPopHelpEx(pagename, "");
}
function jslPopHelpEx(pagename, anker) {
	var uri = "/cgi-bin/webcm?getpage=../html/de/help/popup.html&var:lang=de&var:pagename="+pagename;
	if (anker != "") uri += "&var:anker="+anker; 
	var options = "width=580,height=500,resizable=yes,scrollbars=yes";
	if (top.g_HelpWin==null || typeof(top.g_HelpWin.closed)=='undefined' || top.g_HelpWin.closed)
		top.g_HelpWin = window.open(uri,"HelpWindow",options);
	else
		top.g_HelpWin.location.href = uri;
	if (top.g_HelpWin) top.g_HelpWin.focus();
}
function uiDoOnLoad() {
	var anker = "";
	if (anker != "") location.hash = anker;
	var h1 = document.getElementById("btnBack");
	if (h1 != null) h1.disabled = (history.length==0);
	
}
function OnPortal() {
	var url = jslGetValue("uiPostPortal");
	if (url.length != 0) {
		url += "&help="+jslGetValue("uiPostPageName");
		var pp = window.open(url, "_blank");
	}
}
