 var NS = (navigator.appName.indexOf("Netscape")!=-1);
 var MS = (navigator.appName.indexOf("Microsoft")!=-1);
 var VER=parseInt(navigator.appVersion);
 var CSS=((MS&&VER>=4)||(NS&&VER>=5));
 var NS4=(NS&&VER==4);
 var NS6=(NS&&VER==5);
 var IE4=(MS&&VER==4);
 var IE5=(MS&&VER==5);
 var ver4= (VER>=4&&(MS||NS));
 var ver5=((MS&&VER>=5)||(NS&&VER>=5));

 function setCookie(name, value, expire) {
   if ( expire == null ) {
     expire = new Date();
     expire.setTime(expire.getTime() + 2*365*24*3600*1000); // +2 years
   }
   document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
 }

 // Gets cookie value
 //
 function getCookie(Name) {
   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;
       return unescape(document.cookie.substring(offset, end));
     }
   }
   return "";
 }

 function expandEl(el) {
   if ( !CSS ) return;
   if ( IE4 ) {
     whichEl = eval(el);
     Img = eval(el + "i");
   } else {
     whichEl = document.getElementById(el);
     Img = document.getElementById(el+"i");
   }
   if (whichEl ) {
     if ( whichEl.style.display != "block") {
       whichEl.style.display = "block";
       Img.src="/img/minus.gif"
     }
     else {
       whichEl.style.display = "none";
       Img.src="/img/plus.gif"
     }
   }
 }

