var pathname = window.location.pathname.toLowerCase(); filename = pathname.substring(0,(pathname.lastIndexOf('nsf')+4)) ; filenameR = pathname.substring(0,(pathname.lastIndexOf('nsf')+3)) ; function getHelp(helppage) { var newWindow = window.open(filename + 'pages/' + helppage +'?Open','secondary_window','toolbar=no,location=no,scrollbars=yes,directories=no,height=300,width=400'); newWindow.focus(); } function pdfTest() { var newWindow = window.open(filename + 'pages/testpdf/$file/ufmtestpdf.pdf' + '?Open','secondary_window','resizable=yes,toolbar=no,location=no,scrollbars=yes,directories=no,height=400,width=450'); newWindow.focus(); } function popup(where,attr){ popUp = window.open(where,'',attr) ; } function wl(ad,adname) { var sess = getCookie ('gets') //alert('cookie is ' + sess + ' ad is ' + ad) if(sess == null) { alert('We are sorry! \n\nYou must be a registered user to use this function. \n\nRegistration is Free and easy, only 4 fields. click on the Free Membership link on the grey navigation bar.') } else { var usr = getCookie ('usrm'); var locn = 'addwishlist?openagent&em=' + usr + '&ad=' + ad; parent.frames[3].location.href = locn; alert( 'we added "' + adname + '" to your wish list \n\nYou can use the "Wish List" link to access your wish list when ever you are logged in.'); } } function getArgs() { var args = new Object(); var query = location.search.substring(1); var pairs = query.split("&"); for (var i = 0; i < pairs.length; i++) { var pos = pairs[i].indexOf('='); if (pos == -1) continue; var argname = pairs[i].substring(0,pos); var value = pairs[i].substring(pos+1); args[argname]=value; } return args; } function checkPhone(){ var newWindow = window.open(filename + 'CheckPhone?openform' +'?Open','secondary_window','toolbar=no,location=no,scrollbars=yes,directories=no,height=500,width=630'); newWindow.focus(); } function doFeedback(page){ alert('Future functionality '); return; //var newWindow = window.open(filename + 'FeedBack?openform&fm=' + page +'?Open','secondary_window','toolbar=no,location=no,scrollbars=yes,directories=no,height=500,width=630'); //newWindow.focus(); } function tellFriend(URL, baseRef){ //alert('Future functionality '); var newWindow = window.open(baseRef + 'TellFriend?openform&key=' + URL,'secondary_window','toolbar=no,location=no,scrollbars=yes,directories=no,height=500,width=420'); newWindow.focus(); } function chkph(baseRef){ //alert('Future functionality '); var newWindow = window.open(baseRef+'chPhoneFrm?open','secondary_window','toolbar=yes,location=no,scrollbars=yes,directories=no,height=370,width=770'); newWindow.focus(); } function siteSearch() { var searchval = escape(document.forms[0].text.value); var loc = filename + 'allsearch?SearchView&Query=\"'+ searchval +'\"&SearchOrder=0&Start=1&Count=100' var fl=parent.frames[1].length if(fl == "0") { document.forms[0].text.value = ""; alert( 'your query is: ' + searchval + '\n\nFuture Functionality'); //document.forms[0].reset(); return; //parent.frames[1].location.href = loc; } else { document.forms[0].reset(); parent.frames[1].frames[1].location.href = loc; } } function showCustInfo(){ //Hide the choices stuff and show the reg stuff document.getElementById("coInfo").style.display = "block"; document.getElementById("hCoInfoB").style.display = "block"; document.getElementById("sCoInfoB").style.display = "none"; } function hideCustInfo(){ //Hide the choices stuff and show the reg stuff document.getElementById("coInfo").style.display = "none"; document.getElementById("hCoInfoB").style.display = "none"; document.getElementById("sCoInfoB").style.display = "block"; } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } 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"; } } function logout() { deleteCookie('gets',"/",""); deleteCookie('usrm',"/",""); top.document.location.href = filenameR + "?logout&RedirectTo=" + filename; } function showLinkInfo(theid) { //alert(theid); document.getElementById("mainText").innerHTML = document.getElementById(theid).innerHTML; return; } function returnInfo() { //alert(theid); document.getElementById("mainText").innerHTML = document.getElementById("holder").innerHTML; return; } function doInfoChange(thelink) { document.getElementById("mainText").src = 'pages/'+ thelink; return; } function doInfoChangeA(thelink, anchor) { document.getElementById("mainText").src = 'pages/'+ thelink + '#' + anchor; return; } function doNewsChange(thelink) { document.getElementById("mainText").src = 'newsItems/'+ thelink; return; } function doServiceChange(thelink) { document.getElementById("mainText").src = 'serviceItems/'+ thelink; return; } function doLinkChange(thelink) { document.getElementById("mainText").src = 'linkItems/'+ thelink; return; } function doStaffChange(thelink) { document.getElementById("mainText").src = 'staffItems/'+ thelink; return; }