if (document.images) {
      whatisameals = new Image();
      whatisameals.src = "/images/nav_what_is_off.jpg";
      whatisamealsover = new Image();
      whatisamealsover.src = "/images/nav_what_is_over.jpg";

      isitforyou = new Image();
      isitforyou.src = "/images/nav_for_you_off.jpg";
      isitforyouover = new Image();
      isitforyouover.src = "/images/nav_for_you_over.jpg";

	  yourbloodpressure = new Image();
      yourbloodpressure.src = "/images/nav_blood_press_off.jpg";
      yourbloodpressureover = new Image();
      yourbloodpressureover.src = "/images/nav_blood_press_over.jpg";
	  
	  successstories = new Image();
      successstories.src = "/images/nav_stories_off.jpg";
      successstoriesover = new Image();
      successstoriesover.src = "/images/nav_stories_over.jpg";
	  
	  news = new Image();
      news.src = "/images/nav_news_events_off.jpg";
      newsover = new Image();
      newsover.src = "/images/nav_news_events_over.jpg";
	  
	  rewards = new Image();
      rewards.src = "/images/nav_rewards_off.jpg";
      rewardsover = new Image();
      rewardsover.src = "/images/nav_rewards_over.jpg";

	  home = new Image();
      home.src = "/images/nav_home_off.jpg";
      homeover = new Image();
      homeover.src = "/images/nav_home_over.jpg";

      about = new Image();
      about.src = "/images/subnav/what_is/sub_about_off.jpg";
      aboutover = new Image();
      aboutover.src = "/images/subnav/what_is/sub_about_over.jpg";

      ads = new Image();
      ads.src = "/images/subnav/what_is/sub_current_ads_off.jpg";
      adsover = new Image();
      adsover.src = "/images/subnav/what_is/sub_current_ads_over.jpg";

      downloads = new Image();
      downloads.src = "/images/subnav/what_is/sub_ameals_dwnload_off.jpg";
      downloadsover = new Image();
      downloadsover.src = "/images/subnav/what_is/sub_ameals_dwnload_over.jpg";

      faqs = new Image();
      faqs.src = "/images/subnav/what_is/sub_faq_off.jpg";
      faqsover = new Image();
      faqsover.src = "images/subnav/what_is/sub_faq_over.jpg";

      healthcare = new Image();
      healthcare.src = "/images/subnav/what_is/sub_healthcare_pro_off.jpg";
      healthcareover = new Image();
      healthcareover.src = "/images/subnav/what_is/sub_healthcare_pro_over.jpg";

      talk = new Image();
      talk.src = "/images/subnav/what_is/sub_talk_to_off.jpg";
      talkover = new Image();
      talkover.src = "/images/subnav/what_is/sub_talk_to_over.jpg";

      medication = new Image();
      medication.src = "/images/subnav/for_you/sub_on_bp_med_off.jpg";
      medicationover = new Image();
      medicationover.src = "/images/subnav/for_you/sub_on_bp_med_over.jpg";

      watching = new Image();
      watching.src = "/images/subnav/for_you/sub_watching_bp_off.jpg";
      watchingover = new Image();
      watchingover.src = "/images/subnav/for_you/sub_watching_bp_over.jpg";

      diabetic = new Image();
      diabetic.src = "/images/subnav/for_you/sub_are_you_diabetic_off.jpg";
      diabeticover = new Image();
      diabeticover.src = "/images/subnav/for_you/sub_are_you_diabetic_over.jpg";

      test = new Image();
      test.src = "/images/subnav/your_bp/sub_test_bp_off.jpg";
      testover = new Image();
      testover.src = "/images/subnav/your_bp/sub_test_bp_over.jpg";

      eat = new Image();
      eat.src = "/images/subnav/your_bp/sub_eat_smart_off.jpg";
      eatover = new Image();
      eatover.src = "/images/subnav/your_bp/sub_eat_smart_over.jpg";

      share = new Image();
      share.src = "/images/subnav/success_stories/sub_share_story_off.jpg";
      shareover = new Image();
      shareover.src = "/images/subnav/success_stories/sub_share_story_over.jpg";

      calendar = new Image();
      calendar.src = "/images/subnav/news_events/sub_calendar_off.jpg";
      calendarover = new Image();
      calendarover.src = "/images/subnav/news_events/sub_calendar_over.jpg";

      newsstories = new Image();
      newsstories.src = "/images/subnav/news_events/sub_news_stories_off.jpg";
      newsstoriesover = new Image();
      newsstoriesover.src = "/images/subnav/news_events/sub_news_stories_over.jpg";

      press = new Image();
      press.src = "/images/subnav/news_events/sub_press_releases_off.jpg";
      pressover = new Image();
      pressover.src = "/images/subnav/news_events/sub_press_releases_over.jpg";

}

function over(name){
	if (document.images) {
		document[name].src = eval(name + "over.src");
	}
}

function off(name){
	if (document.images) {
		document[name].src = eval(name + ".src");
	}
}



































//---------------------------------------------------------------------------------
//
// Function: 	popup
//
// Description: This function popups a new window with a specified width
//              and height and brings the focus to the popup window
//
// Parameters:  pagename -  the name of the page to be opened in the popup
//							window
//
//				width - the width of the window to be opened
//
//				height - the height of the window to be opened
//
//				scroll - 'yes' if the window should have scrollbars, 'no' if not
//
//				resizeable - 'yes' if the window should be resizeable, 'no' if not
//
// Programmer:  Happy Tsugawa-Banta
//
// Date: 		2/7/01
//
// Updates:     2/7/01 - added these comments (HT)
//
//--------------------------------------------------------------------------------


function popup(pagename,winname,width,height,scroll,resizable) {
	var popup = window.open(pagename,winname,"toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=" + scroll + ",resizable=" + resizable + ",width=" + width + ",height=" + height + ",left=0,top=0");

    popup.focus();

}

function prodPopup(pagename) {
	var prodPopup = window.open(pagename,"productPopup","toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=355,height=393,left=0,top=0");

    prodPopup.focus();

}

function expertPopup(pagename) {
	var expertPopup = window.open(pagename,"expertPopup","toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=450,left=420,top=200");

    expertPopup.focus();

}
//---------------------------------------------------------------------------------
//
// Function: 	popupPrint
//
// Description: This function popups a new window with a specified width
//              and height and brings the focus to the popup window and keeps the menu bar
//
// Parameters:  pagename -  the name of the page to be opened in the popup
//							window
//
//				width - the width of the window to be opened
//
//				height - the height of the window to be opened
//
// Programmer:  Happy Tsugawa-Banta
//
// Date: 		9/6/01
//
//
//--------------------------------------------------------------------------------


function popupPrint(pagename,width,height) {
	var popupPrint = window.open(pagename,"popup_print","toolbar=yes,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",left=0,top=0");

    popupPrint.focus();

}


//---------------------------------------------------------------------------------
//
// Function:    checkRadio
//
// Description: This validates that at least one Radio button in a group
//              has been selected. If there is a single radio button in the
//              group, and it hasn't been selected, the function selects it.
//
// Parameters:  name - the name of the radio button group
//              message - message to display if no button has been selected
//
// Programmer:  Happy Tsugawa-Banta
//
// Date:        2/9/01
//
// Updates:     6/8/01 - added behavior for single radio button SjG
//
//--------------------------------------------------------------------------------

function checkRadio(name,message){
	var radioChecked = 0;
	for (var j=0; j < name.length; j++){
		if (name[j].checked){
			radioChecked=1;
			return true;
		}
	}
    if (!name.length)
        {
        name.checked=1;
        radioChecked=1;
        }
	if (radioChecked == 1){
		form.submit();
        return true;
	} else {
		alert(message);
		return false;
	}
}

//--------------------------------------------------------------------------
//
// Function:    populateRadio
//
// Description: Iterates through the radio buttons in a group and selects
//              one matching a particular value
//
// Parameters:  buttons - the element representing the buttons
//              value - the value to select
//
// Programmer:  Karl Zilles
//
// Date:        5/16/01
//
// Updates:
//
//--------------------------------------------------------------------------

function populateRadio(buttons, value) {
	for (i=0; i<buttons.length; i++)
		if (buttons[i].value==value)
			buttons[i].checked = true;
}

//--------------------------------------------------------------------------
//
// Function:    countChecked
//
// Description: Iterates through the checkboxes in a group and counts how
//              many have been checked.
//
// Parameters:  element - name of the checkboxes
//
// Programmer:  SjG
//
// Date:        06/07/01
//
// Updates:
//
//--------------------------------------------------------------------------

function countChecked(element)
    {
    count=0;
    for(i=0; i<element.length; i++)
        {
        if (element[i].checked)
            {
            count++;
            }
        }
    return count;
}

//--------------------------------------------------------------------------
//
// Function:    checkAll
//
// Description: Iterates through the check boxes in a group and
//              checks or unchecks them
//
// Parameters:  element - name of the checkboxes
//              val - true for checked, false for unchecked
//
// Programmer:  SjG
//
// Date:        06/07/01
//
// Updates:
//
//--------------------------------------------------------------------------

function checkAll(element, val)
    {
    len = element.length;
    var i=0;
    for( i=0 ; i<len ; i++)
        {
        element[i].checked=val;
        }
    }

//--------------------------------------------------------------------------
//
// Function:    toggleSet
//
// Description: Toggles the state of a single checkbox that controls
//              the state of many checkboxes (i.e., "check here to select
//              all" situations)
//
// Parameters:  primary - name of the controller checkbox
//              children - name of the dependent checkboxes
//
// Programmer:  SjG
//
// Date:        06/07/01
//
// Updates:
//
//--------------------------------------------------------------------------

function toggleSet(primary, children)
    {
    if (primary.checked)
        {
        checkAll(children,true);
        }
    else
        {
        checkAll(children,false);
        }
    }
//--------------------------------------------------------------------------
//
// Function:    populateSelect
//
// Description: Iterates through the select options in a dropdown and selects
//              one matching a particular value
//
// Parameters:  select - the element representing the select
//              value - the value to select
//
// Programmer:  Karl Zilles
//
// Date:        5/16/01
//
// Updates:
//
//--------------------------------------------------------------------------
function populateSelect(select, value) {
	for (i=0; i<select.length; i++)
		if (select.options[i].value==value)
			select.selectedIndex = i;
}



//---------------------------------------------------------------------------------
//
// Function: 	checkDateRange
//
// Description: This function checks to see if any of the start date or end date
//              fields have been selected.  If so, it makes sure all of the fields
//              are selected and makes sure that the start date is earlier than the 
//              end date.
//
// Parameters:  form - the name of the form
//
// Returns:     true if all everything is selected correctly, otherwise false
//
// Programmer:  Happy Tsugawa-Banta
// 
// Date: 		6/06/01
//
//--------------------------------------------------------------------------------

function checkDateRange()
{
	var startmonthvalue = eval(document.form.startmonth.options[document.form.startmonth.selectedIndex].value);
	var startdayvalue = eval(document.form.startday.options[document.form.startday.selectedIndex].value);
	var startyearvalue = eval(document.form.startyear.options[document.form.startyear.selectedIndex].value);
	var endmonthvalue = eval(document.form.endmonth.options[document.form.endmonth.selectedIndex].value);
	var enddayvalue = eval(document.form.endday.options[document.form.endday.selectedIndex].value);
	var endyearvalue = eval(document.form.endyear.options[document.form.endyear.selectedIndex].value);
		

		if ( (startyearvalue > endyearvalue) || ( (startyearvalue == endyearvalue) && (startmonthvalue > endmonthvalue) ) ||  ( (startyearvalue == endyearvalue) && (startmonthvalue == endmonthvalue) && (startdayvalue >= enddayvalue) ) ) {
			alert("Please make sure the starting date is before the ending date.");
			return false;
		} else {
			return validate(document.form,fields);
		}
}


//---------------------------------------------------------------------------------
//
// Function: 	deleteCheckUser
//
// Description: This function checks to make sure this is not the only user.  Then
//              it pops up a confirm box to warn that the user is about to delete a user.
//
// Returns:     true if this is not the only user and they choose to go on
//              with the delete, otherwise false
//
// Programmer:  Happy Tsugawa-Banta
// 
// Date: 		6/13/01
//
// Updates:     
//
//--------------------------------------------------------------------------------

function deleteCheckUser()
{
	if (document.form.userid.length == 1)
    { 
        alert("There is only one current user - therefore you cannot delete this user");
        return false;
    }
	
	if (confirm("Are you sure you want to delete this user?"))
	{
		return validate(this.form,fields);
	} else {
		return false;
	}
}



//---------------------------------------------------------------------------------
//
// Function: 	compare
//
// Description: This function checks which item the user selected in the pulldown and
//              goes to the page by using the option value
//
// Programmer:  Happy Tsugawa-Banta
// 
// Date: 		1/31/01
//
// Updates:     
//
//--------------------------------------------------------------------------------

function compare(what) {
   var n = what.selectedIndex;
   filename = what.form.model.options[n].value;
   window.location=filename;
}

























/*write layer styles by browser*/

ns = (document.layers)? true:false
ie = (document.all)? true:false
/*
if (ie) {	
	document.write('<LINK REL="stylesheet" HREF="/css/style_ie.css" TYPE="text/css">');
}
*/
