/*
* This document contains scripts used throughout the ARMM site.
* Currently included are scripts for:
*		Image Button Rollovers
*		[not yet] CSS based drop down menus.
*/

/*** Image Button Rollovers ***/

// The following lines go in the document to configure use of the rollovers:
//	First, one of the three, to define the rollover transition:
//		1) Use the next line for random transition rollover each time the page is loaded
//		<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=.5, transition='+Math.floor(Math.random()*23)+') }</STYLE>
//		2) Use the next line for a specific transition rollover (transition=0 to 23)
//		<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=.5,transition=12) }</STYLE>
//		3) Use the next line for fading rollovers
//		<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=.5) }</STYLE>
//
//	Second, to define the page's rollovers:
//		Rollover("home",    	"../images/nav_home_roll.jpg");
//
// Also, on the page, in tags, the specific attributes are required (onMouseOver, 
//		onMouseOut, imgTrans, name) as follows:
//		<a href="../welcome.html"
//				onMouseOver="turnOn('home');" onMouseOut="turnOff('home');">
//				<img name="home" class="imgTrans" border="0" src="../images/nav_home.jpg" alt="Home" /></a>

/**
  * You may use this code for free on any web page provided that 
  * these comment lines and the following credit remain in the code.
  * Multimedia Rollovers from http://www.javascript-fx.com
  */
  
var onImages=new Array();
function Rollover(imgName, imgSrc)
{
	onImages[imgName] = new Image();
	onImages[imgName].src = imgSrc;
}
function turnOn(imgName) 
{ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].stop();
	document.images[imgName].offSrc = document.images[imgName].src;
	document.images[imgName].src    = onImages[imgName].src;
} 
function turnOff(imgName) 
{ 
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].apply();
	document.images[imgName].src = document.images[imgName].offSrc;
	if(document.images[imgName].filters != null)
		document.images[imgName].filters[0].play();
} 
