//
// Preload the rollover images
//
var imgTmp1 = new Image().src='/images/banner-home-btn-acmax.o.gif';
var imgTmp2 = new Image().src='/images/banner-home-btn-boards.o.gif';
var imgTmp3 = new Image().src='/images/banner-home-btn-idx.o.gif';
var imgTmp4 = new Image().src='/images/banner-home-btn-office.o.gif';

var imgPieces;

function switchero(img) {
	//alert(img.src);
	imgPieces = img.src.split('.');
	//alert(imgPieces.length);
	//
	// That will create an Array of the absolute URL
	// (ex. ['http://www.', 'readvantage', 'com/images/banner-home-1', 'gif'])
	//
	switch (imgPieces.length) {
		case 4:
			// Insert a '.o' at between index 2 and 3
			imgPieces.splice(3,0,'o');
			break;
		case 5:
			// Delete the '.o' at index 3
			imgPieces.splice(3,1);
			break;
	}
	//alert(imgPieces.length);
	//
	// The logic here is the regular image will have 4 distinct pieces,
	// while the 'over' image will have 5 with the addition to a '.o' to the name.
	//
	//alert(imgPieces.join('.'));
	img.src = imgPieces.join('.');
}

