function MainNavigation( mID )
{
	if ( typeof mID == "string" )
		mID = document.getElementById( mID );

	if ( typeof mID.getElementsByTagName != "undefined" )
	{
		this._master = mID;
		var aImage   = this._master.getElementsByTagName( "img" );
		for ( var i = 0; i < aImage.length; ++i )
			if ( aImage[ i ].parentNode.className.match( /navigation/ ) && !aImage[ i ].parentNode.className.match( /selected/ ) )
				this._addInteraction( aImage[ i ] );
	}
};
MainNavigation.prototype._addInteraction = function( oImage )
{
	this._preload( oImage.src, {_on:"_off", _off:"_on"} );
	oImage._control    = this;
	oImage.onmouseover = this.__mouseover;
	oImage.onmouseout  = this.__mouseout;
};
MainNavigation.prototype._preload = function( sURL, oState )
{
	if ( typeof this._preload == "undefined" )
		this._preload = new Array();
	for ( var p in oState )
		this._preload[ this._preload.length ] = ( new Image() ).src = sURL.replace( new RegExp( p ), oState[ p ] );
};
MainNavigation.prototype.__mouseover = function()
{
	this._control.onmouseover( this );
};
MainNavigation.prototype.__mouseout = function()
{
	this._control.onmouseout( this );
};
MainNavigation.prototype.onmouseover = function( oImg )
{
	oImg.src = oImg.src.replace( /_off/, "_on" );
};
MainNavigation.prototype.onmouseout = function( oImg )
{
	oImg.src = oImg.src.replace( /_on/, "_off" );
};
