var pathname = window.location.pathname.toLowerCase();filename = pathname.substring(0,(pathname.lastIndexOf('nsf')+4)) ;filenameR = pathname.substring(0,(pathname.lastIndexOf('nsf')+3)) ;theDomain =  window.location.protocol + '//' + window.location.hostname;var isIE = (document.all) ? true : false;if (isIE) window.onerror = showjsError;function UserException(message, name, url, line) {	this.message = message;	this.name = name;	this.fileName = url;	this.lineNumber = line;}function showjsError(e,url,line) {	var blnReturn = false;	try {		if (!e.message) { e = new UserException(e, '', url, line ); blnReturn = true; }		var winError = window.open('',"Error","width=600,height=300,scrollbars=yes,resizable=yes");				if( winError==null || typeof(winError)=="undefined"){			var AlertTXT = "A Javascript Error has occured\n"			if (e.name) 			AlertTXT += 'Error:\t' + e.name + '\n';			if (e.message)		AlertTXT += 'Message:\t' + e.message + '\n';			if (e.lineNumber)	AlertTXT += 'Line:\t' + e.lineNumber + '\n';			if (e.fileName)		AlertTXT += 'URL:\t' + e.fileName + '\n';			alert(AlertTXT)		}	else {			var doc = winError.document;			var TableHTML = '<table style="border-width:0px; border-style:none;">'			if (e.name) 			TableHTML += '<tr><td class="label">Error:</td><td class="value">' + e.name + '</td></tr>';			if (e.message)		TableHTML += '<tr><td class="label">Message:</td><td class="value">' + e.message + '</td></tr>';			if (e.lineNumber)	TableHTML += '<tr><td class="label">Line:</td><td class="value">' + e.lineNumber + '</td></tr>';			if (e.fileName)		TableHTML += '<tr><td class="label">URL:</td><td class="value">' + e.fileName + '</td></tr>';			TableHTML += '</table>';			doc.open();				doc.writeln('<html><head><title>JavaScript Error</title>');			doc.writeln('<style type="text/css">.label { color:blue; font-size:10pt;} .value { color:black; font-size:10pt;}</style>');			doc.writeln('</head><body style="color:black; font-size:12px;">');			doc.writeln(TableHTML);					if (arguments.callee.caller) {				var routine = arguments.callee.caller;				var f = routine.toString().replace(/^\s+|\s+$/g,"");				var pattern = new RegExp(e.message.substr(0,e.message.indexOf(' ')).replace(/^'|'$/g, "" ));				doc.writeln('<pre>' + f.replace(pattern,'<span id="error" style="color:red; font-weight:bold;">' + pattern.source + '</span>') + '</pre>');			}			doc.writeln("</body></html>");			winError.focus();				}			} catch(e) {		alert(e.message);	} finally {		doc.close();	}	return blnReturn;}function openMenu ( UNID) {	var winTitle = 'DynamicNav';	var url = theDomain + filename + 'lu.menu/' + UNID + '?openDocument';		var newWindow =  window.open(url,winTitle,'status=no,toolbar=no,location=no,scrollbars=auto,resizable:yes,directories=no,height=200,width=450');    	newWindow.focus();}function openMenuModal ( UNID) {	var winTitle = 'DynamicNav';	var url = theDomain + filename + 'lu.menu/' + UNID + '?editDocument';		window.showModalDialog(url,'dialogHeight:210px; dialogWidth:550px;dialogLeft:10;dialogTop:10;help:no; resizable:yes; scroll:yes');  	}function startList() {	if (document.all&&document.getElementById) {		navRoot = document.getElementById("dmenu");		for (i=0; i<navRoot.childNodes.length; i++) {			node = navRoot.childNodes[i];			if (node.nodeName=="LI") {				node.onmouseover=function() {					this.className+=" over";				}				node.onmouseout=function() {					this.className=this.className.replace(" over", "");				}			}		}	}}function logoutDrop() {if (confirm("Are you really sure you want to erase the auto login information?. \n\n select  'OK' to erase it. \n select 'Cancel'  to keep the information and logout"))	{     deleteCookie('usr',"/","");          location.href = filenameR + "?logout&redirectTo="	} else {			location.href = filenameR + "?logout&redirectTo="			}	}//Cookie functionfunction getCookieVal (offset) {  var endstr = document.cookie.indexOf (";", offset);  if (endstr == -1)    endstr = document.cookie.length;  return unescape(document.cookie.substring(offset, endstr));}function SetCookie ( name, value, expires, path, domain, secure ) {	var cvalue = name + "=" + value	if(expires){		if(typeof expires=="string"){			cvalue += "; expires=" + new Date(expires).toGMTString();			} else {			cvalue += "; expires=" + expires.toGMTString();			}	}	cvalue += ((path) ? "; path=" + path : ""); 	cvalue += ((domain) ? "; domain=" + domain : "");	cvalue += ((secure) ? "; secure" : "");	document.cookie = cvalue}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";  }}//end cookie functionsfunction logout() {	if (confirm("You are being Logged Out!!\n\nDo you with to continue?")) {	top.document.location.href = filenameR + "?logout&RedirectTo=" + filenameR;	return true;	} else {	return false;	}}function ClickLogout(){	if (confirm("You are being Logged Out!!\n\nDo you with to continue?")) {		deleteCookie("autologin","/")		top.document.location.href = filenameR + "?logout&RedirectTo=" + filenameR;	}}