<!-- Hide me from ye olde browsers
var CurrentSite;
CurrentSite = "";
function getCurrentSite() { return(CurrentSite); }
function setCurrentSite(s) { CurrentSite = s; }
function  jumpExternal  (toWhere) {
     w = window.open(toWhere,"ExtSite");
     w.focus();
}
function openWindow(url,x,y)
{
   w = window.open(url,'popup','scrollbars=yes,status=no,top=0,left=0,width=' + x + ',height=' + y + ',toolbar=no,resizable=yes');
   w.focus();
}
function openWindow1(url,winname,x,y)
{
   w = window.open(url,winname,'scrollbars=yes,status=no,width=' + x + ',height=' + y + ',toolbar=no,resizable=yes');
   w.focus();
}
function deactivateLinks()
{
for (var i = 0; i < document.links.length; i++) {
     if (document.links[i].href != "javascript:window.print();") 
     document.links[i].href="#";
   }
for (var i=0; i < document.forms[0].elements.length; i++) {
     if (document.forms[0].elements[i].type == "select-one") {
       var lst = document.forms[0].elements[i];
       for (var j=0; j < lst.options.length; j++) {
           lst.options[j].value="#";
       }
     }
    }
}
function rollon(path, imgName, extension){
    document.images[imgName].src=path+imgName+"-on."+extension;
}

function rolloff(path, imgName, extension){
    document.images[imgName].src=path+imgName+"-off."+extension;
}
function SiteSearch(path1) {
   df = document.forms[0];
   pos = df.sitesearchtext.value.indexOf('"');  //check if double-quote used - do not allow this as this will cause the search agent problems
   if ( (df.sitesearchtext.value == "") || (df.sitesearchtext.value == "search") )
   {
   		alert("Please enter a search string");
   		df.sitesearchtext.focus();
		return;
   }
   else if (pos >= 0)
   {
   		alert("Please remove double-quotes from your search string and try again");
   		df.sitesearchtext.focus();
		return;
   }

   pos = location.href.lastIndexOf(".nsf");
   if (pos==-1) {path=location.href+path1; }
   else {path = location.href.substr(0,pos+4); }
   //alert(path);
   url = path + "/Results/-SiteSearchResults?OpenDocument&Query=" + escape(df.sitesearchtext.value) + "&PageNo=1";
   //alert(url);
   location.href = url;
}
function reloadMain(url) {
    if (url=='')
     window.opener.location.reload();
   else
      window.opener.location.href=url;
    window.close();
}
function loadTopMenu() {
   pos = location.href.lastIndexOf(".nsf");
   path = location.href.substr(0,pos+4);
   MM_preloadImages(path + '/border1.gif',path + '/border1_f3.gif',path + '/border2.gif',path + '/border2_f2.gif',path + '/border2_f3.gif',path + '/border2_f4.gif',
path + '/border3.gif',path + '/border3_f2.gif',path + '/border3_f3.gif',path + '/border3_f4.gif',path + '/border4.gif',path + '/border4_f2.gif',path + '/border4_f3.gif',path + '/border4_f4.gif',
path + '/border5.gif',path + '/border5_f2.gif',path + '/border5_f3.gif',path + '/border5_f4.gif',path + '/border6.gif',path + '/border6_f2.gif',path + '/border6_f3.gif',path + '/border6_f4.gif',
path + '/border7.gif',path + '/border7_f2.gif',path + '/border7_f3.gif',path + '/border7_f4.gif',path + '/border8.gif',path + '/border8_f3.gif',document.forms[0].menuImages.value);
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function getCookieValue (Name) 
{
   // added on 30/10/2000
   // returns the actual value of the cookie specifed by 'name', not the  variable:value, as getCookie returns ... 
   
    var search = Name + "="
    if (document.cookie.length > 0) 
    { // if there are any cookies
        offset = document.cookie.indexOf(search) 
        if (offset != -1) 
        { // if cookie exists 
            offset += search.length 
            // set index of beginning of value
            end = document.cookie.indexOf(";", offset) 
            // set index of end of cookie value
            if (end == -1) 
                end = document.cookie.length

            fullCookie = unescape(document.cookie.substring(offset, end))  
            locale = fullCookie.split(":");
            theFirstValue = unescape(locale[1]);
            return theFirstValue;
        } else {
              return (null)
        }
    }
}
function setCookieValue (cookieName, cookieValue, expDate)   {
// added on 30/10/2000
//  SAMPLE CODE 1 FOR setCookieValue (Cookie essentially doesn't expire) :
// top.setCookieValue ("The_Cookie_Name", "The_Cookie_Value", "Persistant");
//  SAMPLE CODE 2 FOR setCookieValue (Cookie expires every time user exits browser ... ie leave off the expDate parameter) :
// top.setCookieValue ("The_Cookie_Name", "The_Cookie_Value", "Session");
//  SAMPLE CODE 3 FOR setCookieValue (This effectively acts as if deleting the cookie) :
// top.setCookieValue ("The_Cookie_Name", "");
    if (expDate == "Persistant") {
             var today = new Date()          
             var expires = new Date();
             expires.setTime(today.getTime() + 1000*60*60*24*365*20);    // x1000  is to get it in milliseconds, the x20 is for 20 years
             var the_cookie_date = expires.toGMTString();
             var the_cookie_date_text = "expires=" + the_cookie_date + ";"
              //  OLD CODE:  
              /************************
              expDate = "31 December, 2020"; 
              var the_date = ((expDate == "") ? "" : (new Date(expDate)));
              //       alert(the_date);
              var the_cookie_date = the_date.toGMTString();
              //      alert(the_cookie_date);
              var the_cookie_date_text = "expires=" + the_cookie_date + ";"
              ************************/
    }
    else if (expDate == "Session")  {
               expDate = ""; 
              var the_cookie_date_text = "";
    }
    else {
              expDate = "";    
              var the_cookie_date_text = "";
    }
    var the_path = "path=/;";
    var the_cookie = cookieName + "=locale:" + escape(cookieValue) + ";";

    the_cookie = the_cookie + the_cookie_date_text + the_path;
 //       alert(the_cookie);
    document.cookie = the_cookie;
} 
function clearCookieValue (CookieName) {
     //  NOTE : This is an administrative type function mainly used for administering cookies
     setCookieValue (CookieName, '', 'Persistant');
     alert ("The cookie value named '" + CookieName + "' has been cleared.");
}
function showCookieValue (CookieName) {     
     //  NOTE : This is an administrative type function mainly used for administering cookies
     alert ("Cookie '" + CookieName + " = '" + getCookieValue (CookieName) +  "'.");
}
function showCookie (theDocument) {     
     //  NOTE : This is an administrative type function mainly used for administering cookies
     alert ("Cookie for '" + theDocument.URL + " = '" + theDocument.cookie.toString() +  "'.");
}
function clearCookie (theDocument) {     
     //  NOTE : This is an administrative type function mainly used for administering cookies
     theDocument.cookie="";
     alert ("Cookie for '" + theDocument.URL + " has been cleared.");
}
function promptCookieValue (CookieName) {     
     //  NOTE : This is an administrative type function mainly used for administering cookies
     retVal = prompt ("Please enter the value you want the Cookie '" + CookieName + "' to be:");
     if (retVal.length>0) {
          setCookieValue (CookieName, retVal, 'Persistant');
          alert ("The cookie value named '" + CookieName + "' has been changed to: '" + retVal + "'.");
     } else {
          alert ("The cookie value named '" + CookieName + "' has not been changed.");
     }
}
//cycles through and displays site banners
function writeBanner(path)
{
  c = getCookieValue ('LLFrontImage');
  n = parseInt(c);
  if ( isNaN(n) ) {
    n = 0;
  }
  else if (n >= 5) {
    n = 0;
  }
  else {
    n++;
  }
  //n = ( Math.round(Math.random() * 100) ) % 7;
  document.write("<td colspan=4 background='/" + path  + "/banner" + n.toString() + ".jpg'><img src='/icons/ecblank.gif' width=1 height=90 border=0></td>");
  setCookieValue('LLFrontImage', n.toString() , 'Persistant')
}
//-->
