// routine that allows "rosrc" attribute to be used in IMG	
// tag, to specify the rollover image						
//															
// 		eg: <img src="b.gif" rosrc="a.gif">					
//															
// Browsers that support DOM (IE5,NS6)						
// ModeZero Ltd 2002										

// temp store for currently rolled-over image
var g_oBaseImgSrc;	

// will be set as the mouseover routine	
//
function roIn() 
{
  g_oBaseImgSrc = this.getAttribute('src');
  this.setAttribute('src',this.getAttribute('rosrc'))
}

// will be set as the mouseout routine	
//
function roOut() 
{
	this.setAttribute('src',g_oBaseImgSrc)
}
			
// Init the roll over support (call in OnLoad of document)
//
function roinit(bPreload)
{
	// no point if no DOM	
	if (document.getElementById) 
  	{
  		// get all the IMG tags in the doc for iteration
		var rImgsInDoc = document.getElementsByTagName('img');
		var oImgPreload;

		// go through each looking for any with 'rosrc'	
		for (var i = 0; i < rImgsInDoc.length; i++) 
		{
		  if (rImgsInDoc[i].getAttribute('rosrc')) 
		  {
				// preload images if requested
				if (bPreload)
				{
					oImgPreload = new Image();
					oImgPreload.src = rImgsInDoc[i].getAttribute('rosrc');
				}
				
				rImgsInDoc[i].onmouseover = roIn
				rImgsInDoc[i].onmouseout = roOut
		    }
		}
	}
}
