/* JK 14/08/2000

	Usage: 
		onMouse... = "rollover( 'picture', 'newpicture', ... )"
	or:
		onMouse... = "return rollover( 'text on status line', 'pic', 'newpic', ... )"
		
	Variadic - takes any number of arguments. If the number of arguments is odd, the first argument is taken to be a text to appear on the status line. E.g. "return rollover( '' )" simply clears the status line.
	The (other) arguments are taken in pairs: arg #0(1, if odd number of args) is rolled over by arg #1(2), arg #2(3) is rolled over by arg #3(4), etc. The first of each pair should be the name of an <img> in the current document, the second, the name of a (pre-loaded) Image() variable with a defined src.
*/
function AdequateBrowser()
{
	var app = navigator.appName;
	var ver = parseInt( navigator.appVersion );
	
	//JK modified 24/01/02 - include Opera 6+
	if( ( app == 'Microsoft Internet Explorer' && ver >= 4 ) || ( app == 'Netscape' && ver >= 3 ) || ( app == 'Opera' && ver >= 6 ) )
		return true;
	return false;
}

var isAdequateBrowser = AdequateBrowser();

function rollover()
{
	if( !isAdequateBrowser )
		return true;
		
	var has_blurb = ( arguments.length % 2 == 1 );
	var i = ( has_blurb ? 1 : 0 );
	
	for( ; i < arguments.length; i += 2 )
		document.images[arguments[i]].src = eval( arguments[i + 1] + '.src' );
	if( has_blurb )
		window.status = ( arguments[0] == null ? window.defaultStatus : arguments[0] );
	return has_blurb; 
}
