function openDBRelativeURL( elemName ){ pathName = location.pathname.split('.nsf'); if (pathName[0] =="/") { location.href=pathName[0] + 'customer/wm/trustees.nsf/' + elemName; }else { location.href = pathName[0] + '.nsf/' + elemName; } } /*********************************************************** Replaces notes command in URL - as location.search method will not work if ! is used in URL ***********************************************************/ function switchURL(URLCommand) { var curref = document.location.href; if ((curref == "") || (curref.indexOf('?') == -1)) { var seperator = "!"; } else { var seperator = "?"; } stringToSplit = curref; arrayOfStrings = stringToSplit.split(seperator); arrayLength = arrayOfStrings.length; docref = arrayOfStrings[0]; // First element of the Array will always be the database & document unique ids. num=Math.floor(Math.random()*1000); if(URLCommand == "EditDocument") { urlparam = "&refresh="+num; } else { urlparam = ""; } newhref = docref +seperator+URLCommand+urlparam; self.location.href = newhref; } function doDelete( setSubmitVar) { if ( confirm('Are you sure you want to delete this document?') ){ isDocBeingSubmitted = true; //location.search = "?DeleteDocument"; switchURL("DeleteDocument"); } } function trim(aStr) { return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "") }