function over () {
	if ( this != active ) {
		this . src = this . src . replace ( '_off' , '_on' ) ;
		if ( this . index + 1 < menuItems . length - 1 ) menuItems [ this . index + 1 ] . style . backgroundImage = 'none' ;
		if ( this . index > 1 ) menuItems [ this . index - 1 ] . style . backgroundImage = 'none' ;
	}
}

function out () {
	if ( this != active ) {
		this . src = this . src . replace ( '_on' , '_off' ) ;
		this . style . background = 'none' ;
		if ( ( this . index + 1 < menuItems . length - 1 ) && ( this . index + 2 != active . index ) ) menuItems [ this . index + 1 ] . style . background = menuDiv ;
		if ( ( this . index > 1 ) && ( this . index - 2 != active . index ) ) menuItems [ this . index - 1 ] . style . background = menuDiv ;
	}
}

function preloadImages ( ) { //v3.0
	var d = document ;
	if( d . images ) {
		if ( !d.MM_p ) d.MM_p = new Array ( ) ;
		var i , j = d . MM_p . length , a = preloadImages . arguments ;
		for( i = 0 ; i < a . length ; i ++ ) {
			if ( a [ i ] . indexOf ( "#" ) != 0 ) {
				d . MM_p [ j ] = new Image ; d . MM_p [ j++ ] . src = a [ i ] ;
			}
		}
  	}
}

function initRollovers ( menuId )  {
	var menu = document . getElementById ( menuId ) ;
	menuItems = menu . getElementsByTagName ( 'td' ) ;
	for ( i = 0 ; i < menuItems . length ; i ++ ) {
		img = menuItems [ i ] . getElementsByTagName ( 'img' ) ;
		if ( img [ 0 ] ) {
			img = img [ 0 ] ;
			img . onmouseover = over ;
			img . onmouseout  = out ;
			img . index = i ;
			if ( img . src . indexOf ( '_on.' ) >= 0 ) {
				active = img ;
				preloadImages ( active . src . replace ( '_on' , '_off' ) ) ;
			} else {
				preloadImages ( img . src . replace ( '_off' , '_on' ) )
			}
			if ( active ) {
				if ( active . index + 1 < menuItems . length - 1 ) menuItems [ active . index + 1 ] . style . backgroundImage = 'none' ;
				if ( active . index > 1 ) menuItems [ active . index - 1 ] . style . backgroundImage = 'none' ;
			}
		}
	}
}

var active ;
var menuItems = Array () ;
var menuDivs = Array () ;
var menuDiv = 'url(images/menu/dot.gif) no-repeat center' ;