    var ns4 = false;
    var ns6 = false;
    var ie4 = false;
    var ie5 = false;

    var agt=navigator.userAgent.toLowerCase();
    var ieIndex = agt.indexOf("msie ");
     if (ieIndex != -1) {  // we have new IE!
       ieVersion = parseInt(agt.substr(ieIndex + 5));
        }

// we don't use is_nav yet

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var nsIndex = agt.indexOf("netscape/");
     if ((is_nav) && (nsIndex != -1)) {  // we have new NS!
       nsVersion = parseInt(agt.substr(nsIndex + 9));
        }

   if (document.layers) { nsVersion = parseFloat(navigator.appVersion); }

      if (document.layers) { ns4 = true; }
      if (document.all) { ie4 = true; }
      if (document.getElementById && !document.all) { ns6 = true; }
      if (document.getElementById && document.all) { ie5 = true; }
//      if (document.getElementById && document.body.style) { ns6 = true; }

// animation globals
op1 = 0;
opIncrement = 10;
theObject = null;


 function initFade(objName) {
   if (document.getElementById) {
   theObject = document.getElementById(objName);
   fadeIn();
  }
 }

function lightup(imageobject, opacity){
if (ns6) { imageobject.style.MozOpacity=opacity/100; }
if (ie5) { imageobject.filters.alpha.opacity=opacity; }
}

 function fadeIn() {
   if (document.getElementById) {
       op1 += opIncrement;
      if (op1 > 100) { op1 = 100; }
       lightup(theObject,op1);
     if (op1 < 100) { setTimeout('fadeIn()',50); } else { setTimeout('fadeOut()',50); }
       } // endif document.getElementById
   } // end fadeIn

 function fadeOut() {
   if (document.getElementById) {
       op1 -= opIncrement;
      if (op1 < 0) { op1 = 0; }
       lightup(theObject,op1);
     if (op1 > 0) { setTimeout('fadeOut()',50); } else { setTimeout('transition()',50); }
       } // endif document.getElementById
   } // end fadeIn

 function transition() {
   var newLeft = getRandom(323,800);
   var newTop = getRandom(5,140);
   if (document.getElementById) {
    document.getElementById("sparkle").style.left = newLeft + "px";
    document.getElementById("sparkle").style.top = newTop + "px";
    setTimeout('fadeIn()',50);  // restart cycle
   } // endif document.getElementById
 } // end transition

 function getRandom(lower_bound, upper_bound) {
   var initial_random = ((upper_bound - lower_bound + 1) *
                Math.random() + lower_bound);
     return Math.floor(initial_random);
    } // end getRandom

// pics/sparkler.gif 30x28

 function toggleOn(id) {
    theElement = document.getElementById(id);
    theElement.style.visibility ='visible';
 } // end toggleOn

 function toggleOff(id) {
    theElement = document.getElementById(id);
    theElement.style.visibility ='hidden';
 } // end toggleOff


 function popZoom(pictURL, pWidth, pHeight) {
  var sWidth = 640;
  var sHeight = "770";
   if (ns6 || ie5) { sWidth = screen.availWidth; sHeight= screen.availHeight;  }
  var x1 = pWidth+30;
  var y1 = pHeight+30;
  var dTop = sHeight/2 - 40;
  var pZoomStr = "height=" + y1 + ",width=" + x1 + ",left=" + ((sWidth-x1)/2) +
      ",top=" + dTop + ",scrollbars=0,menubar=0";
    pZoom = window.open("","", pZoomStr);
    pZoom.document.open();
    pZoom.document.writeln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
    pZoom.document.writeln("<html>\n<head>\n<title>Spiers &amp; Associates: Zoom View of " + pictURL + "</title>");
    pZoom.document.writeln("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
    pZoom.document.writeln("</head>\n<body bgcolor=\"#ffffff\" onblur='self.close();'>");
    pZoom.document.writeln("<p style=\"text-align:center;\"><img src=\"" + pictURL + "\" width=\"" + pWidth + "\" height=\"" + pHeight + "\">");
    pZoom.document.writeln("</p>\n</body>\n</html>\n");
    pZoom.document.close();

 } // end popZoom


