var dom = (document.getElementById) ? true : false;var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;var ns4 = (document.layers && !dom) ? true : false;var ie4 = (document.all && !dom) ? true : false;var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;function strLeft(sourceStr, keyStr){	return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : sourceStr.split(keyStr)[0];}function strRight(sourceStr, keyStr){	idx = sourceStr.indexOf(keyStr);	return (idx == -1 | keyStr=='') ? '' : sourceStr.substr(idx+ keyStr.length);}//@RightBack equivalentfunction rightBack(sourceStr, keyStr){	arr = sourceStr.split(keyStr);	return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : arr.pop()}//@LeftBack equivalentfunction leftBack(sourceStr, keyStr){	arr = sourceStr.split(keyStr)	arr.pop();	return (keyStr==null | keyStr=='') ? '' : arr.join(keyStr)}function readCookie(name) {	var nameEQ = name + "=";	var ca = document.cookie.split(';');	for(var i=0;i < ca.length;i++) {		var c = ca[i];		while (c.charAt(0)==' ') c = c.substring(1,c.length);		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);	}	return null;}function showRegLinks(optURL){//Note: for these functions to work the site definition in the dom directory must not start with a "/"	domid = readCookie( "DomAuthSessId" );	basePath = location.pathname;	basePath = leftBack( strLeft( basePath.toLowerCase(),".nsf"),"/")+ "/";		if (domid == null || domid == "") {		URL = (optURL!="")? optURL : basePath + "wappuib.nsf/newacc!openform";		document.write("<a href='" + URL + "'>Register</a>");	} else {		//logoutURL = "/&logout";		//var uname = document.getElementById("uname");		dashURL = basePath + "wappuib.nsf/pl!openform"		document.write("<a href='" + dashURL + "'>Dashboard</a>");	}}function showLoginLinks(){//Note: for these functions to work the site definition in the dom directory must not start with a "/"	domid = readCookie( "DomAuthSessId" );	basePath = location.pathname;	basePath = leftBack( strLeft( basePath.toLowerCase(),".nsf"),"/")+ "/";				if (domid == null || domid == "") {		loginURL = basePath + "wappuib.nsf/pl!openform&login";		document.write("<a href='" + loginURL + "'>Login</a>");	} else {		logoutURL = basePath + "wappUIB.nsf!Logout&Redirectto=/";		var uname = document.getElementById("uname");		document.write("<a href='" + logoutURL + "'>Logout</a>");	}}function turnButtons() {	try {	domid = readCookie( "DomAuthSessId" );	var authName = document.getElementById("authName");	var elem0 = document.getElementById("s0");	var elem1 = document.getElementById("s1");	var elem2 = document.getElementById("s2");	var elem3 = document.getElementById("s3");	var elem4 = document.getElementById("s4");	var elem5 = document.getElementById("s5");	//if (domid == null || domid == "") {//alert(authName.innerHTML);			if (authName.innerHTML == "Anonymous") {		elem3.style.display="block";		elem2.style.display="block";		elem1.style.display="block";			elem0.style.display="block";	} else {		//document.write("YES logged in" );		elem4.style.display="block";		elem2.style.display="block";		elem0.style.display="block";		elem5.style.display="block";	}	}	catch (e) {}}//window.onload = procUser;