<!-- Hide the script from older browsers

// SUGGESTED NEW DETECTION SCHEME
//ns4=(document.layers)?1:0;  // the _only_ browser that uses LAYER
//ie4=((document.all)&&(!document.getElementById)?1:0);
//ie5up=((document.all)&&(document.getElementById)?1:0);
//dom=((document.getElementById)&&(!document.all)?1:0);

function alerts( daObj )
{                                                                                                                     // NN6
    //alert( "WM_changeVisibility: daObj                = \"" + daObj               + "\"" );                           // HTMLDivElement
    //alert( "WM_changeVisibility: parseInt(daObj.style.width = \"" + parseInt(daObj.style.width) + "\"" );
    //alert( "WM_changeVisibility: daObj.style.width    = \"" + daObj.style.width    + "\"" );
    //alert( "WM_changeVisibility: daObj.padding        = \"" + daObj.padding        + "\"" );
    //alert( "WM_changeVisibility: daObj.style.padding  = \"" + daObj.style.padding    + "\"" );
    //alert( "WM_changeVisibility: daObj.visibility     = \"" + daObj.visibility    + "\"" );                           // undefined
    //alert( "WM_changeVisibility: daObj.left           = \"" + daObj.left          + "\"" );                           // undefined
    //alert( "WM_changeVisibility: daObj.posLeft        = \"" + daObj.posLeft       + "\"" );                           // undefined
    //alert( "WM_changeVisibility: daObj.offsetLeft     = \"" + daObj.offsetLeft    + "\"" );                           // 8
    //alert( "WM_changeVisibility: daObj.style          = \"" + daObj.style         + "\"" );                           // CSSStyleDeclaration
    //alert( "WM_changeVisibility: daObj.style.left     = \"" + daObj.style.left    + "\"" );                           // ""
    //alert( "WM_changeVisibility: daObj.style.posLeft  = \"" + daObj.style.posLeft + "\"" );                           // undefined
    //alert( "WM_changeVisibility: daObj.style.offsetLeft  = \"" + daObj.style.offsetLeft + "\"" );                     // undefined
    //alert( "WM_changeVisibility: daObj.getAttribute() = \"" + daObj.getAttribute( "offsetLeft" ) + "\"" );            // ""
    //alert( "WM_changeVisibility: daObj.style.getAttribute() = \"" + daObj.style.getAttribute( "offsetLeft" ) + "\"" ); //
}


// variable to hold adjustment values for div's.  Netscape version gets a y-offset
// of -12.
var div_anchor_x = 0;
var div_anchor_y = 0;
if( document.layers && !document.GetElementById )
{
    div_anchor_y -= 12;
}
else if( is_ie6up && !is_mac )
{
		//div_anchor_x += 10;
		//div_anchor_y += 15;
}
else if( is_ie && is_mac )
{
		div_anchor_x -= 12;
}

function DebugGetAbsolutePositionX( obj )
{

		var last_left = -999;
		var last_top  = -999;
		var last_tag  = "smr_esc";
		var curleft   = 0;

    document.write( "<br>GetAbsolutePositionX:" );

		if( document.getElementById || document.all )
		{

      document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
			curleft += obj.offsetLeft;

			if( window.opera )
			{
				while( obj.tagName != 'HTML' )
				{
					obj = obj.parentNode;
					curleft += obj.offsetLeft;
				}
			}
			else if( document.all )
			{

				while( obj.tagName != 'HTML' )
				{

					if( obj.parentNode ) 
						obj = obj.parentNode;
					else if( obj.parentElement ) 
						obj = obj.parentElement;

					if( last_tag       != "TD"      || 
					    obj.tagName    != "TR"      ||
							obj.offsetLeft != last_left ||
							obj.offsetTop  != last_top   )
					{

						if( obj.tagName.indexOf( 'T' ) == 0 )
						{
							document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
							curleft += obj.offsetLeft;
						}
						else
							document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]&nbsp;&nbsp;&nbsp;&nbsp;IGNORED (no leading 'T') " );

						last_left = obj.offsetLeft;
						last_top  = obj.offsetTop;
						last_tag  = obj.tagName;

					}
					else
						document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]&nbsp;&nbsp;&nbsp;&nbsp;IGNORED (duplicate information)" );

				}
			}
		}
		else if( document.layers )
		{
      document.write( "<br>using layers" );
			curleft += obj.x;
		}

    document.write( "<br>GetAbsolutePositionX: curleft = " + curleft );

		return( curleft );

}

function DebugGetAbsolutePositionY( obj )
{

		var last_left = -999;
		var last_top  = -999;
		var last_tag  = "smr_esc";
		var curtop    = 0;

    document.write( "<br>GetAbsolutePositionY:" );

		if( document.getElementById || document.all )
		{

      document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
			curtop += obj.offsetTop;

			if( window.opera )
			{
				while( obj.tagName != 'HTML' )
				{
					obj = obj.parentNode;
					curtop += obj.offsetTop;
				}
			}
			else if( document.all )
			{

				while( obj.tagName != 'HTML' )
				{

					if( obj.parentNode ) 
						obj = obj.parentNode;
					else if( obj.parentElement ) 
					  obj = obj.parentElement;

					if( last_tag       != "TD"      || 
					    obj.tagName    != "TR"      ||
							obj.offsetLeft != last_left ||
							obj.offsetTop  != last_top   )
					{

						if( obj.tagName.indexOf( 'T' ) == 0 )
						{
							document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
							curtop += obj.offsetTop
						}
						else
							document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]&nbsp;&nbsp;&nbsp;&nbsp;IGNORED (no leading 'T') " );

						last_left = obj.offsetLeft;
						last_top  = obj.offsetTop;
						last_tag  = obj.tagName;

					}
					else
						document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]&nbsp;&nbsp;&nbsp;&nbsp;IGNORED (duplicate information)" );

				}
			}
		}
		else if( document.layers )
		{
      document.write( "<br>using layers" );
			curtop += obj.y;
	  }

    document.write( "<br>GetAbsolutePositionY: curtop = " + curtop );

		return( curtop );

}

function GetAbsolutePositionX( obj )
{

		var last_left = -999;
		var last_top  = -999;
		var last_tag  = "smr_esc";
		var curleft   = 0;

    //document.write( "<br>GetAbsolutePositionX:" );

		if( document.getElementById || document.all )
		{

      //document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
			curleft += obj.offsetLeft;

			if( window.opera )
			{
				while( obj.tagName != 'HTML' )
				{
					obj = obj.parentNode;
					curleft += obj.offsetLeft;
				}
			}
			else if( document.all )
			{

				while( obj.tagName != 'HTML' )
				{

					if( obj.parentNode ) 
						obj = obj.parentNode;
					else if( obj.parentElement ) 
						obj = obj.parentElement;

					if( last_tag       != "TD"      || 
					    obj.tagName    != "TR"      ||
							obj.offsetLeft != last_left ||
							obj.offsetTop  != last_top   )
					{
						if( obj.tagName.indexOf( 'T' ) == 0 )
						{
							//document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
							curleft += obj.offsetLeft;
						}
						//else
						//	document.write( "<br>unprocessed tagName[" + obj.tagName + "]" );
						last_left = obj.offsetLeft;
						last_top  = obj.offsetTop;
						last_tag  = obj.tagName;
					}
					//else
					//	document.write( "<br>unprocessed duplicate information tagName[" + obj.tagName + "]" );

				}
			}
		}
		else if( document.layers )
		{
      //document.write( "<br>using layers" );
			curleft += obj.x;
		}

    //document.write( "<br>GetAbsolutePositionX: curleft = " + curleft );

    //alert( curleft );

		return( curleft );

}

function GetAbsolutePositionY( obj )
{

		var last_left = -999;
		var last_top  = -999;
		var last_tag  = "smr_esc";
		var curtop    = 0;

    //document.write( "<br>GetAbsolutePositionY:" );

		if( document.getElementById || document.all )
		{

      //document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
			curtop += obj.offsetTop;

			if( window.opera )
			{
				while( obj.tagName != 'HTML' )
				{
					obj = obj.parentNode;
					curtop += obj.offsetTop;
				}
			}
			else if( document.all )
			{

				while( obj.tagName != 'HTML' )
				{

					if( obj.parentNode ) 
						obj = obj.parentNode;
					else if( obj.parentElement ) 
					  obj = obj.parentElement;

					if( last_tag       != "TD"      || 
					    obj.tagName    != "TR"      ||
							obj.offsetLeft != last_left ||
							obj.offsetTop  != last_top   )
					{

						if( obj.tagName.indexOf( 'T' ) == 0 )
						{
							//document.write( "<br>tagName[" + obj.tagName + "] obj.offset[" + obj.offsetLeft + "," + obj.offsetTop + "]" );
							curtop += obj.offsetTop
						}
						//else
						//	document.write( "<br>unprocessed tagName[" + obj.tagName + "]" );

						last_left = obj.offsetLeft;
						last_top  = obj.offsetTop;
						last_tag  = obj.tagName;

					}
					//else
					//	document.write( "<br>unprocessed duplicate information tagName[" + obj.tagName + "]" );

				}
			}
		}
		else if( document.layers )
		{
      //document.write( "<br>using layers" );
			curtop += obj.y;
	  }

    //document.write( "<br>GetAbsolutePositionY: curtop = " + curtop );

    //alert( curtop );

		return( curtop );

}

// return the absolute position of an image in the browser window
function OrgGetAbsolutePositionX( image )
{

    var x = 0;

    document.write( "<br>OrgGetAbsolutePositionX" );

    if( document.layers )
    {
      // Netscape we can just read the attributes directly
      document.write( "<br>using layers" );
      x = image.x;
    }
    else
    {
      // start with the image's coordinates and walk through it's ancestory of
      // elements (tables, div's, spans, etc...) until we're at the top.  Along
      // the way we add in each element's coordinates to get the final answer
      for( ; image; image = image.offsetParent )
      {
        document.write( "<br>tagName[" + image.tagName + "] image.offset[" + image.offsetLeft + "," + image.offsetTop + "]" );
        x += image.offsetLeft;
      } 
    }

    document.write( "<br>OrgGetAbsolutePositionX: x = " + x );

    return( x )

}

function OrgGetAbsolutePositionY( image )
{

    var y = 0;

    document.write( "<br>OrgGetAbsolutePositionY" );

    if( document.layers )
    {
        // Netscape we can just read the attributes directly
        document.write( "<br>using layers" );
        y = image.y;
    }
    else
    {
      // start with the image's coordinates and walk through it's ancestory of
      // elements (tables, div's, spans, etc...) until we're at the top.  Along
      // the way we add in each element's coordinates to get the final answer
      for( ; image; image = image.offsetParent )
      {
        document.write( "<br>tagName[" + image.tagName + "] image.offset[" + image.offsetLeft + "," + image.offsetTop + "]" );
        y += image.offsetTop;
      } 
    }

    document.write( "<br>OrgGetAbsolutePositionY: y = " + y );

    return( y )

}

// adjust the div anchor according to the position of the image
// in the browser window
function AdjustPositioningVariables( base_image )
{

    //document.write( "<br>AdjustPositioningVariables" );

    div_anchor_x += GetAbsolutePositionX( base_image );
    div_anchor_y += GetAbsolutePositionY( base_image );

    //document.write( "<br>div_anchor_x,div_anchor_y = [" + div_anchor_x + "," + div_anchor_y + "]" );

}

function InitializeDivAttributes()
{
  // Set the adjusted property for each element in documents with an 'all'
  // property and for each layer in documents with the 'layers' property.
//  if( document.getElementsByTagName )
//  {
//    var divs = document.getElementsByTagName('div');
//    document.write( "<BR/>getting elements by tag name length = " + divs.length );
//    for( i = 0; i < divs.length; i++ ) 
//    {
//      a = divs[i].getAttribute("adjusted");
//      if( !a )
//        document.write( "<BR/>BEFORE "  + i + " getAttribute(adjusted) = NULL" );
//      else
//        document.write( "<BR/>BEFORE "  + i + " getAttribute(adjusted) = (not null)\"" + a + "\"" );
//      divs[i].setAttribute( "adjusted", "false" );
//      a = divs[i].getAttribute("adjusted");
//      if( !a )
//        document.write( "<BR/>AFTER "  + i + " getAttribute(adjusted) = NULL" );
//      else
//        document.write( "<BR/>AFTER "  + i + " getAttribute(adjusted) = (not null)\"" + a + "\"" );
//    }
//  }
//  else if( document.all )
//  {
//    for(i = 0; i < document.all.length; i++ ) 
//    {
//      document.all[i].setAttribute( "adjusted", "false" );
//    }
//  }
//  else if( document.layers )

  if( !document.getElementById && document.layers )
  {
    Layer.prototype.adjusted = false;
  }
}

function WM_checkIn( id ) 
{

    /*
    WM_checkIn()
    Takes the ID of a positioned HTML element and returns an object reference.

    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Taylor
    Author Email: taylor@wired.com
    Author URL: http://www.taylor.org/

    Usage: WM_checkIn('id')
    */

		// This function checks for DOM strategy, then 
		// returns an object reference.
		if( document.getElementById )
		{
			return document.getElementById( id );
		}
		else if( document.all )
		{
			return document.all[id];
		} 
		else if( document.layers )
		{
			return document.layers[id];
		}

}


/*
WM_changeVisibility()
Changes whether a layer is visible or hidden.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

usage: WM_changeVisibility('targetLayer1',[visible|hidden|toggle],'targetLayer2',[visible|hidden|toggle],...,'targetLayerN',[visible|hidden|toggle])

*/

// set hidden/visible vars for Netscape 4 compatibility
var szHidden;
var szVisible;

if( document.getElementById )
{
		szHidden  = "hidden";
		szVisible = "visible";
}
else if( document.layers ) 
{
		szHidden  = "hide";
		szVisible = "show";
} 
else 
{
		szHidden  = "hidden";
		szVisible = "visible";
}

var toggle = "toggle";

var daLastObj     = null;
var padding_value = -1;

function GetAdjustedAttribute( obj )
{

		if( is_opera )
  		return( obj.adjusted );

		return( obj.getAttribute( "adjusted" ) );

}

function SetAdjustedAttribute( obj )
{

		if( is_opera )
		  obj.adjusted = true;

		obj.setAttribute( "adjusted", "true" );

}

function GetPaddingValue()
{

		// this will only work for the first div rule encountered and
		// only reads the first value returned.  NN6 returns all four 
		// values, but only the first value is processed.

		var oCSS = document.styleSheets;
		var oCSSrules;
		var sCSSitem;

		// iterate all style sheets
		for( var i = 0; i < oCSS.length && padding_value < 0; i++ ) 
		{

			// get the rules for IE or NS6
			oCSSrules = oCSS[i].rules || oCSS[i].cssRules;

			// iterate the rules in the stylesheet
			for( var j = 0; j < oCSSrules.length && padding_value < 0; j++ ) 
			{
				// get the item for IE or NS6
				sCSSitem = oCSSrules[j].selectorText || oCSSrules[j].cssText;

				// if the CSS item is "div", then output it's padding
				if( sCSSitem.toLowerCase().indexOf("div") != -1 ) 
				{
					padding_value = parseInt( oCSSrules[j].style.padding );
				}

			}

		}

}

function DetermineXTweak( bSwapImage )
{

		if( bSwapImage )
		{

			// fine tune image placement

			if( document.getElementById )
			{

				// older browsers
				if( !is_CSS_standards_compliant )
				{

					return( -3 );        //older netscape browsers and ie browsers not on a mac

				}

				else if( is_opera )
					return( -2 );       // opera browsers although only tested on V6

			}
			else if( document.all )
			{
				return( 12 );         // V4 ie browsers
			}

		}
		else
		{
			// fine tune text div placement
			if( is_ie && is_mac )
				return( 12 );
      else
        return( 1 );
		}

		return( 0 );

}

function DetermineYTweak( bSwapImage )
{

		if( !bSwapImage )
		{

			return( 0 );

		}

		return( 0 );

}

function AdjustObjectWidth( obj )
{

		if( !is_CSS_standards_compliant )
			return;   // if it can't be done, don't bother trying
			
		if( !is_opera )
		{

			if( padding_value < 0 )
				GetPaddingValue();

			// adjust width for padding (assumed 12px) and border (ie = 9; nn = 7)
			obj.style.width = ( parseInt(obj.style.width) - (2 * padding_value) - (is_ie ? 9 : 7) ) + "px";

		}
		else
		{
			// Opera doesn't reflow the text after changing the width
			// even if you don't make it visible until after the 
			// width change!!!
			//obj.style.width = ( parseInt(obj.style.width) - (2 * 12) - 7 );
		}

}

function HideObject( obj )
{

		//alert( "HideObject" );
    if( document.getElementById || document.all )
      obj.style.visibility = szHidden;
    else
      obj.visibility = szHidden;

}

function ShowObject( obj, bSwapImage )
{

    // show the object
    if( obj && ( document.getElementById || document.all ) )
    {
      //alert( "ShowObject: bSwapImage[" + (bSwapImage ? "true" : "false") + "]" );
      obj.style.visibility = szVisible;
      var a = GetAdjustedAttribute( obj );
      if( !a || a == "false" )
      {
        //alert( "ShowObject: adjusting object position" );
		var XTweak = DetermineXTweak( bSwapImage );
		var YTweak = DetermineYTweak( bSwapImage );
        if( document.getElementById )
        {
          //alert( "old position left,top[" + obj.style.left + "] [" + obj.style.top + "]" );
          obj.style.left = ( obj.offsetLeft + div_anchor_x + XTweak ) + "px";
          obj.style.top  = ( obj.offsetTop  + div_anchor_y + YTweak ) + "px";
		  //if( !bSwapImage )
		  //  AdjustObjectWidth( obj );
          //alert( obj.id + ": new position left,top[" + obj.style.left + "] [" + obj.style.top + "]" );
        }
        else
        {
          //alert( "old position posLeft,posTop[" + obj.style.posLeft + "] [" + obj.style.posTop + "]" );
          obj.style.posLeft += div_anchor_x + XTweak;
          obj.style.posTop  += div_anchor_y + YTweak;
		  //if( !bSwapImage )
		  //  AdjustObjectWidth( obj );
          //alert( "new position posLeft,posTop[" + obj.style.posLeft + "] [" + obj.style.posTop + "]" );
        }
		SetAdjustedAttribute( obj );
      }
    }
    else if( document.layers )
    {
      obj.visibility = szVisible;
      if( !obj.adjusted )
      {
        obj.left += div_anchor_x + ( bSwapImage ? -9 : 0 ); 
        obj.top  += div_anchor_y + ( bSwapImage ?  6 : 0 );
        obj.adjusted = true;
      }
    }

}

function ToggleObjectVisibility( obj, bSwapImage )
{
    if( document.getElementById || document.all )
    {
      if( obj.style.visibility == szVisible )
        HideObject( obj );
      else
        ShowObject( obj, bSwapImage );
    }
    else
    {
      if( obj.visibility == szVisible ) 
        HideObject( obj );
      else
        ShowObject( obj, bSwapImage );
    }
}


function WM_changeVisibility() 
{

		//alert( "WM_changeVisibility" );

    if( document.getElementById || document.layers || document.all ) 
    {

				var inc, endInc = arguments.length;

        if( daLastObj )
          HideObject( daLastObj );
     
        // run through the args (objects) and set the visibility of each
        for( inc = 0; inc < endInc; inc += 2 ) 
        {
          //alert( "WM_changeVisibility: [" + arguments[ inc ] + "] [" + arguments[ inc+1 ] + "]" );
          // get a good object reference
          var daObj = WM_checkIn( arguments[ inc ] );

          daLastObj = daObj;

          if( arguments[ inc+1 ] == szHidden ) 
          {
            HideObject( daObj );
          } 
          else if( arguments[inc+1] == szVisible ) 
          {
            ShowObject( daObj, false );
          } 
          else if( arguments[inc+1] == toggle ) 
          {
            ToggleObjectVisibility( daObj, false );
          }

        }
    }
}

function WM_swapScreen() 
{

	  if( document.getElementById || document.layers || document.all ) 
    {

		  var inc, endInc = arguments.length;

			if( daLastObj )
			{
				for( inc = 0; inc < endInc; inc += 2 )
					if( arguments[ inc+1 ] == 'leave_last' )
						break;
				if( inc < endInc )
					HideObject( daLastObj );
	    }
     
			// run through the args (objects) and set the visibility of each
			for( inc = 0; inc < endInc; inc += 2 ) 
      {
				// get a good object reference
				var daObj = WM_checkIn( arguments[ inc ] );

	      if( arguments[ inc+1 ] == szHidden ) 
        {
		      HideObject( daObj );
			  } 
        else if( arguments[inc+1] == szVisible ) 
        {
				  ShowObject( daObj, true );
				} 
        else if( arguments[inc+1] == toggle ) 
        {
					ToggleObjectVisibility( daObj, true );
				}
			}
		}
}

//alert( "agent: " + navigator.userAgent.toLowerCase() );
//alert( "major version: " + parseInt(navigator.appVersion) );
//alert( "minor version: " + parseFloat(navigator.appVersion) );

// Stop hiding from older browsers -->
