
/////////////////////////////////////////////////
// PLEASE READ: Always make sure that each     //
// array (img, link, and timeout) have EXACTLY //
// the same number of entries...otherwise, it  //
// can cause errors and customer confusion.    //
// Also, JavaScript errors will be thrown if   //
// each array is not zero-based (i.e. img[0],  //
// link[0], and timeout[0] must all exist!)    //
/////////////////////////////////////////////////

// Store the images, links into an array
var img = new Array();
var link = new Array();
var timeout = new Array();
var usemap = new Array();
var alt = new Array();

// Images (place in www.internetworkexpert.com/rotator folder)
img[0] = "reno-bootcamp-link.gif";
img[1] = "dvd-bootcamp-large.jpg";

// Links
// Example links:
// link[0] = "http://www.internetworkexpert.com";
// link[1] = "store.internetworkexpert.com";
link[0] = "http://www.internetworkexpert.com/reno-rs-bootcamp.htm";
link[1] = "http://www.internetworkexpert.com/ccie-rs-advanced-tech-dvd.htm";

// Timeouts in milliseconds
timeout[0] = 5000;
timeout[1] = 5000;

// Image maps
usemap[0] = "no_map";

// Alt & Title Tags
alt[0] = "CCIE 12-Day RS Bootcamp";
alt[1] = "CCIE RS Bootcamp DVD";

// Set the random start index
var random = Math.floor(Math.random() * (img.length - 0.01));

// Function that rotates the image and link of the main site image
/**** DO NOT CHANGE ****/
function rotateImage(num) {
	// Change the image
	document.getElementById("ID_Rotator_Image").src = "http://www.internetworkexpert.com/rotator/" + img[num];
	document.getElementById("ID_Rotator_Image").longDesc = "http://www.internetworkexpert.com/rotator/" + img[num];
	// Change the image's link
	document.getElementById("ID_Rotator_Link").href = link[num];
	// Change the image's map
	document.getElementById("ID_Rotator_Image").useMap = usemap[num];
	// Change the image's alt and title tags
	document.getElementById("ID_Rotator_Image").alt = alt[num];
	document.getElementById("ID_Rotator_Image").title = alt[num];
	// Set the timeout for the next rotation
	next = setTimeout("rotateImage("+(num + 1 >= img.length ? 0 : num + 1)+")", timeout[num]);
}

// Function that is used to randomize the startup image
function displayStartupImage(num) {
	document.writeln('<a id="ID_Rotator_Link" href="'+link[num]+'"><img id="ID_Rotator_Image" src="http://www.internetworkexpert.com/rotator/'+img[num]+'" width="600" height="260" longdesc="http://www.internetworkexpert.com/rotator/'+img[num]+'" border=0 alt="'+alt[num]+'" title="'+alt[num]+'"/></a>');
}

// Function that is used to show pop-up windows
function rotatorPopUp(url, w, h) {
	window.open(url, 'ie_1210339361', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' + w + ',height=' + h);
}