// Pega os parāmetros da URL (by Fermads)
function getParser(_szURL)
{
	var d=_szURL.substring(_szURL.indexOf("?")+1);
	var c=v=new Array();
	c=d.split("&");
	for(i=0;i<c.length&&c.length>0;i++) 
	{
		v=c[i].split("=");
		if(v.length>1)eval(v[0]+"='"+v[1]+"'");
	}
}
getParser(location.href);

var szSWF = "http://flash.uol.com.br/player/player.swf";

var showFlashVideo = function(szLocal, szVideo, szVideoSource, szImage,_szWidth,_szHeight,_bAutoStart,szID,szReferrer,_szPath)
{
	switch(szLocal)
	{
		
		case 'home': szSWF = "http://flash.uol.com.br/player/player_homes.swf";
								break;

		case 'home_criancas': szSWF = "http://flash.uol.com.br/player/player_home_criancas.swf";
								break;

		case 'home_uol': szSWF = "http://flash.uol.com.br/player/player_home_uol.swf";
								break;
	}
	
	szWidth = (_szWidth == undefined) ? szWidth : _szWidth;
	szHeight = (_szHeight == undefined) ? szHeight : _szHeight;
	szPath = (_szPath == undefined) ? "" : _szPath;
	bAutoStart = (_bAutoStart == "") ? 'true' : _bAutoStart.toLowerCase();
	szSWF = (szSWF == "") ? 'http://flash.uol.com.br/player/player.swf' : szSWF;
	szVideo = (szVideo == "") ? 'http://flash.uol.com.br/player/videos/noflash.flv' : szVideo;
	szImage = (szImage == "") ? 'http://n.i.uol.com.br/tvuolvinheta.jpg' : szImage;
	
	FLASH = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+szWidth+'" height="'+szHeight+'" id="uolplayer" align="middle">';
	FLASH += '<param name="movie" value="'+szSWF+'?vd1='+szVideo+'&img='+szImage+'&autostart='+bAutoStart+'&videosource='+szVideoSource+'&ref='+szReferrer+'&path='+szPath+'" />';
	FLASH += '<param name="quality" value="high" />';
 	FLASH += '<param name="allowScriptAccess" value="always" />';
 	FLASH += '<param name="wmode" value="transparent" />';
	FLASH += '<embed src="'+szSWF+'?vd1='+szVideo+'&img='+szImage+'&autostart='+bAutoStart+'&videosource='+szVideoSource+'&ref='+szReferrer+'&path='+szPath+'" quality="high" AllowScriptAccess="always" width="'+szWidth+'" height="'+szHeight+'" name="uolplayer" align="middle"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getplayer" wmode="transparent" />';
	FLASH += '</object>';
	
	$(szID).innerHTML = FLASH;
}


var $ = function(id) 
{
	if(!arguments[1]) return document.getElementById(id);
	else document.getElementById(id).style[arguments[1]] = arguments[2];
}	
