	/*
		-rotation
		---------------------
		This is meant to be used in the right column, between the ad banners. It is hoped implementation will be as simple as pasting the following line into the HTML:
		
		<script language="JavaScript" type="text/javascript" src="/js/keynote-rotation.js"></script>
		
		Note that this is located in the root of the website, to facilitate simultaneous use by multiple sub-directories (lasvegas, newyork, etc) if so desired.
		
		Any questions about this file, come see me.
		
		~Justine 1/23/08		
	*/
	
	// Initialize the arrays:
	var keynote_img = new Array();
	var keynote_preloader = new Array();
	var keynote_text = new Array();
	
	// Declare variables for use as the beginning and close of the image source paths:
	var keynote_img_path = "http://acme.medialiveinternational.com/speakers/";
	var keynote_img_ext = ".jpg";
	
	// This will be incremented and used as the number of the array elements that follow:
	var x = 0;
	
	// To add a new item to the array, copy the 4 lines that constitute one full item.
	// Once copied, increment the [number] of the array by one, and change the values 
	// as appropriate.
	// 
	// Here is what each line does:
	// --------------------------------------------------------------------------------
	// - First item is the descriptive text to appear above the logo.
	// - Second, the name of the image to use.
	// - Third is the width and height respectively of the image.
	// - Fourth increments the variable 'x' by 1. This needs no editing, but must be present for each item. We use 
	//   this instead of hard-coding the numbers of the array elements (ie: [0], [1], [2], etc) because often 
	//   marketing is going to need to swap in and out new items. If we hard-coded the number of the array 
	//   elements, and someone wanted to squeeze a new keynote between items 3 and 4, the old 4 becomes 5, old 5 
	//   becomes 6, and so on. This way we don't have to manually update that every time a change is requested.
	// 
	// Virtualization:
	
		keynote_img[x] = "mark-prichard";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Mark Prichard, Senior Principal Product Manager, Java Platform Group, Oracle";
		x = x + 1;
	
		
		keynote_img[x] = "matt-thompson";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Matt Thompson, General Manager, Developer and Platform Evangelism, Microsoft";
		x = x + 1;
	
		
		keynote_img[x] = "ric-telford";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Ric Telford, Vice President of Cloud Services, IBM";
		x = x + 1;
		
		
		keynote_img[x] = "scott-chasin";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Scott Chasin, CTO, McAfee SaaS";
		x = x + 1;
				
		
		keynote_img[x] = "adam-gross";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Adam Gross, Senior Vice President, Marketing and Sales, Dropbox";
		x = x + 1;
	
		
		keynote_img[x] = "brian-berger";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Brian Berger, Director, Trusted Computing Group and Executive Vice President of Marketing & Sales, Wave Systems Corp";
		x = x + 1;
	
		
		keynote_img[x] = "jas-dhillon";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Jas Dhillon, General Manager Evidence.Com and TASER Virtual Systems, Chief Strategy Officer, TASER International";
		x = x + 1;
	
		
		keynote_img[x] = "jeremy-edberg";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Jeremy Edberg, Operations Manager, reddit.com";
		x = x + 1;
	
	
		keynote_img[x] = "dan-elron";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Dan Elron, Managing Partner, Technology Strategy, Accenture";
		x = x + 1;
	
	
		keynote_img[x] = "darren-feher";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Darren Feher, President and Chief Executive Officer, Conviva and Former CTO of NBC";
		x = x + 1;
	
	
		keynote_img[x] = "bob-flores";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Bob Flores, Founder and President, Applicology, Inc. and Former CTO of the CIA";
		x = x + 1;
	
	
		keynote_img[x] = "vijay-bhagavath";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Vijay K. Bhagavath, Ph.D. , U.S. Equity Research , Deutsche Bank Securities Inc.";
		x = x + 1;
	
	
		keynote_img[x] = "rodney-joffe";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Rodney Joffe, Senior Vice President, and Senior Technologist, Neustar";
		x = x + 1;
	
	
		keynote_img[x] = "william-louth";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "William Louth, CTO, JINSPIRED";
		x = x + 1;
	
	
		keynote_img[x] = "vijay-bhagavath";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Vijay K. Bhagavath, Ph.D. , U.S. Equity Research , Deutsche Bank Securities Inc.";
		x = x + 1;
	
	
		keynote_img[x] = "chris-mcgarry";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Chris McGarry, CEO and Co-Founder, Omnetic Inc.";
		x = x + 1;
	
	
		keynote_img[x] = "guy-rosen";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Guy Rosen CEO, Vircado and Blogger, JackOfAllClouds.com";
		x = x + 1;
	
	
		keynote_img[x] = "lew-tucker";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "Lew Tucker, Former Vice President and CTO, Cloud Computing, Sun Microsystems";
		x = x + 1;
	
	
		keynote_img[x] = "william-vambenepe";
		keynote_preloader[x] = new Image(81,81);
		keynote_text[x] = "William Vambenepe, Architect, Oracle Corp.";
		x = x + 1;
	
		
// We need to pre-load the images in the array above, to minimize delays in display which could set the 
	// associated text out of synch with the logos as they are swapped.
	// 
	// Since keynote_preloader[0].src will be exactly the same as keynote_preloader[100].src with the exception 
	// of the number of the array (0 vs. 100 in the example), we can use the following loop to write this 
	// entire section of the array for us.
	// 
	for (i=0; i<keynote_preloader.length; i++) {
		keynote_preloader[i].src = keynote_img_path + keynote_img[i] + keynote_img_ext;
	}
	
	
	// This is the timer function:
	var k = 0;
	var timer = setTimeout("changeKey()",3000); // 3000 = 3 second delay between items

	function changeKey() {
		k = k+1;
		if(k == keynote_text.length) { // the max no. of times to loop is keying off the length of 'keynote_text()'
			k = 0;
		}
		

		// Insert text description
		document.getElementById('keynote_text_rotation').innerHTML = keynote_text[k];

        // Insert image source
		document.getElementById('keynote_img_rotation').src = keynote_img_path + keynote_img[k] + keynote_img_ext;	
		

		
		time = setTimeout("changeKey()",3000); // 3000 = 3 second delay between items
	}
	
	
	// Below, we write the entire UI, including the CSS, in JavaScript. If a user does not have JavaScript 
	// turned on, they won't see anything at all.
	
	var keynote_img_ui = ""; // initialize
	keynote_img_ui += "	<div id='keynote_img_ui' align='center' style='height:140px;'>";
	keynote_img_ui += "		<a href='/cloud-computing-conference/speakers.php'><img src='" + keynote_img_path + keynote_img[0] + keynote_img_ext + "' alt='' border='0' id='keynote_img_rotation' align='left' width='100'/></a>";
	keynote_img_ui += "		<div id='keynote_text_rotation' style='padding-top:10px;'>" + keynote_text[0] + "</div>";
	keynote_img_ui += "	</div>";
	
	
	// Write the UI elements:
	document.write(keynote_img_ui);