init = function() {
	initNavRollovers();
}

initNavRollovers = function() {
	var imageRollovers = $ES('.navRollover');
	var imageRolloverGIFs = $ES('.navRolloverGIFs');

	for (i = 0; i < imageRolloverGIFs.length; i++)
	{
    var myElement = imageRolloverGIFs[i];
		myElement.addEvent('mouseover', _swapOverGif.bindWithEvent(myElement));
		myElement.addEvent('mouseout', _swapOutGif.bindWithEvent(myElement));
	}
	
	for (i = 0; i < imageRollovers.length; i++)
	{
    var myElement = imageRollovers[i];
		myElement.addEvent('mouseover', _swapOver.bindWithEvent(myElement));
		myElement.addEvent('mouseout', _swapOut.bindWithEvent(myElement));
	}
}

_swapOver = function() {
	this.removeClass(this.id);
	this.addClass(this.id + 'Over');
}

_swapOut = function() {
	this.removeClass(this.id + 'Over');
	this.addClass(this.id);  
}

_swapOverGif = function() {
	if (( this.src.substring(0,this.src.lastIndexOf('_active.gif')) == 0 ) && ( this.src.substring(0,this.src.lastIndexOf('x.gif')) == 0 ))
	{
		imgSrc = this.src.substring(0,this.src.lastIndexOf('.'));
		imgSrc += '_over.gif';
		this.src = imgSrc;					
	}    
}

_swapOutGif = function() {
	if (( this.src.substring(0,this.src.lastIndexOf('_active.gif')) == 0 ) && ( this.src.substring(0,this.src.lastIndexOf('x.gif')) == 0 ))
	{
		imgSrc = this.src.substring(0,this.src.lastIndexOf('_over.gif'));
		imgSrc += '.gif';
		this.src = imgSrc;				
	}        
}