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 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 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; }