// Using supplied Lotus Notes unique document id // open the document from the current database function OpenDocById(strDocID) { location = GetDBPath() + "/0/" + strDocID + "?opendocument"; } // Using supplied Lotus Notes unique document id // open the document from the current database // with additional arguments function OpenDocByIdArgs(strDocID, strArguments) { location = GetDBPath() + "/0/" + strDocID + "?opendocument" + strArguments; } // Extract from the URL the Path & Filename // of the Lotus Notes database currently open function GetDBPath() { var strURL = window.location.href; var intPosHost = strURL.indexOf("/",9); var intPosNSF = strURL.indexOf(".nsf"); var strDB = strURL.slice(intPosHost,intPosNSF+4); return strDB; } // Set the Class name of the supplied // Element ID to the 'Hidden' class function SetHiddenClass(strID) { var objElement = document.getElementById( strID); objElement.className="Hidden"; } // Change class of Button to show highlight function HighlightButton(objElement) { objElement.className='HighlightButton'; } // Change class of Button to Normal function LowlightButton(objElement) { objElement.className='StdButton'; } // Change Source of Image Element function ChangeImage ( objElement, strImageName ) { objElement.src = strImageName; } // Set Cursor Focus on Supplied Element function SetFocus ( objElement ) { objElement.focus(); } // Display question, add answer to supplied Select element function AddOptionToSelect( strQuestion , objSelect ) { strNewOption = prompt ( strQuestion , ""); if (strNewOption == null) { return }; NewOption = new Option (strNewOption,strNewOption,false,true); objSelect.options[objSelect.options.length] = NewOption; } // Create Session Cookie, using supplied name & value function SetSessionCookie ( vStrCookieName, vStrCookieValue ) { document.cookie = vStrCookieName+ "=" + escape(vStrCookieValue) + ";path=/"; } // Extract value of named cookie suppled function GetCookieValue( vStrCookieID ) { var vStrAllCookies = document.cookie +";"; var vIntPos = vStrAllCookies.indexOf(vStrCookieID+"="); var vStrCookieValue = ""; if ( vIntPos !=-1 ) { var vIntStart = vIntPos + vStrCookieID.length + 1; var vIntEnd = vStrAllCookies.indexOf(";", vIntStart); var vStrCookieValue = vStrAllCookies.substring(vIntStart, vIntEnd); vStrCookieValue = unescape(vStrCookieValue); } return vStrCookieValue; }