function init() {
// whatever stuff you need to do onload goes here.
//==========================================================================================
// if supported, initialize mtdropdowns
//==========================================================================================
// Check isSupported() so that menus aren't accidentally sent to non-supporting browsers.
// This is better than server-side checking because it will also catch browsers which would
// normally support the menus but have javascript disabled.
//
// If supported, call initialize() and then hook whatever image rollover code you need to do
// to the .onactivate and .ondeactivate events for each menu.
//==========================================================================================
if (mtDropDown.isSupported()) {
mtDropDown.initialize();
// hook all the image swapping of the main toolbar to menu activation/deactivation
// instead of simple rollover to get the effect where the button stays hightlit until
// the menu is closed.
/* Here we insert the dynamic menu object handlers */
menu1.onactivate = function(){ highlightOn() };
menu1.ondeactivate = function() { highlightOff() };
menu2.onactivate = function(){ highlightOn() };
menu2.ondeactivate = function() { highlightOff() };
menu3.onactivate = function(){ highlightOn() };
menu3.ondeactivate = function() { highlightOff() };
menu4.onactivate = function(){ highlightOn() };
menu4.ondeactivate = function() { highlightOff() };
/* Here we end the dynamic menu object handlers */
}
}
var lastObj = '';
function highlightOff() {
if( (! document.all ) || ( lastObj == '' ) )
{
return;
}
eval( lastObj.id + "Over" ).style.backgroundColor="";
return;
}
function highlightOn() {
if(! document.all )
{
return;
}
var srcObj = event.srcElement ;
if ( eval( srcObj.id + "Over" ).style.backgroundColor!= "#000000" )
{
highlightOff();
eval( srcObj.id + "Over" ).style.backgroundColor="#000000";
}
lastObj = srcObj;
return;
}