function lite(obj) {
  if ((document.all)&&(!window.opera)&&(obj.filters)&&(obj.filters.blendTrans)) {
    obj.filters.blendTrans.apply(); 
    obj.filters.blendTrans.play(); 
  } 
} 
function makeCool(evt) {
  if (!evt) var evt=window.event;
  if (!evt) return true;
  var src=(evt.target)? (evt.target.nodeType==3)? evt.target.parentNode:evt.target :evt.srcElement
//if (evt.shiftKey) {
//  for (zzz in src) { if (zzz) { window.alert(zzz+' : '+zzz.valueOf()); } }
//}
  if (src.tagName == "IMG") { 
    src.oldshgt       = src.style.height;
    src.oldswid       = src.style.width;
    src.oldhgt        = src.height;
    src.oldwid        = src.width;
    src.style.height  = Math.round((parseInt(src.height)+(parseInt(src.height)*(0.6+Math.random())))/2)+'px';
    src.style.width   = Math.round((parseInt(src.width) +(parseInt(src.width) *(0.6+Math.random())))/2)+'px'; 
    if (parseInt(src.width)>550) {src.style.width=Math.round(parseInt(src.width)*0.5);};
  } else { 
    if ((src.tagName == "SPAN")||(src.tagName == "A")) {
      src.oldscol = src.style.color;
      src.oldssiz = src.style.fontSize;
      src.oldswgt = src.style.fontWeight;
      src.oldcol  = src.color;
      src.oldsiz  = src.fontSize;
      src.oldwgt  = src.fontWeight;
      src.style.color      = "FF0000";
//    src.style.fontSize   = "larger";
      src.style.fontWeight = "bolder";
      src.color            = "FF0000";
//    src.fontSize         = "larger";
      src.fontWeight       = "bolder";
    }
  }
}
// L. 39 ===================================================================================
function makeNormal(evt) {
  if (!evt) var evt=window.event;
  if (!evt) return true;
  var src=(evt.target)? (evt.target.nodeType==3)? evt.target.parentNode:evt.target :evt.srcElement
  if (src.tagName=="IMG") { 
    if (typeof(src.oldshgt)!="undefined") {
      src.style.height = src.oldshgt;
      src.style.width  = src.oldswid;
      src.height       = src.oldhgt;
      src.width        = src.oldwid;
    }
  } else {
    if ((src.tagName=="SPAN")||(src.tagName=="A")) {
      if (typeof(src.oldscol)!="undefined") {
        src.color            = src.oldcol;
        src.fontSize         = src.oldsiz;
        src.fontWeight       = src.oldwgt;
        src.style.color      = src.oldscol;
        src.style.fontSize   = src.oldssiz;
        src.style.fontWeight = src.oldswgt;
      }
    }
  }
}
// L. 72 ===================================================================================
function xbDetectBrowser()
{
  var oldOnError = window.onerror;
  var element = null;

  window.onerror = null;
  
  // work around bug in xpcdom Mozilla 0.9.1
  window.saveNavigator = window.navigator;

  navigator.OS    = '';
  navigator.version  = parseFloat(navigator.appVersion);
  navigator.org    = '';
  navigator.family  = '';

  var platform;
  if (typeof(window.navigator.platform) != 'undefined')
  {
    platform = window.navigator.platform.toLowerCase();
    if (platform.indexOf('win') != -1)
      navigator.OS = 'win';
    else if (platform.indexOf('mac') != -1)
      navigator.OS = 'mac';
    else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
      navigator.OS = 'nix';
  }

  var i = 0;
  var ua = window.navigator.userAgent.toLowerCase();
  
  if (ua.indexOf('opera') != -1)
  {
    i = ua.indexOf('opera');
    navigator.family  = 'opera';
    navigator.org     = 'opera';
    navigator.version = parseFloat('0' + ua.substr(i+6), 10);
  }
  else if ((i = ua.indexOf('msie')) != -1)
  {
    navigator.org     = 'microsoft';
    navigator.version = parseFloat('0' + ua.substr(i+5), 10);
    
    if (navigator.version < 4)
      navigator.family = 'ie3';
    else
      navigator.family = 'ie4'
  }
  else if (ua.indexOf('gecko') != -1)
  {
    navigator.family = 'gecko';
    var rvStart = navigator.userAgent.indexOf('rv:') + 3;
    var rvEnd = navigator.userAgent.indexOf(')', rvStart);
    var rv = navigator.userAgent.substring(rvStart, rvEnd);
    var decIndex = rv.indexOf('.');
    if (decIndex != -1)
    {
      rv = rv.replace(/\./g, '');
      rv = rv.substring(0, decIndex) + '.' + rv.substr(decIndex);
    }
    navigator.version = parseFloat(rv);

    if (ua.indexOf('netscape') != -1)
      navigator.org = 'netscape';
    else if (ua.indexOf('compuserve') != -1)
      navigator.org = 'compuserve';
    else
      navigator.org = 'mozilla';
  }
  else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
  {
    var is_major = parseFloat(navigator.appVersion);
    
    if (is_major < 4)
      navigator.version = is_major;
    else
    {
      i = ua.lastIndexOf('/');
      navigator.version = parseFloat('0' + ua.substr(i+1), 10);
    }
    navigator.org = 'netscape';
    navigator.family = 'nn' + parseInt(navigator.appVersion);
  }
  else if ((i = ua.indexOf('aol')) != -1 )
  {
    // aol
    navigator.family  = 'aol';
    navigator.org    = 'aol';
    navigator.version  = parseFloat('0' + ua.substr(i+4), 10);
  }
  else if ((i = ua.indexOf('hotjava')) != -1 )
  {
    // hotjava
    navigator.family  = 'hotjava';
    navigator.org    = 'sun';
    navigator.version  = parseFloat(navigator.appVersion);
  }

  window.onerror = oldOnError;
}
// line 172
xbDetectBrowser();

var bV  =parseInt(navigator.appVersion),
    NS4 =false,
    NS6 =false,
    IE4 =false,
    IE4x=false,
    IE5x=false,
    IE55=false,
    IE6x=false,
    Moz =false,
    MMB =false;
//  NS4 =(document.layers)         ? true:false,
//  IE4 =((document.all)&&(bV>=4)) ? true:false,
//  ver4=(NS4||IE4)                ? true:false;
switch(navigator.family) {
  case 'ie4':
        IE4=true;
        if      (navigator.version >= 6)
            IE6x=true;   // IE 6.0+
        else if (navigator.version >= 5.5)
            IE55=true;   // IE 5.5
        else if (navigator.version >= 5)
            IE5x=true;   // IE 5.x
        else
            IE4x=true;   // IE 4.x
        break;
  case 'gecko':
       switch(navigator.org) {
         case 'netscape': NS6=true; break; // Netscape 6.x and higher
         case  'mozilla': Moz=true; break; // Mozilla browsers
         default        : MBB=true; break; // other Mozilla based browsers
       }
       break;
  case 'nn4':
        NS4 =true;
        break;
}
//line 211
// var ver4=(IE4||NS4) ? true:false;

//////////////////////////////////////////////////////////////////////

var exclude=1, agt=navigator.userAgent.toLowerCase()
,   win=0, mac=0, lin=1, lnx=0, ice=0, ie=0 , ie4=0, ie5=0, ie6=0, kde=0
,   com=0, dcm  , op5=0, op6=0, op7=0, ns4=0, ns6=0, ns7=0, mz7=0, saf=0
;
if(agt.indexOf('win')!=-1){win=1;lin=0;}
if(agt.indexOf('mac')!=-1){mac=1;lin=0;}
if(lin){lnx=1;}
if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE"){
	var thisKDE=agt;
	var splitKDE=thisKDE.split("konqueror/");
	var aKDE=splitKDE[1].split("; ");
	var KDEn=parseFloat(aKDE[0]);
	if(KDEn>=2.2){
		kde=1;
		ns6=1;
		exclude=0;
	}
}
else if(agt.indexOf('webtv')!=-1){exclude=1;}
else if(typeof window.opera!="undefined"){
	exclude=0;
	if(agt.indexOf("opera/5")!=-1||agt.indexOf("opera 5")!=-1){op5=1;}
	if(agt.indexOf("opera/6")!=-1||agt.indexOf("opera 6")!=-1){op6=1;}
	if(agt.indexOf("opera/7")!=-1||agt.indexOf("opera 7")!=-1){op7=1;}
}
else if(typeof document.all!="undefined"&&!kde){
	exclude=0;
	ie=1;
	if(typeof document.getElementById!="undefined"){
		ie5=1;
		if(agt.indexOf("msie 6")!=-1){
			ie6=1;
			dcm=document.compatMode;
			if(dcm!="BackCompat"){com=1;}
		}
	}
	else{ie4=1;}
}
else if(typeof document.getElementById!="undefined"){
	exclude=0;
	if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}
	else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}
	else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}
	if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){mz7=0;ns6=1;saf=1;}
}
else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){
	exclude=0;
	ns4=1;
	if(typeof navigator.mimeTypes['*']=="undefined"){
		exclude=1;
		ns4=0;
	}
}
if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}
if(typeof navigator.__ice_version!="undefined"){exclude=1;ie4=0;}

// line 172 ////////////////////////////////////////////////////////// 

var Lyr=false,All=false,w3c=false;
if      (document.getElementById) { w3c=true; }
else if (document.all)            { All=true; }
else if (document.layers)         { Lyr=true; }
//if      (typeof(document.layers)!="undefined") Lyr=true;
//else if((typeof(document.getElementById)!="undefined")&&(document.body)&&(document.body.style)) w3c=true;
//else if (typeof(document.all)!="undefined") All=true;


function findIt(e) { 
  if (zoomed) {
      zoomIn(); 
      return false;
  }
  if (IE4) {
//  if (picsAll) { isOK=(event.srcElement.tagName == "IMG") ? 1:0; }
//  if (isOK) {whichIm=event.srcElement; zoomOutInPage(whichIm); return false}
    if (event.srcElement.tagName == "IMG")
      { whichIm=event.srcElement; zoomOutInPage(whichIm); return false; }
  } //   endif IE4
  else { // if NS4
//  if (picsAll) { l=e.pageX; t=e.pageY; gotit=getImage(l,t); } 
//  if (gotit)   { zoomOutInEl(whichIm); return false }
    if (NS4) {
      gotit=getImage(e.pageX,e.pageY);
      if (gotit) { zoomOutInEl(whichIm); return false; }
    }
  } //   endif NS4
  return true;
} // end findIt
// L.301 ========================================================================================
//if (ver4) {
  var whichIm = false,
      zoomed  = false,
      gotit   = false,
      scale   = 2.5,
      picsAll = true;
  if (NS4) { document.captureEvents(Event.CLICK) };
  document.onclick = findIt;
//} //end if (ver4)
// L.311 =======================================================================================
function getImage(l,t) {  // needed by findIt for NS4 (IE4 does it for you)
  gotit = false;
  for     (i=0; i<document.images.length; i++) {
    imX1 =        document.images[i].x;
    imX2 = imX1 + document.images[i].width;
    imY1 =        document.images[i].y;
    imY2 = imY1 + document.images[i].height;
    if ((l>=imX1 && l<=imX2) && (t>=imY1 && t<=imY2)) {
      whichIm = document.images[i];
      gotit = true;
      break;
    }
  }
  return gotit;
}
// L.327 ======================================================================================
function zoomOutInPage() {
  whichIm.width  = whichIm.width  * scale;
  whichIm.height = whichIm.height * scale;
  zoomed = true;
}
// L.333 =======================================================================================
function zoomOutInEl(whichIm) {
  newWidth  = whichIm.width  * scale;
  newHeight = whichIm.height * scale;
  bigImStr="<A HREF='javascript:zoomIn()'><IMG NAME='imBig' SRC=\&quot;" + whichIm.src + "\&quot; WIDTH=" + newWidth + " HEIGHT=" + newHeight + " BORDER=0></A>";
  with (document.elZoom.document) { open(); write(bigImStr); close(); };
  document.elZoom.moveTo(whichIm.x,whichIm.y);
  document.elZoom.visibility = "visible";
  zoomed = true;
} //end zoomOutInEl
// L. 343 ====================================================================================
function zoomIn() {
  if (IE4) { whichIm.width  = whichIm.width  / scale;
             whichIm.height = whichIm.height / scale; }
  else { document.elZoom.visibility='hidden'; }
  gotit  = false;
  zoomed = false;
} //end zoomIn
// L. 351 ====================================================================================
function stopCapt(on){ 
  if (!ver4) { return };
  if (on) {
    if (NS4) { document.captureEvents(Event.CLICK) };
    document.onclick = findIt; 
  }
  else {
    if (NS4) { document.releaseEvents(Event.CLICK) }
    else     { document.onclick = null }
  }
} //end stopCapt
// L. 363 ====================================================================================
//function stopCapt() { return };
if (document.images) {
  arImLoad = new Array (
      "../art/b_left_over",
      "../art/b_left_down",
      "../art/b_right_over",
      "../art/b_right_down"
  );
  arImList = new Array ();
  for (counter in arImLoad) {
      arImList[counter] = new Image();
      arImList[counter].src = arImLoad[counter] + ".gif";
  }
}
// L. 381 ===================================================================================
function navOver(imName,dir,over) {
  if (!document.images) {return};
  whichIm = document.images[imName];
  if (over) { whichIm.src = "../art/b_" + dir + "_over.gif" }
       else { whichIm.src = "../art/b_" + dir + ".gif" }
}
// L. 388 ===================================================================================
function navPress(imName,dir,press) {
  whichIm = document.images[imName];
  if (press) { whichIm.src = "../art/b_" + dir + "_down.gif" }
        else { whichIm.src = "../art/b_" + dir + ".gif" }
}
// L. 394 ===================================================================================
function makeCool2() {
  event.toElement.style.color = "#FF0000";
  event.toElement.style.fontWeight = "bold";
}
// L. 399 ===================================================================================
function makeNormal2() {
  event.fromElement.style.color = "#0080FF";
  event.fromElement.style.fontWeight = "normal";
}
// L. 404 ===================================================================================
function turnRed() {
  what=window.event.srcElement;
  if (what.tagName == "IMG") {
      what.src=what.src.substring(0,(what.src.indexOf(".gif"))) + "-red.gif";
      window.event.cancelBubble = true;
  }
}
// L. 412 ===================================================================================
function turnWhite() {
  what=window.event.srcElement;
  if (what.tagName == "IMG") {
    what.src=what.src.substring(0,(what.src.indexOf("-red.gif"))) + ".gif";
    window.event.cancelBubble=true;
  }
}
// L. 420 ===================================================================================
// function clikker(a,b,c,d,e,f,g,h,i,j,k,l,m,n) {
//  if (a.style.display == '') {
//      a.style.display = 'none';
//      h.src='gold.gif';
//  }
//  else {
//      a.style.display='';
//      b.style.display='none';
//      c.style.display='none';
//      d.style.display='none';
//      e.style.display='none';
//      f.style.display='none';
//      g.style.display='none';
//      h.src='gsm.gif';
//      h.src='dollarsign.gif';
//      i.src='gold.gif';
//      j.src='gold.gif';
//      k.src='gold.gif';
//      l.src='gold.gif';
//      m.src='gold.gif';
//      n.src='gold.gif';
//  }
// }   
// L. xxx ===================================================================================
/*
 * $Log: ua.js,v $
 * Revision 1.7  2002/05/14 16:52:52  bc6ix
 * use CVS Log for revision history
 *
 *
 */
/* ***** BEGIN LICENSE BLOCK *****
 * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
 * Full Terms at /evangelism/lib/js/license/mpl-tri-license.txt
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Netscape code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Corporation.
 * Portions created by the Initial Developer are Copyright (C) 2001
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s): Bob Clary <bclary@netscape.com>
 *
 * ***** END LICENSE BLOCK ***** */