
/* Global Ecolab.com Client-Side Scripts
   Copyright (c) 2002 Ecolab Inc.  All Rights Reserved Worldwide. */

var noCookieTrail = false;

var trailLink = new Array();
var trailText = new Array();

/* =================================================================
   Browser Sniffing
   ================================================================= */

var ns4=document.layers?1:0;
var ie4=document.all?1:0;
var ns6=document.getElementById&&!document.all?1:0;

/* =================================================================
   buildFolderTrail
   ================================================================= */

function buildFolderTrail()
{

  /* Abort immediately if the cookie trail has been disabled. */

  if(noCookieTrail)
    return("&nbsp;");

  /* Build the HTML code for the folder separator.  The separator
     is defined in a FONT page (instead of a SPAN tag) to avoid
     problems with Netscape. */

  var build = "<a class='TitleNavTrail' href='http://www.ecolab.com/'>Home</a>";
  var sep = "&nbsp;<font class='Faded'>&#183;</font>&nbsp;";
  
  if(!trailText[0])
    {

    /* The location.pathname property returns the path of the current
       file.  Take the path and parse it into an array using the
       slash as a separator. */

    var folders = location.pathname.split("/");
    var anchor = "/"

    /*

    for(i=0; i<folders.length; i++)
      if (folders[i].length > 0)
        if (folders[i].indexOf(".")== -1 )
          {
          anchor += folders[i] + "/";
          build += sep + buildLink(anchor, folders[i]);
          }
    */

    for(i=1; i<folders.length-1; i++)
      {
      anchor += folders[i] + "/";
      build += sep + buildLink(anchor, folders[i]);
      }
    
    if(folders[folders.length-1].length > 0)
      build = build + sep + document.title;

    }

  else
    {

    for(i=0; i<trailText.length; i++)
      build += sep + buildLink(trailLink[i], trailText[i]);
    }

  return(build);

}


/* =================================================================
   buildLink
   -----------------------------------------------------------------
   Returns the HTML code for an anchor (<A>) tag.
   ================================================================= */

function buildLink(url,caption)
{
  return("<a href='" + url + "'>" + caption + "</a>");
}


function getObj(name)
{
	if (document.getElementById)
	{
		return document.getElementById(name).style;
	}
	else if (document.all)
	{
		return document.all[name].style;
	}
	else if (document.layers)
	{
		return document.layers[name];
	}
}


/* =================================================================
   newWindow - NOT CURRENTLY BEING USED 04/10/02
   -----------------------------------------------------------------
   Allows a new browser window to popup. Used initially in 'Investor/
   default.asp' to open a window while simultaniously linking to a
   new page (using the onClick event handler).  Note: specifications
   are set for this function - do not change without maintaining these
   specs in the 'Investor/default.asp' page in some other way.
   ================================================================= */

function newWindow() {
	winDisplay='location=no,directories=no,menubar=yes,scrolling=yes,resize=yes';

   if (navigator.appName.indexOf("Microsoft")>=0) 
      winDisplay=',left=500,top=300,width=665,height=600';
   else {
      winDisplay=',screenX=500,screenY=300,width=665,height=600';
    }

   newWindow=window.open("Pro_Forma_Notes.pdf","",winDisplay);    
   newWindow.focus();
}


/* =================================================================
   parseURLFileName
   -----------------------------------------------------------------
   Extracts the file name from a URL.  For example, the function
   will return "index.html" if the URL "http://hostname/index.html"
   is specified.  Note that forward slashes (/) are assumed; the
   function will not work with DOS-style path slashes.
   ================================================================= */

function parseURLFileName(url)
{
  var slash = url.lastIndexOf("/", url.length-1);
  return(url.substring(slash + 1, url.length));
}


/* =================================================================
   parseURLPath
   ================================================================= */

function parseURLPath(url)
{
  var slash = url.lastIndexOf("/", url.length-1);
  return url.substring(0, slash+1);
}


/* =================================================================
   toggleDisplay
   -----------------------------------------------------------------
   This function toggles the display of the specified HTML element.
   You may need to set an inline style of "display:none" if you want
   the element to not appear when first viewing the page.
   ================================================================= */

function toggleDisplay(item)
{

  var z = getObj(item);

  if(ie4||ns6)
    {
    if (z.display=="none")
      z.display=""
    else
      z.display="none";
    }

  if(ns4)
    {
    z.visibility="show";
    }

  /*
  if(item.style.display=="none")
    {
    item.style.display=""
    }
  else
    {
    item.style.display="none"
    }
  */

}


