<!--

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);
	return(0);
  }
  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 = ua.indexOf('rv:');
    var rvEnd   = ua.indexOf(')', rvStart);
    var rv      = ua.substring(rvStart+3, rvEnd);
    var rvParts = rv.split('.');
    var rvValue = 0;
    var exp     = 1;

    for (var i = 0; i < rvParts.length; i++)
    {
      var val = parseInt(rvParts[i]);
      rvValue += val / exp;
      exp *= 100;
    }
    navigator.version = rvValue;

    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;
}

	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {
	if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
	}}

	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) 	location.reload();
	}
	MM_reloadPage(true);
	
	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 MM_findObj(n, d) { //v4.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);
	if(!x && document.getElementById) x=document.getElementById(n); 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_showHideLayers() {
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) 
	if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	obj.visibility=v;
	}
	
	}

 	function positionLayers() {
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) 

	if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
      	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }

	obj.visibility=v; }
  	}

	function newPopup(theURL,winName,features) {
		window.open(theURL,winName,features);
	}
	

// Anchor Code by Matt Kruse <www.mattkruse.com>

	function getAnchorPosition(anchorname) {

	var useWindow = false;
	var coordinates = new Object();
	var x=0;
	var y=0;
	// Browser capability sniffing
	var use_gebi = false;
	var use_css = false;
	var use_layers = false;
	if (document.getElementById) { use_gebi = true; }
	if (document.all) { use_css = true; }
	if (document.layers) { use_layers = true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name == anchorname) {
				found=1;
				break;
				}
			}
		if (found == 0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x = document.anchors[i].x;
		y = document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x = x;
	coordinates.y = y;
	return coordinates;
	}


	function AnchorPosition_getPageOffsetLeft (el) {
	var ol = el.offsetLeft;
	while ((el = el.offsetParent) != null) { 
		ol += el.offsetLeft; 
		}
	return ol;
	}

	function AnchorPosition_getWindowOffsetLeft (el) {
	var scrollamount = document.body.scrollLeft;
	return AnchorPosition_getPageOffsetLeft(el)-scrollamount;
	}	

	function AnchorPosition_getPageOffsetTop (el) {
	var ot = el.offsetTop;
	while((el = el.offsetParent) != null) { 
		ot += el.offsetTop; 
		}
	return ot;
	}

	function AnchorPosition_getWindowOffsetTop (el) {
	var scrollamount = document.body.scrollTop;
	return AnchorPosition_getPageOffsetTop(el)-scrollamount;
	}

	function MS_getX(aname) {
	position = getAnchorPosition(aname);
  	if(document.layers) {
  	return('left: ' + ( position.x - 146) + 'px;');
	} else {
  	return('right: 0px;');
    }
}


	function MS_getY(aname) {
  	position = getAnchorPosition(aname)
  	return('top : ' + position.y + 'px;');
	}

	function MS_printDiv(aname, divname) {
	document.write('<div id="' + divname + '" name="' + divname + '" style="position: 	absolute; ' + MS_getY(aname) + ' ' + MS_getX(aname)+ ' visibility: hidden;">');
	}

		var currentMenu = null;
		function hideCurrentMenu() {
			if (currentMenu == null) {
				return;
			}	
			MM_showHideLayers(currentMenu,'','hide');
		}
		
		function showMenu(menu_ID,imagename) {
			pos = getAnchorPosition(menu_ID + "ref");
			xplus=xbDetectBrowser();
			xplus=xplus+114;
			if (document.layers) {
			document.layers[menu_ID].left = pos.x;
			document.layers[menu_ID].top = document.layers[menu_ID].top+xplus;
			}  
			else if(document.all) {
				eval (menu_ID + ".style.left = " + pos.x);
				if(xplus>0){
				eval (menu_ID + ".style.top = " + xplus);
				}
			}
			else if(document.getElementById)
				{
			document.getElementById(menu_ID).Left = pos.x;
			document.getElementById(menu_ID).Top = document.getElementById(menu_ID).Top+xplus;
				}
			if ((currentMenu != null) && (currentMenu !=  menu_ID)) {
				hideCurrentMenu();
			}
			currentMenu = menu_ID;
			MM_showHideLayers(currentMenu,'','show');
			change_image(imagename);
		}
		
		if (document.layers) {
			document.captureEvents(Event.MOUSEDOWN);
			document.onmousedown = hideCurrentMenu;
		}

	function change_image(imagename) {
	if(imagename=='img1a'){
	document.img1a.style.width='0px'; 
	document.img1a.style.height='0px'; 
	document.img1b.style.width='72px'; 
	document.img1b.style.height='26px'; 
	document.img2a.style.width='123px';  
	document.img2a.style.height='26px';  
	document.img2b.style.width='0px';  
	document.img2b.style.height='0px'; 
	document.img3a.style.width='140px';  
	document.img3a.style.height='26px';  
	document.img3b.style.width='0px';  
	document.img3b.style.height='0px'; 
	document.img4a.style.width='145px'; 
	document.img4a.style.height='26px';  
	document.img4b.style.width='0px';  
	document.img4b.style.height='0px'; 
	document.img5a.style.width='55px';  
	document.img5a.style.height='26px';  
	document.img5b.style.width='0px';  
	document.img5b.style.height='0px';
	}
	if (imagename=='img2a')
	{
	document.img1a.style.width='72px';
	document.img1a.style.height='26px'; 
	document.img1b.style.width='0px';
	document.img1b.style.height='0px';
	document.img2a.style.width='0px'; 
	document.img2a.style.height='0px'; 
	document.img2b.style.width='123px';
	document.img2b.style.height='26px';
	document.img3a.style.width='140px';
	document.img3a.style.height='26px';
	document.img3b.style.width='0px';
	document.img3b.style.height='0px';
	document.img4a.style.width='145px';
	document.img4a.style.height='26px';
	document.img4b.style.width='0px';
	document.img4b.style.height='0px';
	document.img5a.style.width='55px';
	document.img5a.style.height='26px';
	document.img5b.style.width='0px';
	document.img5b.style.height='0px';
	}
	if (imagename=='img3a')
	{
	 document.img1a.style.width='72px';
	 document.img1a.style.height='26px';
	 document.img1b.style.width='0px';
	 document.img1b.style.height='0px';
	 document.img2a.style.width='123px';
	 document.img2a.style.height='26px';
	 document.img2b.style.width='0px';
	 document.img2b.style.height='0px';
	 document.img3a.style.width='0px'; 
	 document.img3a.style.height='0px'; 
	 document.img3b.style.width='140px';
	 document.img3b.style.height='26px';
	 document.img4a.style.width='145px';
	 document.img4a.style.height='26px';
	 document.img4b.style.width='0px';
	 document.img4b.style.height='0px';
	 document.img5a.style.width='55px';
	 document.img5a.style.height='26px';
	 document.img5b.style.width='0px';
	 document.img5b.style.height='0px';
	}
	if (imagename=='img4a')
	{
	document.img1a.style.width='72px';
	document.img1a.style.height='26px';
	document.img1b.style.width='0px';
	document.img1b.style.height='0px';
	document.img2a.style.width='123px';
	document.img2a.style.height='26px';
	document.img2b.style.width='0px';
	document.img2b.style.height='0px';
	document.img3a.style.width='140px';
	document.img3a.style.height='26px';
	document.img3b.style.width='0px';
	document.img3b.style.height='0px';
	document.img4a.style.width='0px'; 
	document.img4a.style.height='0px'; 
	document.img4b.style.width='145px';
	document.img4b.style.height='26px';
	document.img5a.style.width='55px';
	document.img5a.style.height='26px';
	document.img5b.style.width='0px';
	document.img5b.style.height='0px';
	}
	if (imagename=='img5a')
	{
	 document.img1a.style.width='72px';  
	 document.img1a.style.height='26px';  
	 document.img1b.style.width='0px';  
	 document.img1b.style.height='0px'; 
	 document.img2a.style.width='123px';  
	 document.img2a.style.height='26px';  
	 document.img2b.style.width='0px';  
	 document.img2b.style.height='0px'; 
	 document.img3a.style.width='140px';  
	 document.img3a.style.height='26px';  
	 document.img3b.style.width='0px';  
	 document.img3b.style.height='0px'; 
	 document.img4a.style.width='145px';  
	 document.img4a.style.height='26px';  
	 document.img4b.style.width='0px';  
	 document.img4b.style.height='0px'; 
	 document.img5a.style.width='0px'; 
	 document.img5a.style.height='0px'; 
	 document.img5b.style.width='55px';  
	 document.img5b.style.height='26px';
	}
}

// -->
