var overlay_ids = new Array('overlayone','overlaytwo','overlaythree','overlayfour','overlayfive','overlaysix','overlayseven','overlayeight','overlaynine');
var home_layouts = new Array('index.php','index2.html','index3.html');

var home_quotes = new Array();
var speaker_quotes = new Array();
var agenda_quotes = new Array();

home_quotes.push("\"Innovation is the central issue in economic prosperity.\"<br />&#150; Michael Porter, economic theorist and Professor, Harvard Business School");

home_quotes.push("\"Invention is science, innovation is economics.\"<br />&#150; Steve Lohr, The New York Times");

home_quotes.push("\"Collaboration is transforming the way we innovate.\"<br />&#150; Marthin de Beer, Cisco");

home_quotes.push("\"Without choice, you have no innovation. Without innovation, you have nothing.\"<br />&#150; Scott McNealy, Founder & CEO, Sun Microsystems");

home_quotes.push("\"‘Innovation economics’ shows how smart ideas can turn into jobs and growth, and keep you competitive.\"<br />&#150; Michael Mandel, BusinessWeek");

home_quotes.push("\"No matter who you are, most of the smartest people work for somebody else.\"<br />&#150; Bill Joy, Kleiner Perkins Caufield & Byers");

home_quotes.push("\"For every company, the starting point shouldn’t be, ‘How do we protect our IP?’ The starting point should be, ‘How do we innovate?’\"<br />&#150; Don Tapscott, Author, Wikinomics: How Mass Collaboration Changes Everything");

home_quotes.push("\"Prizes work. Prizes can generate breakthrough results by attracting brilliant innovators across national and disciplinary boundaries to solve grand challenges.\"<br />&#150; J. Craig Venter, Ph.D., Founder, J. Craig Venter Institute");

home_quotes.push("\"The instinct to compete and to achieve, combined with the better angels of our nature - the instinct to make this a better world.\"<br />&#150; Arianna Huffington, Author, Co- Founder & Editor-In-Chief, Huffington Post");

home_quotes.push("\"A core power of prizes derives from their openness: their ability to attract diverse talent, generate unexpected approaches, and reveal unusual perspectives in the face of a problem or challenge.\"<br />&#150; “And the Winner Is…”: Capturing the Promise of Prizes, McKinsey & Company");

speaker_quotes.push("\"Innovation is the central issue in economic prosperity.\"<br />&#150; Michael Porter, economic theorist and Professor, Harvard Business School");

speaker_quotes.push("\"Invention is science, innovation is economics.\"<br />&#150; Steve Lohr, The New York Times");

speaker_quotes.push("\"Collaboration is transforming the way we innovate.\"<br />&#150; Marthin de Beer, Cisco");

speaker_quotes.push("\"Without choice, you have no innovation. Without innovation, you have nothing.\"<br />&#150; Scott McNealy, Founder & CEO, Sun Microsystems");

speaker_quotes.push("\"‘Innovation economics’ shows how smart ideas can turn into jobs and growth, and keep you competitive.\"<br />&#150; Michael Mandel, BusinessWeek");

speaker_quotes.push("\"No matter who you are, most of the smartest people work for somebody else.\"<br />&#150; Bill Joy, Kleiner Perkins Caufield & Byers");

speaker_quotes.push("\"For every company, the starting point shouldn’t be, ‘How do we protect our IP?’ The starting point should be, ‘How do we innovate?’\"<br />&#150; Don Tapscott, Author, Wikinomics: How Mass Collaboration Changes Everything");

speaker_quotes.push("\"Prizes work. Prizes can generate breakthrough results by attracting brilliant innovators across national and disciplinary boundaries to solve grand challenges.\"<br />&#150; J. Craig Venter, Ph.D., Founder, J. Craig Venter Institute");

speaker_quotes.push("\"The instinct to compete and to achieve, combined with the better angels of our nature - the instinct to make this a better world.\"<br />&#150; Arianna Huffington, Author, Co- Founder & Editor-In-Chief, Huffington Post");

speaker_quotes.push("\"A core power of prizes derives from their openness: their ability to attract diverse talent, generate unexpected approaches, and reveal unusual perspectives in the face of a problem or challenge.\"<br />&#150; “And the Winner Is…”: Capturing the Promise of Prizes, McKinsey & Company");

agenda_quotes.push("\"Innovation is the central issue in economic prosperity.\"<br />&#150; Michael Porter, economic theorist and Professor, Harvard Business School");

agenda_quotes.push("\"Invention is science, innovation is economics.\"<br />&#150; Steve Lohr, The New York Times");

agenda_quotes.push("\"Collaboration is transforming the way we innovate.\"<br />&#150; Marthin de Beer, Cisco");

agenda_quotes.push("\"Without choice, you have no innovation. Without innovation, you have nothing.\"<br />&#150; Scott McNealy, Founder & CEO, Sun Microsystems");

agenda_quotes.push("\"‘Innovation economics’ shows how smart ideas can turn into jobs and growth, and keep you competitive.\"<br />&#150; Michael Mandel, BusinessWeek");

agenda_quotes.push("\"No matter who you are, most of the smartest people work for somebody else.\"<br />&#150; Bill Joy, Kleiner Perkins Caufield & Byers");

agenda_quotes.push("\"For every company, the starting point shouldn’t be, ‘How do we protect our IP?’ The starting point should be, ‘How do we innovate?’\"<br />&#150; Don Tapscott, Author, Wikinomics: How Mass Collaboration Changes Everything");

agenda_quotes.push("\"Prizes work. Prizes can generate breakthrough results by attracting brilliant innovators across national and disciplinary boundaries to solve grand challenges.\"<br />&#150; J. Craig Venter, Ph.D., Founder, J. Craig Venter Institute");

agenda_quotes.push("\"The instinct to compete and to achieve, combined with the better angels of our nature - the instinct to make this a better world.\"<br />&#150; Arianna Huffington, Author, Co- Founder & Editor-In-Chief, Huffington Post");

agenda_quotes.push("\"A core power of prizes derives from their openness: their ability to attract diverse talent, generate unexpected approaches, and reveal unusual perspectives in the face of a problem or challenge.\"<br />&#150; “And the Winner Is…”: Capturing the Promise of Prizes, McKinsey & Company");



function printQuote(quote_index) {
	switch (quote_index) {
		case 0:
		document.getElementById('quote').innerHTML = speaker_quotes[getRandomIndex(speaker_quotes)];
		break;
		
		case 1:
		document.getElementById('quote').innerHTML = home_quotes[getRandomIndex(home_quotes)];
		break;

		case 2:
		document.getElementById('quote').innerHTML = agenda_quotes[getRandomIndex(agenda_quotes)];
		break;
	}
	
}


function getRandomIndex(array) {
    var rand = Math.round(Math.random() * 
        Math.pow(10,Math.ceil(array.length/10)));
    var index = rand % array.length;

    return index;
}


function light(element_id) {
	document.getElementById(element_id).style.backgroundPosition = '0px -18px';
}

function dark(element_id) {
	document.getElementById(element_id).style.backgroundPosition = '0px 0px';
}

function showOverlay(overlay_index) {
		document.getElementById(overlay_ids[overlay_index]).style.height = 'auto';
		document.getElementById(overlay_ids[overlay_index]).style.overflow = '';
}

function hideOverlay(overlay_index) {
		document.getElementById(overlay_ids[overlay_index]).style.height = '0px';
		document.getElementById(overlay_ids[overlay_index]).style.overflow = 'hidden';
}

function goToRandomHomeLayout() {
	randomIndex = getRandomIndex(home_layouts);
	if (randomIndex > 0) self.location = home_layouts[randomIndex];
}

function hover(element_id) {
	document.getElementById(element_id).style.backgroundPosition = '0px -20px';
}

function hoverout(element_id) {
	document.getElementById(element_id).style.backgroundPosition = '0px 0px';
}

