
//-----------------------------------------------------------------
//  Browser Detection Code    (old KM code, updated for  'getElementById')
//-----------------------------------------------------------------
    var intBrowser = 0;
    if( document.all )
    {
      intBrowser = 1;
	    layerRef="document.all";
	    styleSwitch=".style";
    }
    else if( document.layers ) 
    {
      intBrowser = 2;
      layerRef="document.layers";
      styleSwitch="";
    }
    else if( document.getElementById )
    {
      intBrowser = 3;    
      layerRef="document.getElementById";
      styleSwitch=".style";    
    } 

    function showLayer(layerName) {
 	    if( intBrowser == 3 )
 	      eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="visible"');
      else
 	      eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');         	      
    }
      	
    function hideLayer(layerName) {
	    if( intBrowser == 3 ) 
	      eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="hidden"');
	    else
	      eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
    } 
// --------------------------------------------------
    
    
function openWindow(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=no,scrollbars=no,status=no,";
    options += "menubar=no,toolbar=no,left=0,top=0,directories=no";
    var newWin = window.open(url, 'newWin', options);
    newWin.focus();
  }

function openWindowScroll(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=no,scrollbars=yes,status=no,";
    options += "menubar=no,toolbar=no,left=0,top=0,directories=no";
    var newWin = window.open(url, 'newWin', options);
    newWin.focus();
  }
  

//------------------------------------------------------------------------------
  
var bites = document.cookie.split("; ");      // used for cookie functions

function getCookie(name) 
{
  for (i=0; i < bites.length; i++) 
  {
    nextbite = bites[i].split("="); // break into name and value
    if (nextbite[0] == name) // if name matches
      return unescape(nextbite[1]); // return value
  }
  return null; // if no match return null
}

function setCookie(name, value)  // use: setCookie("name", value);
{ 
  if (value != null && value != "")
    document.cookie=name + "=" + escape(value) + "; path=/; ";
  bites = document.cookie.split("; "); // update cookie bites
}
//------------------------------------------------------------------------------
  




// This popup function is used for the Nutritional Facts
//
function popUp(URL, hgt) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=350,height=" + hgt + "');");
}
