var mypath = "/FDA/FennerDunEsp.nsf"; //path to database var searchpath = "/FDA/Imagelib.nsf"; //path to database function writeSessionCookie (cookieName, cookieValue) { document.cookie = escape(cookieName) + "=" + escape(cookieValue) + "; path=/"; } function getCookieValue (cookieName) { var exp = new RegExp (escape(cookieName) + "=([^;]+)"); if (exp.test (document.cookie + ";")) { exp.exec (document.cookie + ";"); return unescape(RegExp.$1); } else return false; } function replaceSubstring(theStr, theFind, theReplace) { while (theStr.indexOf(theFind)>-1) { pos= theStr.indexOf(theFind); theStr = "" + (theStr.substring(0, pos) + theReplace + theStr.substring((pos + theFind.length), theStr.length)); } return(theStr); }