

function renderVideo(option){

	switch(option){
	
	case 1:
	var stream = "http://mlg-live-stream-a.wm.llnwd.net/mlg_live_stream_a";
	break;
	
	case 2:
	var stream = "http://mlg-live-stream-b.wm.llnwd.net/mlg_live_stream_b ";
	break;
	
	case 3:
	var stream = "http://mlg-live-stream-c.wm.llnwd.net/mlg_live_stream_c";
	break;
	
	}
	
	
	videoBodyId = document.getElementById('MLGVIDEOBODY_PLAYER');
	videoBodyId.innerHTML = '<OBJECT id="mediaPlayer" width="600" height="400" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"> <param name="fileName" value="'+stream+'"> <param name="animationatStart" value="true"><param name="transparentatStart" value="false"><param name="autoStart" value="true"><param name="showControls" value="true"><param name="stretchToFit" value="true"> <param name="loop" value="true"> <EMBED type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="0" bgcolor="darkblue" showcontrols="1" showtracker="0" stretchToFit="true" showdisplay="0" showstatusbar="1" videoborder3d="0" width="600" height="400" src="'+stream+'" autostart="true" designtimesp="5311" loop="true"></EMBED></OBJECT>';
}


function updateButton(option,setting){

	renderedOption = (option == 1) ? "halo" : (option == 2) ? "gears" : "wow"; 
	buttonId = document.getElementById(option);
	
	switch(setting){
		case 'off':
			buttonId.src = "http://www.mlgpro.com/thirdparty/liveEmbed/_images/_clickPlaying/"+renderedOption+".gif"
		break;
		
		case 'on':
			buttonId.src = "http://www.mlgpro.com/thirdparty/liveEmbed/_images/_nowPlaying/"+renderedOption+".gif"
		break;
	}

}



function updateLinks(option){

	halo = (option != 1) ?  updateButton(1,'off') :  updateButton(1,'on') ;
	gears = (option != 2) ?  updateButton(2,'off') :  updateButton(2,'on') ;
	wow = (option != 3) ?  updateButton(3,'off') :  updateButton(3,'on') ;
}


function toggle(option){

	switch(option){
	
		case 1:
			renderVideo(1);
		break;
		
		case 2:
			renderVideo(2);
		break;
		
		case 3:
			renderVideo(3);
		break;
	
	}
	
	updateLinks(option);

}

document.write('<table cellspacing="0" cellpadding="0" border="0" style="background-color:#000;width:600px;">');
document.write('<tr>');
document.write('<td valign="top">');
document.write('<a href="http://www.mlgpro.com" target="_blank">');
document.write('<img src="http://www.mlgpro.com/thirdparty/liveEmbed/_images/mlg_orland_header_1.gif" alt="MLG Pro Circuit Orlando" border="0"></a>');
document.write('</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td style="font-family:verdana;font-size:10px;color:#FFF;padding:5px;background-image:url(http://www.mlgpro.com/thirdparty/liveEmbed/_images/mlg_orland_header_2.gif); background-repeat:repeat-none; height:65px;" valign="top">');
document.write('<div style=\'width:95%;\' align="center">');
document.write('					MLG Orlando is about to begin and you can see it all streamed live right here! The stream will go live at 5:00 p.m. ET Friday and will feature the world\'s best competitors facing off in Halo 3, World of Warcraft, Gears of War and Rainbow Six Vegas 2!For a full event schedule for each game, <a href=\'#\' style=\'color:#00c3ff;text-decoration:none;\'>click here</a>.					');
document.write('</div>');
document.write('</td>');
document.write('</tr>');
document.write('<tr><td><img src=\'_images/_videoOffline/2.jpg\'></td></tr>');
document.write('<tr>');
document.write('<td valign="top">');
document.write('<a href="http://www.mlgpro.com" target="_blank">');
document.write('<img src="http://www.mlgpro.com/thirdparty/liveEmbed/_images/mlg_orland_header_3.gif" alt="Latest From MLGPRO.com, Click here for more." border="0">');
document.write('</a>');
document.write('</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td style="background-image:url(http://www.mlgpro.com/thirdparty/liveEmbed/_images/mlg_orland_header_4.gif);background-repeat:repeat-none; height:169px;" valign="top">');
document.write('<table cellspacing="0" cellpadding="0"><tr><td valign="top"><ul style="list-style-type:square;">');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224736" style="color:#FFF;text-decoration:none;">MLG Pro Player Q&A: Halo 3 Question</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224678" style="color:#FFF;text-decoration:none;">MLG Pro Player Questionnaire: Gears</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224675" style="color:#FFF;text-decoration:none;">MLG Pro Player Q&A: Rainbow Questio</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224670" style="color:#FFF;text-decoration:none;">Gears of War Open Bracket Round 3 U</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224668" style="color:#FFF;text-decoration:none;">Gandhi and Team Dominate, CYP Avoid</a></li>');
document.write('</ul></td><td valign="top"><ul style="list-style-type:square;">');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224667" style="color:#FFF;text-decoration:none;">Str8 Rippin & Breaking Point Scrimm</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224662" style="color:#FFF;text-decoration:none;">Gears Open Bracket Update - Early R</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224654" style="color:#FFF;text-decoration:none;">MLG Pro Player Q&A: Halo 3 Question</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224653" style="color:#FFF;text-decoration:none;">MLG Trivia Round 3</a></li>');
document.write('<li style="margin-top:14px;color:#FFF;font-family:verdana;font-size:10px;"><a target="_blank" href="http://www.mlgpro.com/?q=node/224649" style="color:#FFF;text-decoration:none;">MLG Pro Player Q&A: Gears Question </a></li>');
document.write('</ul></td></tr></table>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
