//'*******************************************************************************
//'Function:      GetNewPage
//'Parameters:
//'Return:
//'Description:   automatically loads page from a dropdown SELECT list
//'*******************************************************************************

function getNewPage(form) {
	var f = form.urlList;
	var selectedUrl = f.options[f.selectedIndex].value;
	return location.href = selectedUrl;
}
//'*******************************************************************************
//'Function:      PreloadImages
//'Parameters:
//'Return:
//'Description:   preload images that are used for mouseovers
//'*******************************************************************************

function PreloadImages()
{
   if (document.images)
   {

     subHome_off = new Image();
	 subHome_off.src = "/images/subHome_off.gif";
	 subHome_on = new Image();
	 subHome_on.src = "/images/subHome_on.gif";
	 subHome_active = new Image();
	 subHome_active.src = "/images/subHome_on.gif"; 

	 subAboutACE_off = new Image();
	 subAboutACE_off.src = "/images/subAboutACE_off.gif";
	 subAboutACE_on = new Image();
	 subAboutACE_on.src = "/images/subAboutACE_on.gif";
	 subAboutACE_active = new Image();
	 subAboutACE_active.src = "/images/subAboutACE_on.gif"; 
	 
	 subMembership_off = new Image();
	 subMembership_off.src = "/images/subMembership_off.gif";
	 subMembership_on = new Image();
	 subMembership_on.src = "/images/subMembership_on.gif";
	 subMembership_active = new Image();
	 subMembership_active.src = "/images/subMembership_on.gif"; 

	 subEventsLearning_off = new Image();
	 subEventsLearning_off.src = "/images/subEventsLearning_off.gif";
	 subEventsLearning_on = new Image();
	 subEventsLearning_on.src = "/images/subEventsLearning_on.gif";
	 subEventsLearning_active = new Image();
	 subEventsLearning_active.src = "/images/subEventsLearning_on.gif"; 

	 subNews_off = new Image();
	 subNews_off.src = "/images/subNews_off.gif";
	 subNews_on = new Image();
	 subNews_on.src = "/images/subNews_on.gif";
	 subNews_active = new Image();
	 subNews_active.src = "/images/subNews_on.gif"; 

	 subACEAwards_off = new Image();
	 subACEAwards_off.src = "/images/subACEAwards_off.gif";
	 subACEAwards_on = new Image();
	 subACEAwards_on.src = "/images/subACEAwards_on.gif";
	 subACEAwards_active = new Image();
	 subACEAwards_active.src = "/images/subACEAwards_on.gif"; 

	 subEmployment_off = new Image();
	 subEmployment_off.src = "/images/subEmployment_off.gif";
	 subEmployment_on = new Image();
	 subEmployment_on.src = "/images/subEmployment_on.gif";
	 subEmployment_active = new Image();
	 subEmployment_active.src = "/images/subEmployment_on.gif"; 

	 subContactUs_off = new Image();
	 subContactUs_off.src = "/images/subContactUs_off.gif";
	 subContactUs_on = new Image();
	 subContactUs_on.src = "/images/subContactUs_on.gif";
	 subContactUs_active = new Image();
	 subContactUs_active.src = "/images/subContactUs_on.gif"; 

	 tellafriend_off = new Image();
	 tellafriend_off.src = "/images/tellafriend_off.gif";
	 tellafriend_on = new Image();
	 tellafriend_on.src = "/images/tellafriend_on.gif";
	 tellafriend_active = new Image();
	 tellafriend_active.src = "/images/tellafriend_on.gif"; 

	 printer_off = new Image();
	 printer_off.src = "/images/printer_off.gif";
	 printer_on = new Image();
	 printer_on.src = "/images/printer_on.gif";
	 printer_active = new Image();
	 printer_active.src = "/images/printer_on.gif"; 

	 button_profile_off = new Image();
	 button_profile_off.src = "/images/button_profile_off.gif";
	 button_profile_on = new Image();
	 button_profile_on.src = "/images/button_profile_on.gif";
	 button_profile_active = new Image();
	 button_profile_active.src = "/images/button_profile_on.gif"; 

	 button_logout_off = new Image();
	 button_logout_off.src = "/images/button_logout_off.gif";
	 button_logout_on = new Image();
	 button_logout_on.src = "/images/button_logout_on.gif";
	 button_logout_active = new Image();
	 button_logout_active.src = "/images/button_logout_on.gif"; 

	 button_memberHome_off = new Image();
	 button_memberHome_off.src = "/images/button_memberHome_off.gif";
	 button_memberHome_on = new Image();
	 button_memberHome_on.src = "/images/button_memberHome_on.gif";
	 button_memberHome_active = new Image();
	 button_memberHome_active.src = "/images/button_memberHome_on.gif"; 

   }
}
// call this function as soon as its loaded
PreloadImages();

//'*******************************************************************************
//'Function:      TurnOn
//'Parameters:    strName,strCurrentSection,strMenu
//'Return:
//'Description:   function to turn on mouseover effect for navigation elements
//'*******************************************************************************

function TurnOn(strName)
{
   if (document.images)
   {
      onImage = eval(strName + "_on.src");
      document[strName].src = onImage;
   }
}

//'*******************************************************************************
//'Function:      TurnOff
//'Parameters:    strName,strCurrentSection,strMenu
//'Return:
//'Description:   function to turn off mouseover effect for navigation elements
//'*******************************************************************************

function TurnOff(strName,strCurrentSection,strMenu)
{
   if (document.images)
   {
      if (strCurrentSection != strMenu)
      {
         offImage = eval(strName + "_off.src");
         document[strName].src = offImage;
      }
      else
      {
         activeImage = eval(strName + "_active.src");
         document[strName].src = activeImage;
      }
   }
}



//'*******************************************************************************
//'Function:      LaunchExternal
//'Parameters:    strURL
//'Return:
//'Description:   function to launch a new window set to a specific size
//'*******************************************************************************

function LaunchExternal(strURL)
{
   NewWindow(strURL,'external_window',1,1,1,1,1,1,1,750,525);
}

//'*******************************************************************************
//'Function:      NewWindow
//'Parameters:    strURL,strName,intMenubar,intToolbar,intLocation,
//'               intDirectories,intStatus,intScrollbars,intResizable,
//'               intWidth,intHeight
//'Return:
//'Description:   function to launch a new window set to specific parameters
//'*******************************************************************************

function NewWindow(strURL,strName,intMenubar,intToolbar,intLocation,intDirectories,intStatus,intScrollbars,intResizable,intWidth,intHeight)
{
   var objNewWindow;
   if (strURL == '' && strName == 'print')
   {  
		strURL = window.location + "&Print=True";
   }
   
   if (strURL == '' && strName == 'print2')
   {  
		strURL = window.location + "?Print=True";
   }
   var strParameters
   strParameters = 'menubar=' + intMenubar;
   strParameters += ',toolbar=' + intToolbar;
   strParameters += ',location=' + intLocation;
   strParameters += ',directories=' + intDirectories;
   strParameters += ',status=' + intStatus;
   strParameters += ',scrollbars=' + intScrollbars;
   strParameters += ',resizable=' + intResizable;
   strParameters += ',width=' + intWidth;
   strParameters += ',height=' + intHeight;
   strParameters += ',screenX=' + 10;
   strParameters += ',screenY=' + 10;
   strParameters += ',left=' + 10;
   strParameters += ',top=' + 10;
   objNewWindow = window.open(strURL,strName,strParameters);
   objNewWindow.focus();
}