/*
 	Randomly Selects a Montage Index to display 
	Product: SAAS
	Author: Ivan Alexander
	Version: 1.0
	Updated: November 4, 2005
	© 2005, Manheim Auctions
*/


/* Generates a random number from 0 to the value of the limit variable */
function getRandomMontageIndex(limit) {
	temp = Math.floor(Math.random() * (limit)) + 1; // Math.floor produces an even distribution from 0 to (limit - 1)
	return temp;
}

/* Function to write HTML code from combined static text & random montage index */
function createMontage() {
	var str = "<div id='montage' class='montage-" + getRandomMontageIndex(montageTotal) + "'></div>";
	document.write(str);
}

/* Call functions to execute script */
createMontage();