// JavaScript Document


// Browser Detection Javascript
// copyright 1 February 2003, by Stephen Chapman, Felgall Pty Ltd

// You have permission to copy and use this javascript provided that
// the content of the script is not changed in any way.

function whichBrowser() {
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("opera") != -1) return 'Opera';
if (agt.indexOf("staroffice") != -1) return 'Star Office';
if (agt.indexOf("webtv") != -1) return 'WebTV';
if (agt.indexOf("beonex") != -1) return 'Beonex';
if (agt.indexOf("chimera") != -1) return 'Chimera';
if (agt.indexOf("netpositive") != -1) return 'NetPositive';
if (agt.indexOf("phoenix") != -1) return 'Phoenix';
if (agt.indexOf("firefox") != -1) return 'Firefox';
if (agt.indexOf("safari") != -1) return 'Safari';
if (agt.indexOf("skipstone") != -1) return 'SkipStone';
if (agt.indexOf("msie") != -1) return 'Internet Explorer';
if (agt.indexOf("netscape") != -1) return 'Netscape';
if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
if (agt.indexOf('\/') != -1) {
if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
return navigator.userAgent.substr(0,agt.indexOf('\/'));}
else return 'Netscape';} else if (agt.indexOf(' ') != -1)
return navigator.userAgent.substr(0,agt.indexOf(' '));
else return navigator.userAgent;
}

gBrowser = whichBrowser();

gFaders = new Object;

function FadeObject( newImg, fadeDuration, fadeInterval )
{
	this.newImg = newImg;
	this.fadeDuration = fadeDuration;
	this.fadeInterval = fadeInterval;
	this.img = null;
	this.td = null;
}

function ImageFaderBegin( id, srcName, altName, href, duration, interval )
{
	key = id;
	var fadeObject = new Object;
	gFaders[key] = fadeObject;
	
	fadeObject.newImg = srcName;
	fadeObject.fadeDuration = duration;
	fadeObject.fadeInterval = interval;
	fadeObject.td = document.getElementById(id);
	var oldImg = fadeObject.td.getElementsByTagName('img')[0];
	fadeObject.a = fadeObject.td.getElementsByTagName('a')[0];
	fadeObject.td.style.backgroundImage = "url(" + oldImg.src + ")";
	
	// create an entirely new Image object to avoid flicker
	var newImg = new Image();
	newImg.src = fadeObject.newImg;
	newImg.style.opacity = "0.0";
	newImg.style.filter = "alpha(opacity=0)";
	newImg.width = 100;
	newImg.height = 120;
	newImg.alt = altName;
	
	p = oldImg	.parentNode;
	p.replaceChild(newImg, oldImg); 
	fadeObject.img = newImg;
	
	if ( fadeObject.a )
		fadeObject.a.href = href;

	var loadDelay = 500;	// extra time to allow the immages to load
	setTimeout('ImageFaderStep("' + key + '")', fadeObject.fadeInterval + loadDelay);
}

function ImageFaderStep( key )
{
	var fadeObject = gFaders[key];
	var newOpacity = parseFloat(fadeObject.img.style.opacity) + fadeObject.fadeInterval / fadeObject.fadeDuration;
	var done = false;
	if ( newOpacity >= 1.0 )
	{
		done = true;
		newOpacity = 1.0;
	}
	
	fadeObject.img.style.opacity = newOpacity;
	fadeObject.img.style.filter = "alpha(opacity=" + newOpacity * 100 + ")";
	
	if ( !done )
		setTimeout('ImageFaderStep("' + key + '")', fadeObject.fadeInterval);
	else
		gFaders[key] = null;
}

speakerData = [
	[1,"Allison Luong","Founder & Managing Director","Pearl Research","allison_luong.jpg"],
	[2,"Bart House","Development Lead – Windows Server Performance Team","Microsoft","bart_house.jpg"],
	[4,"Brendan Vanous","Development Lead","Microsoft","brendan_vanous_2.jpg"],
	[5,"Christof Wegmann","CTO","Exit Games","christof_wegmann.jpg"],
	[69,"Corey Bridges","Co-Founder, Executive Producer","Multiverse","corey_bridges.jpg"],
	[7,"Constance Steinkuehler","Assistant Professor","University of Wisconsin-Madison","constance_steinkuehler.jpg"],
	[9,"Darius Kazemi","President","Orbus Gameworks","darius_kazemi.gif"],
	[10,"Dave Weinstein","Security Development Engineer","Microsoft","dave_weinstein.gif"],
	[11,"David Simkins","Graduate Student","University of Wisconsin-Madison","david_simkins.jpg"],
	[12,"Diana Li","Vice President","Shanda","diana_li.jpg"],
	[13,"Gavin Longhurst","Director of Business Development","BigWorld","gavin_longhurst.jpg"],
	[14,"Herb Sutter","Software Architect","Microsoft","herb_sutter.jpg"],
	[15,"Hermann Peterscheck","Producer","NetDevil","hermann_peterscheck.jpg"],
	[17,"Isaac Barry","Game Designer","Sierra Online","isaac_barry.jpg"],
	[18,"James E. Dunstan","Partner","Garvey Schubert Barer","jim_dunstan.jpg"],
	[19,"James Hursthouse","CEO/Owner","Online Game Services, Inc.","james_hursthouse.jpg"],
	[20,"Jeff MacDermot","Software Developer in Test","Microsoft","jeff_macdermot.jpg"],
	[21,"Jeff Pobst","Founder and Chief Executive Officer","Hidden Path Entertainment","jeff_pobst.jpg"],
	[22,"Jess Lebow","Content Director","Flying Lab Software","jess_lebow.jpg"],
	[23,"Joe Ludwig","Director of Development","Flying Lab Software","joe_ludwig.jpg"],
	[24,"John Hopson, Ph.D.","User Research Engineer","Microsoft Games Studios/Games User Research","john_hopson.jpg"],
	[26,"John Maffei","Senior Vice President, Business Development","Affinity Media / IGE","john_maffei.jpg"],
	[27,"Joseph Ybarra","Vice President of Product Development","Cheyenne Mountain Entertainment","joe_ybarra.jpg"],
	[28,"Joshua Hong","CEO and Founder","K2 Network","joshua_hong.jpg"],
	[29,"Keith Halper","CEO","Kuma Reality Games","keith_halper.jpg"],
	[30,"Kevin Bjorke","Art & Technology Evangelist","NVIDIA Corporation","kevin_bjorke.jpg"],
	[31,"Lisa Galarneau, M.Sc.","Ph.D. Candidate","The University of Waikato, New Zealand","lisa_galarneau.jpg"],
	[33,"Mike Goslin","Vice President, Virtual Reality Studio","Disney Online","mike_goslin.jpg"],
	[34,"Monty Sharma","Vice President Product Management and Marketing","Vivox","monty_sharma.jpg"],
	[37,"Ramon Axelrod","CTO","AIseek","ramon_axelrod.jpg"],
	[39,"Rich Weil","Community Relations Director","Kaneva","rich_weil.jpg"],
	[40,"Rich Wickham","Director, Games for Windows, Entertainment and Devices Division","Microsoft","rich_wickham.jpg"],
	[41,"Robert Mitchell","Senior Programmer","Sony Online Entertainment","robert_mitchell.jpg"],
	[42,"Scott Brown","President and CEO","NetDevil","scott_brown.jpg"],
	[43,"Sean Burgoon","Animator","Cryptic Studios","sean_burgoon.jpg"],
	[44,"Shayne Herrera","Development Director of Art","Cryptic Studios","shayne_herrera.jpg"],
	[45,"Simon Hayes","Chief Technical Officer","BigWorld","simon_hayes.jpg"],
	[46,"Steve Augustino","Partner","Kelley Drye & Warren LLP","steve_augustino.jpg"],
	[47,"Steve Goldstein","Director of Business Development & General Counsel","Flagship Studios","steve_goldstein.jpg"],
	[48,"Steven Davis","CEO","IT GlobalSecure Inc.","steven_davis.jpg"],
	[49,"Steven Wade","Public Relations Director","Aeria Games and Entertainment","steve_wade.jpg"],
	[50,"Sue Bohle","President","The Bohle Company","sue_bohle.jpg"],
	[52,"Tony Park","Vice President","The9","tony_park.jpg"],
	[54,"W. Joseph Price","Attorney","Kelley Drye Collier Shannon","w_joseph_price.jpg"],
	[56,"Yoav Tzruya","Chief Operating Officer","Exent Technologies","yoav-tzruya.jpg"],
	[57,"Zhan Ye","President","GameVision","zhan_ye.jpg"],
	[58,"Zsolt Mathe","Software Design Engineer","Microsoft","zsolt_mathe.jpg"],
	[59,"Bill Fulton","Game Designer","Microsoft","bill_fulton.jpg"],
	[60,"Kirk A. Soderquist","Partner","Perkins Coie LLP","kirk_soderquist.jpg"],
	[61,"Don McGowan","Attorney","Microsoft","don_mcgowan.jpg"],
	[62,"Brian Robbins","Executive Producer and Gaming Evangelist","Fuel Industries","brian_robbins.jpg"],
	[65,"Michael Goodman","Director, Digital Entertainment","Yankee Group","michael_goodman.jpg"],
	[67,"Alan Crosby","Director, Global Community Relations","Sony Online Entertainment","alan_crosby.jpg"],
	[70,"Charles Manning","President/CEO","PLAYXPERT","charles_manning.jpg"],
	[71,"Geoffrey “GZ” Zatkin","Director and Co-Founder","EEDAR (Electronic Entertainment Design and Research)","geoffrey_zatkin.jpg"],
	[72,"Alexander Macris","President & CEO","Themis Group, Inc.","alexander_macris.jpg"],
	[74,"Nicole Lazzaro","President","XEODesign, Inc.","nicole_lazzaro.jpg"],
	[86,"Charles Merrin","Vice President, RealArcade","RealNetworks, Inc.","charles_merrin.jpg"],
	[75,"Christian Force","Director of Engineering","+7 Systems","christian_force.jpg"],
	[81,"Erin Turner","Senior Director, Web Services & Publishing","Trion World Network","erin_turner.jpg"],
	[82,"Nathaniel Bogan","Director of Research and Development","+7 Systems","nathaniel_bogan.jpg"],
	[83,"Daniel Ostenso","Associate Professor","Illinois Institute of Art – Chicago","daniel_ostenso.jpg"],
	[84,"David Lakritz","President & CEO","Language Automation, Inc.","david_lakritz.jpg"],
	[87,"George Dolbier","CTO","IBM Games and Interactive Entertainment","george_dolbier.jpg"],
	[88,"James Gwertzman","Director of Business Development","PopCap Games","james_gwertzman.jpg"],
	[90,"Erik Bethke","Founder & CEO","GoPets Ltd.","erik_bethke.jpg"],
	[92,"Won Il Suh","Vice President","Neowiz","won_il_suh.jpg"],
	[93,"Brett Close","President & CEO","38 Studios","brett_close.jpg"],
];
fadeSrcDir = "speakers/thumbs/";

function RandomInt( range )
{
	return Math.floor(Math.random() * range);
}

function RandomSpeaker()
{
	return fadeData[RandomInt(fadeData.length)];
}

function Shuffle( a )
{
	for ( i = 0; i < a.length; ++i )
	{
		j = RandomInt(a.length)
		t = a[i];
		a[i] = a[j];
		a[j] = t
	}
}

function StartSpeakerFader(id, index)
{
	ImageFaderBegin(id, fadeSrcDir + speakerData[index][4], speakerData[index][1] + ', ' + speakerData[index][3], 'http://www.ogdc2007.com/speaker.php?id=' + speakerData[index][0], 500, 20);
}


function StartTestFader()
{
	Shuffle(speakerData);
	for ( i = 0; i < 5; ++i )
	{
		setTimeout('StartSpeakerFader("fader' + (i+1).toString() + '", ' + i + ')', i * 200);
	}
	setTimeout('StartTestFader()', 10000);
}

setTimeout(StartTestFader, 0);
  
