var agt=navigator.userAgent.toLowerCase(); // *** BROWSER VERSION *** // Note: On IE5, these return 4, so use is_ie5up to detect IE5. var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); // Note: Opera and WebTV spoof Navigator.  We do strict client detection. // If you want to allow spoofing, take out the tests for opera and webtv. var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)                 && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)                 && (agt.indexOf('webtv')==-1)); var is_nav2 = (is_nav && (is_major == 2)); var is_nav3 = (is_nav && (is_major == 3)); var is_nav4 = (is_nav && (is_major == 4)); var is_nav5 = (is_nav && (is_major == 5)); var is_nav5up = (is_nav && (is_major >= 5)); var is_webtv = (agt.indexOf('webtv') !=- 1); var is_ie   = (agt.indexOf("msie") != -1); var is_ie3  = (is_ie && (is_major < 4)); var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 4.0") !=-1)); var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0") !=-1));var is_ie501  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.01") !=-1));  var is_ie55  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1)); var is_ie6  = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1)); var is_ie7  = (is_ie && (is_major == 4) && (agt.indexOf("msie 7.0") !=-1));var is_ie8  = (is_ie && (is_major == 4) && (agt.indexOf("msie 8.0") !=-1));var is_ie4up  = (is_ie && !is_ie3 );var is_ie5up  = (is_ie && !is_ie3 && !is_ie4 );var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie501&& !is_ie55);var is_ie3456  = ( is_ie3 || is_ie4 || is_ie5 || is_ie501 || is_ie55 || is_ie6);var is_ieMac  = (is_ie && (is_major == 4) && (agt.indexOf("mac") !=-1) ); var is_opera = (agt.indexOf("opera") != -1);var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1);var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6);var is_opera8 = (agt.indexOf("opera 8") != -1 || agt.indexOf("opera/8") != -1);var is_opera8up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6 && !is_opera7);var is_opera9 = (agt.indexOf("opera 9") != -1 || agt.indexOf("opera/9") != -1);var is_konqueror = (agt.indexOf("konqueror") != -1);var is_konqueror1 = (agt.indexOf("konqueror/1") != -1);var is_konqueror2 = (agt.indexOf("konqueror/2") != -1);var is_konqueror3 = (agt.indexOf("konqueror/3") != -1);var is_konqueror3up = (is_konqueror && !is_konqueror1 && !is_konqueror2 );var is_safari = (agt.indexOf("mozilla") != -1 && agt.indexOf("safari") != -1);if (is_safari == true) { is_nav5up = false ; }var is_Mac  = (agt.indexOf("mac")!=-1) ; var is_Windows  = (agt.indexOf("windows")!=-1) ; var is_linux = (agt.indexOf("inux")!=-1);var is_unix  = ((agt.indexOf("x11")!=-1) || is_linux);var pathView = document.URL;pos = pathView.indexOf("nsf");var GNServerPath = pathView.substring(0, pos+3);var GNURLPath = GNServerPath;var iHeight = "420";var iWidth = "760";function openHelpPopup(helpURL){	var helpurl = helpURL ;	winpops=window.open(helpurl,"HelpPopup","width=506,height=500,scrollbars=yes,resizable=yes");}function loadHelpPopup(helpURL){	var loadURL = GNServerPath + "/vSysHelpByTopic/" + helpURL + "?OpenDocument";	openHelpPopup(loadURL);}function popupImage(imgURL, width, height){	var helpurl = GNServerPath + imgURL;	fWidth = width;	fHeight = height;	winpops=window.open(helpurl,"PopupImage","width=" + fWidth + ",height=" + fHeight + ",scrollbars=no,resizable=no");}function GNSetBkgndColor() {	document.bgColor = jsFormBodyColor ;}function GNLoadPage(loadURL){	var pageURL = loadURL ;	pageURL = replaceSubstring(pageURL, "XXX", SiteLayoutStyle) ;	if (jsUserType == "SiteAdmin" ) {		pageURL = replaceSubstring(pageURL, "Public", "Admin") ;	}	window.location = pageURL}function showObj( ObjectID ) {	jsObjectID = ObjectID;	if (is_ie5up || is_nav5up || is_opera7up || is_safari || is_konqueror3up ) {		document.getElementById( ObjectID ).style.visibility = "visible" ;	} else if (is_ie4) {		document.all[ ObjectID ].style.visibility = "visible" ;	}}function hideObj( ObjectID ) {	jsObjectID = ObjectID;	if (is_ie5up || is_nav5up || is_opera7up || is_safari || is_konqueror3up ) {		document.getElementById( ObjectID ).style.visibility = "hidden" ;	} else if (is_ie4) {		document.all[ ObjectID ].style.visibility = "hidden" ;	}}function GNViewArticle(DocKey) {	jsDocKey = DocKey ;	fullOpenCommand = GNServerPath + "/vGNCNTDisplayByDocKey/" + jsDocKey + "?OpenDocument" ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	iWidth = "500" ;	iHeight = "520" ;	openGNDialog(composeString, iWidth, iHeight, redisplayContent, ",scrollbars=yes") ;}function GNSitePageLink(loadURL){	var pageURL = loadURL ;	window.location = GNServerPath + replaceSubstring(pageURL, "GNPublic", "Public1") ; ;}function newLineFlip(expNum, program, mode, dockey) {	jsProgram = program ;	jsMode = mode ;	jsDocKey = dockey ;	if (viewFirstLine == "" ) { viewFirstLine = expNum}	viewLastLine = expNum ;	x = 1-x;	xcount +=1;	newOutline(x, jsProgram, jsMode, jsDocKey);}function newOutline(x, program, mode, dockey) {	jsProgram = program ;	jsMode = mode ;	jsDocKey = dockey ;	LayoutSuffix = "" ;	ViewButtonHTML = '<img src="img_Col_View.gif" width=24 height=20 border=0>' ;	EditButtonHTML = '<img src="img_Col_Edit.gif" width=24 height=20 border=0>' ;	if ( jsMode == "Edit" ) {		ButtonHTML = EditButtonHTML ;	} else {		ButtonHTML = ViewButtonHTML ;	}	hrefString = '<a href="JavaScript:' + jsProgram + "('" + jsMode + "', '" + jsDocKey + "')" + '">' + ButtonHTML + '</a>'	document.write("</tr>") ;	if (x == 1)  {		fullHTML = "<tr bgcolor=" + jsFormBodyColor + ' valign=middle><td valign=top>' + hrefString + "</td>" ;	} else {		fullHTML = "<tr bgcolor=" + jsFormHilightColor + ' valign=middle><td valign=top>' + hrefString + "</td>" ;	}	document.write( fullHTML ) ;}function showNextPage() {	if (ViewComplete == "N" ) { return ; }	catPos = pathView.indexOf("&Cat1=");	startPos = pathView.indexOf("&Start=");	pathLength = pathView.length ;	newLastLine = parseInt(lastLine) + 1 ;	if ( catPos == -1 ) { 		lastString = "&Cat1=" + jsCIRViewCategory ;	} else {		lastString = pathView.substring(catPos, pathLength) ;	}	if (startPos > -1) {		firstString = pathView.substring(0, startPos) + "&Start=" + newLastLine;	} else {		firstString = pathView.substring(0, catPos) + "&Start=" + newLastLine;	}	newString = firstString + lastString ;	window.location.replace(newString) ;} function showPreviousPage() {	if (ViewComplete == "N" ) { return ; }	catPos = pathView.indexOf("&Cat1=");	startPos = pathView.indexOf("&Start=");	pathLength = pathView.length ;	prevPageFirstLine = firstLine - MaxLines ;	if (prevPageFirstLine <= 1) { prevPageFirstLine = 1}	if (startPos > -1) {		firstString = pathView.substring(0, startPos) + "&Start=" + prevPageFirstLine;		lastString = pathView.substring(catPos, pathLength) ;	} else {		firstString = pathView.substring(0, catPos) + "&Start=" + prevPageFirstLine;		lastString = pathView.substring(catPos, pathLength) ;	}	newString = firstString + lastString ;	window.location.replace(newString) ;} function checkSetup(jsUserMode) {	tempFormName = document.forms[0].name	showCaret = new Image() ;	showCaret.src = jsLACaret ;	setDefaultSelection() ;	//if ( jsUserMode == "Admin" ) {	//	setAdminBoxLocation() ;	//}	return ;}function checkSetupNoCaret(jsUserMode) {	tempFormName = document.forms[0].name	//showCaret = new Image() ;	//showCaret.src = jsLACaret ;	//setDefaultSelection() ;//	if ( jsUserMode == "Admin" ) {//		setAdminBoxLocation() ;//	}	return ;}function GNGenerateDocKey() {	currentDate = new Date() ;	currentMS = currentDate.getTime() + "";	currentMSLength = currentMS.length ;	newMS = currentMS.substring(currentMSLength - 11) ;	return newMS ;}function replaceSubstring(charString, search, replace) {	var tempCharString = charString + '';	var searchChars = search + '';	var replaceChars = replace + '';	p = 0;	while (p < tempCharString.length && (p = tempCharString.indexOf(searchChars, p)) >= 0) {		tempCharString = tempCharString.substring(0, p) + replaceChars + tempCharString.substring(p + searchChars.length, tempCharString.length);		p += replaceChars.length;	}	return tempCharString;}	function setDefaultSelection() {	if ( jsLACaret == "None" )  { return ; }	if (document.images) {		if (is_nav3 == true || is_nav4 == true || is_ie4 == true) {			imgName = "NCaret" + jsLAID;	     		if (document[imgName].complete == true) {		   	     	document[imgName].src = showCaret.src;		   	 }		} else {			imgName = "Caret" + jsLAID;			caretObj = document.getElementById(imgName) ;			if ( caretObj.complete ) {				if ( caretObj.complete == true ) {					caretObj.src = showCaret.src;				}			} else {				caretObj.src = showCaret.src;			}		}	}	if (jsLASelectedColor != "" ) {		colName = "row" + jsLAID;		if (is_ie5up || is_nav5up || is_opera7up || is_safari || is_konqueror3up ) {			ColObj = document.getElementById(colName) ;		} else if (is_ie4) {			ColObj = document.all[colName] ;		}		tempHTML = ColObj.innerHTML ;		newHTML =  replaceSubstring(tempHTML, "LATextLink", "LASelectedLink") ;		if (is_ie5up || is_nav5up || is_opera7up || is_safari || is_konqueror3up ) {			document.getElementById(colName).innerHTML = newHTML ;			} else if (is_ie4) {			document.all[colName].innerHTML = newHTML ;			}	}}function CSTLOCListItems( DisplayMode, WindowOption, Client ) {	jsDisplayMode = DisplayMode ;	jsWindowOption = WindowOption ;	jsClient = Client ;	iWidth="820" ;	iHeight = "460" ;	jsForm = "/fCSTLOCAdmin?OpenForm&" ;	jsView = "vCSTLOCByAddressCatE" ;	jsREGSystemID = "All" ;	jsAlpha = "All" ;	Cat2 = "" ;	if (jsDisplayMode == "EditAll") {		jsCSTSystemID = "All" ;	} else if (jsDisplayMode == "EditClient") {		jsCSTSystemID = jsClient ;		Cat2 = "&Cat2=ClientOnly" ;	} else if (jsDisplayMode == "EditSome") {		choice = document.forms[0].CSTLookUp.selectedIndex;		textChoice = document.forms[0].CSTLookUp.options[choice].text;		if ( textChoice == "" ) { return ; }		textChoice = replaceSubstring(textChoice, " ", "+") ;		if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {			jsCSTSystemID = document.forms[0].CSTLookUp.options[choice].value;		} else {			jsCSTSystemID = "All" ;		}		if ( document.forms[0].CSTREGSystemID ) {			choice = document.forms[0].CSTREGSystemID.selectedIndex;			textChoice = document.forms[0].CSTREGSystemID.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {				jsREGSystemID = document.forms[0].CSTREGSystemID.options[choice].value;			} else {				jsREGSystemID = "All" ;			}		} else {			jsREGSystemID = "All" ;		}	} else if (jsDisplayMode == "Edit") {		if ( document.forms[0].CSTLookUp ) {				choice = document.forms[0].CSTLookUp.selectedIndex;			textChoice = document.forms[0].CSTLookUp.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {				jsCSTSystemID = document.forms[0].CSTLookUp.options[choice].value;						} else {				jsCSTSystemID = "All" ;			}		} else {		}		if ( document.forms[0].CSTREGSystemID ) {			choice = document.forms[0].CSTREGSystemID.selectedIndex;			textChoice = document.forms[0].CSTREGSystemID.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {				jsREGSystemID = document.forms[0].CSTREGSystemID.options[choice].value;			} else {				jsREGSystemID = "All" ;			}		} else {			jsREGSystemID = "All" ;		}		if ( document.forms[0].AlphaLookUp ) {			choice = document.forms[0].AlphaLookUp.selectedIndex;			textChoice = document.forms[0].AlphaLookUp.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {				jsAlpha = textChoice; ;			} else {				jsAlpha = "All";			}		} else {			jsAlpha = "All" ;		}		jsView = jsGNView ;	}	fullOpenCommand = GNServerPath + jsForm + jsView + "&Start=1&Cat1=" + jsCSTSystemID + "*" + jsREGSystemID + "*" + jsAlpha + Cat2  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	if ( jsWindowOption == "Existing" ) {		window.location.replace(composeString) ;	} else {		openGNDialog(composeString, iWidth, iHeight, GNNoAction, ",scrollbars=no") ;	}}function CSTLOCViewItem( DisplayMode, DocKey ) {	jsDisplayMode = DisplayMode ;	jsDocKey = DocKey ;	dialogAction = redisplayContent ;	if (jsDisplayMode == "Edit") {		jsView = "vCSTLOCBySystemID/" ;		OpenDocText = "?EditDocument" ;		iHeight = "340" ;	} else if (jsDisplayMode == "Read") {		jsView = "vCSTLOCBySystemIDRead/" ;		OpenDocText = "?OpenDocument" ;		iHeight = "340" ;		dialogAction = GNNoAction ;	} else if (jsDisplayMode == "Add") {		jsView = "fCSTLOCEdit" ;		OpenDocText = "?OpenForm&CST=" + jsDocKey ;		jsDocKey = "" ;		iHeight = "320" ;	}	iWidth = "750" ;	fullOpenCommand =  GNServerPath + "/" + jsView + jsDocKey + OpenDocText  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	openGNDialog(composeString, iWidth, iHeight, dialogAction, ",scrollbars=no") ;}function CSTREGListItems( DisplayMode, WindowOption, Client ) {	jsDisplayMode = DisplayMode ;	jsWindowOption = WindowOption ;	jsClient = Client ;	iWidth="820" ;	iHeight = "460" ;	jsForm = "/fCSTREGAdmin?OpenForm&" ;	jsView = "vCSTREGByNameCatE" ;	Cat2 = "" ;	if (jsDisplayMode == "EditAll") {		textChoice = "All" ;	} else if (jsDisplayMode == "EditClient") {		textChoice = jsClient ;		Cat2 = "&Cat2=ClientOnly" ;	} else if (jsDisplayMode == "Edit") {		choice = document.forms[0].CSTLookUp.selectedIndex;		textChoice = document.forms[0].CSTLookUp.options[choice].text;		if ( textChoice == "" ) { return ; }		textChoice = replaceSubstring(textChoice, " ", "+") ;		if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {			textChoice = document.forms[0].CSTLookUp.options[choice].value ;		} else {			textChoice = "All" ;		}		jsView = jsGNView ;	} else if (jsDisplayMode == "EditSome") {		choice = document.forms[0].CSTLookUp.selectedIndex;		textChoice = document.forms[0].CSTLookUp.options[choice].text;		if ( textChoice == "" ) { return ; }		textChoice = replaceSubstring(textChoice, " ", "+") ;		if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {			textChoice = document.forms[0].CSTLookUp.options[choice].value ;		} else {			textChoice = "All" ;		}	}	fullOpenCommand = GNServerPath + jsForm + jsView + "&Start=1&Cat1=" + textChoice + "*All" + Cat2  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	if ( jsWindowOption == "Existing" ) {		window.location.replace(composeString) ;	} else {		openGNDialog(composeString, iWidth, iHeight, GNNoAction, ",scrollbars=no") ;	}}function CSTREGViewItem( DisplayMode, DocKey ) {	jsDisplayMode = DisplayMode ;	jsDocKey = DocKey ;	if (jsDisplayMode == "Edit") {		jsView = "vCSTREGBySystemID/" ;		OpenDocText = "?EditDocument" ;		iHeight = "250" ;	} else if (jsDisplayMode == "Add") {		jsView = "fCSTREGEdit" ;		OpenDocText = "?OpenForm&CST=" + jsDocKey ;		jsDocKey = "" ;		iHeight = "170" ;	}	iWidth = "400" ;	fullOpenCommand =  GNServerPath + "/" + jsView + jsDocKey + OpenDocText  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	openGNDialog(composeString, iWidth, iHeight, redisplayContent, ",scrollbars=no") ;}function CSTLOGINListItems( DisplayMode, WindowOption, Client ) {	jsDisplayMode = DisplayMode ;	jsWindowOption = WindowOption ;	jsClient = Client ;	iWidth="820" ;	iHeight = "460" ;	jsForm = "/fCSTLOGINAdmin?OpenForm&" ;	jsView = "vCSTLOGINByNameCatE" ;	Cat2 = "" ;	if (jsDisplayMode == "EditAll") {		jsCSTSystemID = "All" ;	} else if (jsDisplayMode == "EditClient") {		jsCSTSystemID = jsClient ;		Cat2 = "&Cat2=ClientOnly" ;	} else if (jsDisplayMode == "Edit") {		choice = document.forms[0].CSTLookUp.selectedIndex;		textChoice = document.forms[0].CSTLookUp.options[choice].text;		if ( textChoice == "" ) { return ; }		textChoice = replaceSubstring(textChoice, " ", "+") ;		if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {			jsCSTSystemID = document.forms[0].CSTLookUp.options[choice].value ;		} else {			jsCSTSystemID = "All" ;		}		jsView = jsGNView ;	} else if (jsDisplayMode == "EditSome") {		choice = document.forms[0].CSTLookUp.selectedIndex;		textChoice = document.forms[0].CSTLookUp.options[choice].text;		if ( textChoice == "" ) { return ; }		textChoice = replaceSubstring(textChoice, " ", "+") ;		if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {			jsCSTSystemID = document.forms[0].CSTLookUp.options[choice].value ;		} else {			jsCSTSystemID = "All" ;		}	}	fullOpenCommand = GNServerPath + jsForm + jsView + "&Start=1&Cat1=" + jsCSTSystemID + "*All" + Cat2  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	if ( jsWindowOption == "Existing" ) {		window.location.replace(composeString) ;	} else {		openGNDialog(composeString, iWidth, iHeight, GNNoAction, ",scrollbars=no") ;	}}function CSTLOGINViewItem( DisplayMode, DocKey ) {	jsDisplayMode = DisplayMode ;	jsDocKey = DocKey ;	if (jsDisplayMode == "Edit") {		jsView = "vCSTLOGINBySystemID/" ;		OpenDocText = "?EditDocument" ;		iHeight = "580" ;	} else if (jsDisplayMode == "Add") {		jsView = "fCSTLOGINEdit" ;		OpenDocText = "?OpenForm&CST=" + jsDocKey ;		jsDocKey = "" ;		iHeight = "500" ;	}	iWidth = "500" ;	fullOpenCommand =  GNServerPath + "/" + jsView + jsDocKey + OpenDocText  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	openGNDialog(composeString, iWidth, iHeight, redisplayContent, ",scrollbars=no") ;}function CIRListItems( DisplayMode, WindowOption, Client ) {	jsDisplayMode = DisplayMode ;	jsWindowOption = WindowOption ;	jsClient = Client ;	iWidth="820" ;	iHeight = "460" ;	jsForm = "/fCIRAdmin?OpenForm&" ;	jsView = "vCIRByCompletedDateCatE" ;	jsREGSystemID = "All" ;	jsLOCSystemID = "All" ;	Cat2 = "" ;	if (jsDisplayMode == "EditAll") {		jsCSTSystemID = "All" ;	} else if (jsDisplayMode == "EditClient") {		jsCSTSystemID = jsClient ;		Cat2 = "&Cat2=ClientOnly" ;	} else if (jsDisplayMode == "EditSome") {		choice = document.forms[0].CSTLookUp.selectedIndex;		textChoice = document.forms[0].CSTLookUp.options[choice].text;		if ( textChoice == "" ) { return ; }		textChoice = replaceSubstring(textChoice, " ", "+") ;		if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {			jsCSTSystemID = document.forms[0].CSTLookUp.options[choice].value;		} else {			jsCSTSystemID = "All" ;		}		if ( document.forms[0].CSTREGSystemID ) {			choice = document.forms[0].CSTREGSystemID.selectedIndex;			textChoice = document.forms[0].CSTREGSystemID.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {				jsREGSystemID = document.forms[0].CSTREGSystemID.options[choice].value;			} else {				jsREGSystemID = "All" ;			}		} else {			jsREGSystemID = "All" ;		}	} else if (jsDisplayMode == "Edit") {		if ( document.forms[0].CSTLookUp ) {			choice = document.forms[0].CSTLookUp.selectedIndex;			textChoice = document.forms[0].CSTLookUp.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {				jsCSTSystemID = document.forms[0].CSTLookUp.options[choice].value;						} else {				jsCSTSystemID = "All" ;			}		} else {			// the client has already been selected		}		if ( document.forms[0].CSTREGSystemID ) {			choice = document.forms[0].CSTREGSystemID.selectedIndex;			textChoice = document.forms[0].CSTREGSystemID.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {				jsREGSystemID = document.forms[0].CSTREGSystemID.options[choice].value;			} else {				jsREGSystemID = "All" ;			}		} else {			jsREGSystemID = "All" ;		}		if ( document.forms[0].AlphaLookUp ) {			choice = document.forms[0].AlphaLookUp.selectedIndex;			textChoice = document.forms[0].AlphaLookUp.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && (textChoice.indexOf("Select") == -1) ) {				jsLOCSystemID = textChoice; ;			} else {				jsLOCSystemID = "All";			}		} else {			jsLOCSystemID = "All" ;		}		jsView = jsGNView ;	} else if (jsDisplayMode == "ReadClient") {		ChangeRegion = "No" ;		if ( document.forms[0].CSTREGSystemID ) {			choice = document.forms[0].CSTREGSystemID.selectedIndex;			textChoice = document.forms[0].CSTREGSystemID.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {				jsREGSystemID = document.forms[0].CSTREGSystemID.options[choice].value;			} else {				jsREGSystemID = "All" ;			}		} else {			jsREGSystemID = jsCat1Region ;		}		if ( jsREGSystemID != jsCat1Region ) {			ChangeRegion = "Yes" ;			jsLOCSystemID = "All" ;		}		if ( ChangeRegion == "No" ) {			if ( document.forms[0].CSTLOCSystemID ) {				choice = document.forms[0].CSTLOCSystemID.selectedIndex;				textChoice = document.forms[0].CSTLOCSystemID.options[choice].text;				if ( textChoice == "" ) { return ; }				textChoice = replaceSubstring(textChoice, " ", "+") ;				if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {					jsLOCSystemID = document.forms[0].CSTLOCSystemID.options[choice].value;				} else {					jsLOCSystemID = "All" ;				}			} else {				jsLOCSystemID = jsCat1Property ;			}		}		jsView = jsGNView ;		jsForm = jsGNForm ;	}	fullOpenCommand = GNServerPath + jsForm + jsView + "&Start=1&Cat1=" + jsCSTSystemID + "*" + jsREGSystemID + "*" + jsLOCSystemID + Cat2  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	if ( jsWindowOption == "Existing" ) {		window.location.replace(composeString) ;	} else {		openGNDialog(composeString, iWidth, iHeight, GNNoAction, ",scrollbars=no") ;	}}function CIRViewItem( DisplayMode, CSTDocKey, REGDocKey, LOCDocKey ) {	jsDisplayMode = DisplayMode ;	jsCSTDocKey = CSTDocKey ;	jsREGDocKey = REGDocKey ;	jsLOCDocKey = LOCDocKey ;	iWidth = "800" ;	dialogAction = redisplayContent ;	if (jsDisplayMode == "Edit") {		jsView = "vCIRBySystemIDEdit/"  ;		OpenDocText = "?EditDocument" ;		jsDocKey = jsCSTDocKey ;		iHeight = "430" ;	} else if (jsDisplayMode == "ClientAdd") {		jsView = "fSHPItemRqst" ;		OpenDocText = "?OpenForm&CST=" + jsCSTDocKey + "&RGN=" + jsREGDocKey + "&LOC=" + jsLOCDocKey ;		jsDocKey = "" ;		iHeight = "370" ;	} else if (jsDisplayMode == "Add") {		jsView = "fCIREdit" ;		//jsView = "fCIRAddAjax" ;		OpenDocText = "?OpenForm&CST=" + jsCSTDocKey + "&RGN=" + jsREGDocKey + "&LOC=" + jsLOCDocKey ;		jsDocKey = "" ;		iHeight = "360" ;		dialogAction = GNNoAction ;	} else if (jsDisplayMode == "AddPartial") {		jsView = "fCIRAdd" ;		OpenDocText = "?OpenForm&CST=" + jsCSTDocKey  ;		jsDocKey = "" ;		iHeight = "360" ;	} else if (jsDisplayMode == "Read") {		jsView = "vCIRBySystemIDRead/" ;		OpenDocText = "?OpenDocument" ;		jsDocKey = jsCSTDocKey ;		iHeight = "340" ;		dialogAction = GNNoAction ;	}	fullOpenCommand =  GNServerPath + "/" + jsView + jsDocKey + OpenDocText  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	openGNDialog(composeString, iWidth, iHeight, dialogAction, ",scrollbars=no") ;}function CIRShowCalendar( DisplayMode, WindowOption, Year, Month, Type ) {	if ( arguments[4] ) {		jsType = Type ;	} else {		jsType = jsCat2 ;	}	jsDisplayMode = DisplayMode ;	jsWindowOption = WindowOption ;		if ( jsType == "" ) { jsType = jsCat2 ; }	// jsClient = Client ;	jsYear = Year ;	jsMonth = Month ;	iWidth="820" ;	iHeight = "440" ;	jsREGSystemID = "All" ;	jsLOCSystemID = "All" ;	Cat2 = "&Cat2=" + jsType	if (jsDisplayMode == "Read") {		jsForm = "/fCIRCalRead1?OpenForm" ;		ChangeRegion = "No" ;		if ( document.forms[0].CSTREGSystemID ) {			choice = document.forms[0].CSTREGSystemID.selectedIndex;			textChoice = document.forms[0].CSTREGSystemID.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {				jsREGSystemID = document.forms[0].CSTREGSystemID.options[choice].value;			} else {				jsREGSystemID = "All" ;			}		} else {			jsREGSystemID = jsCat1Region ;		}		if ( jsREGSystemID != jsCat1Region ) {			ChangeRegion = "Yes" ;			jsLOCSystemID = "All" ;		}		if ( ChangeRegion == "No" ) {			if ( document.forms[0].CSTLOCSystemID ) {				choice = document.forms[0].CSTLOCSystemID.selectedIndex;				textChoice = document.forms[0].CSTLOCSystemID.options[choice].text;				if ( textChoice == "" ) { return ; }				textChoice = replaceSubstring(textChoice, " ", "+") ;				if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {					jsLOCSystemID = document.forms[0].CSTLOCSystemID.options[choice].value;				} else {					jsLOCSystemID = "All" ;				}			} else {				jsLOCSystemID = jsCat1Property ;			}		}	} else if (jsDisplayMode == "Edit") {		jsForm = "/fCIRCalEdit1?OpenForm" ;		ChangeRegion = "Yes" ;		if ( document.forms[0].CSTREGSystemID ) {			choice = document.forms[0].CSTREGSystemID.selectedIndex;			textChoice = document.forms[0].CSTREGSystemID.options[choice].text;			if ( textChoice == "" ) { return ; }			textChoice = replaceSubstring(textChoice, " ", "+") ;			if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {				jsREGSystemID = document.forms[0].CSTREGSystemID.options[choice].value;			} else {				jsREGSystemID = "All" ;			}		} else {			jsREGSystemID = jsCat1Region ;		}		if ( jsREGSystemID != jsCat1Region ) {			ChangeRegion = "Yes" ;			jsLOCSystemID = "All" ;		}		if ( ChangeRegion == "No" ) {			if ( document.forms[0].CSTLOCSystemID ) {				choice = document.forms[0].CSTLOCSystemID.selectedIndex;				textChoice = document.forms[0].CSTLOCSystemID.options[choice].text;				if ( textChoice == "" ) { return ; }				textChoice = replaceSubstring(textChoice, " ", "+") ;				if ( (textChoice.indexOf("All") == -1) && ( textChoice.indexOf("Select") == -1) ) {					jsLOCSystemID = document.forms[0].CSTLOCSystemID.options[choice].value;				} else {					jsLOCSystemID = "All" ;				}			} else {				jsLOCSystemID = jsCat1Property ;			}		}	}	fullOpenCommand = GNServerPath + jsForm + "&Cat1=" + jsCSTSystemID + "*" + jsREGSystemID + "*" + jsLOCSystemID+ Cat2 + "&Date=" + jsYear + "-" + jsMonth + "-01"  ;	//fullOpenCommand = GNServerPath + jsForm + "&Date=" + jsYear + "-" + jsMonth + "-01"   ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	if ( jsWindowOption == "Existing" ) {		window.location.replace(composeString) ;	} else {		openGNDialog(composeString, iWidth, iHeight, GNNoAction, ",scrollbars=no") ;	}}function JOBOFFERViewItem( DisplayMode, DocKey ) {	jsDisplayMode = DisplayMode ;	jsDocKey = DocKey ;	if (jsDisplayMode == "Edit") {		jsView = "vGNCNTByDocKey/" ;		OpenDocText = "?EditDocument" ;		iHeight = "590" ;		dialogAction = redisplayContent ;		iWidth = "750" ;	} else if (jsDisplayMode == "View") {		jsView = "vJOBOFFERViewByDocKey/" ;		OpenDocText = "?OpenDocument" ;		iHeight = "500" ;		dialogAction = GNNoAction ;		iWidth = "520" ;	}	fullOpenCommand =  jsView + jsDocKey + OpenDocText  ;	composeString = replaceSubstring(fullOpenCommand, " ", "+") ;	openGNDialog(composeString, iWidth, iHeight, dialogAction, ",scrollbars=yes") ;}function act(imgName) {	if (document.images) {	     if (jsLAID != imgName) {	     	if(document[imgName]) {	     		if (document[imgName].complete == true) {		   	     	document[imgName].src = eval(imgName + 'a.src');		   	 }	   	     }	      }  	}}function inact(imgName) {	if (document.images) {		if (jsLAID == imgName) {			if(document[imgName]) {				if (document[imgName].complete == true) {					document[imgName].src = eval(imgName + 's.src');				}			}		} else {			if (document[imgName].complete == true) {				if(document[imgName]) {					document[imgName].src = eval(imgName + 'n.src');				}			}		}	}}//------------------------- START Modal Dialog Code ---------------------------// Close the dialog.function closeme() {   window.close() ;} // Handle click of the Cancel button.function handleCancel() {   closeme() ;   return false ;}// Handle click of OK button.function handleGNSubmit() {   if (opener && !opener.closed) {		opener.dialogWin.returnFunc() ;   } else {      alert("You have closed the main window.\n\nNo action will be taken on the choices in this dialog box.")   }   // closeme() ;   return false ;}function redisplayContent() {	document.location.reload(true) ;}function GNNoAction() {	return ;}function GNReloadSite() {	fullOpenCommand = GNServerPath + "/";	window.location.replace(fullOpenCommand);}// One object tracks the current modal dialog opened from this window.var dialogWin = new Object() ;// Generate a modal dialog.// Parameters://    url -- URL of the page/frameset to be loaded into dialog//    width -- pixel width of the dialog window//    height -- pixel height of the dialog window//    returnFunc -- reference to the function (on this page)//                  that is to act on the data returned from the dialog//    args -- [optional] any data you need to pass to the dialogfunction openGNDialog(url, width, height, returnFunc, args) {	if (!dialogWin.win || (dialogWin.win && dialogWin.win.closed)) {		// Initialize properties of the modal dialog object.		dialogWin.returnFunc = returnFunc;		dialogWin.returnedValue = "";		//dialogWin.args = args		dialogWin.url = url;		dialogWin.width = width;		dialogWin.height = height;		// Keep name unique so Navigator doesn't overwrite an existing dialog.		dialogWin.name = (new Date()).getSeconds().toString();		// Assemble window attributes and try to center the dialog.		if (is_nav4) {			// Center on the main window.			dialogWin.left = window.screenX + 			   ((window.outerWidth - dialogWin.width) / 2);			dialogWin.top = window.screenY + 			   ((window.outerHeight - dialogWin.height) / 2) - 10;			var attr = "screenX=" + dialogWin.left + ",screenY=" + dialogWin.top + ",resizable=no,width=" + dialogWin.width + ",height=" + dialogWin.height + args ;		} else {			// The best we can do is center in screen.			dialogWin.left = (screen.width - dialogWin.width) / 2;			dialogWin.top = (screen.height - dialogWin.height) / 2 - 15 ;			var attr = "left=" + dialogWin.left + ",top=" + dialogWin.top + ",resizable=no,width=" + dialogWin.width + ",height=" + dialogWin.height + args ;		}				// Generate the dialog and make sure it has focus.		dialogWin.win=window.open(dialogWin.url, dialogWin.name, attr);		dialogWin.win.focus();	} else {		dialogWin.win.focus();	}}// Event handler to inhibit Navigator form element // and IE link activity when dialog window is active.function deadend() {	if (dialogWin.win && !dialogWin.win.closed) {		dialogWin.win.focus()		return false	}}// Since links in IE4 cannot be disabled, preserve // IE link onclick event handlers while they're "disabled."// Restore when re-enabling the main window.var IELinkClicks// Disable form elements and links in all frames for IE.function disableForms() {	IELinkClicks = new Array()	for (var h = 0; h < frames.length; h++) {		for (var i = 0; i < frames[h].document.forms.length; i++) {			for (var j = 0; j < frames[h].document.forms[i].elements.length; j++) {				frames[h].document.forms[i].elements[j].disabled = true			}		}		IELinkClicks[h] = new Array()		for (i = 0; i < frames[h].document.links.length; i++) {			IELinkClicks[h][i] = frames[h].document.links[i].onclick			frames[h].document.links[i].onclick = deadend		}		frames[h].window.onfocus = checkModal    		frames[h].document.onclick = checkModal	}}// Restore IE form elements and links to normal behavior.function enableForms() {	for (var h = 0; h < frames.length; h++) {		for (var i = 0; i < frames[h].document.forms.length; i++) {			for (var j = 0; j < frames[h].document.forms[i].elements.length; j++) {				frames[h].document.forms[i].elements[j].disabled = false  ;			}		}		for (i = 0; i < frames[h].document.links.length; i++) {			frames[h].document.links[i].onclick = IELinkClicks[h][i]		}	}}// Grab all Navigator events that might get through to form// elements while dialog is open. For IE, disable form elements.function blockEvents() {	disableForms()	window.onfocus = checkModal}// As dialog closes, restore the main window's original// event mechanisms.function unblockEvents() {	enableForms()}// Invoked by onFocus event handler of EVERY frame,// return focus to dialog window if it's open.function checkModal() {	setTimeout("finishChecking()", 50)	return true}function finishChecking() {	if (dialogWin.win && !dialogWin.win.closed) {		dialogWin.win.focus() 	}}//-------------------------END  Modal Dialog Code ---------------------------//This indicates that the Calculations library has loadedGeneralLibLoaded = "Yes";
