function GmcPlay(url) {	
         window.open(url,'GMC');
}


function gmcPop() {	
         window.open('http://gmc.globo.com/GMC/0,,2465-MC30,00.html','GMC');
}

function audioPlay(url) {
         window.open(url,"GloboRadio","width=580,height=235,scrollbars=NO");
}

function readCookie(name)
{   
	var nameEQ = name + "=";
         var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') 
		{
			c = c.substring(1,c.length);
		}
      		if (c.indexOf(nameEQ) == 0) 
   		{
   			return unescape(c.substring(nameEQ.length,c.length));
   		}
	}
	return null;
}

/**
 * @author Globo.com - Tecnologia
 *
 * Função utilizada para criar um cookie.
 *
 * @param name o nome do cookie
 * @param value o conteúdo do cookie
 * @param hours o número de horas pelo qual o cookie deve permanecer válido
 * @param path o path do cookie
 */
function createCookie(name,value,hours,path)
{
	if (hours)
	{
		var date = new Date();
		date.setTime(date.getTime()+(hours*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else 
	{
		var expires = "";
	}
	document.cookie = name+"="+escape(value)+expires+"; path="+path;
}

/**
 * @author Globo.com - Tecnologia
 *
 * Função utilizada para apagar um cookie.
 * Se for Mac, seta a expiração para um tempo curto, caso contrário seta a expiração imediata.
 *
 * @param name o nome do cookie a ser apagado.
 */
function eraseCookie(name,path)
{
	var mac = (navigator.appVersion.indexOf("Mac") != -1) ? true : false;
	if (mac)
	{
		createCookie(name,"",0.001,path);
 	}
	else
	{
		createCookie(name,"",-1,path);
	}
}// Inicio Flash Generica
function AC_AddExtension(src, ext) {
 if (src.indexOf('?') != -1) return src.replace(/\?/, ext+'?'); 
 else return src + ext;
}
 
function AC_Generateobj(objAttrs, params, embedAttrs) { 
 var str = '<object ';
 for (var i in objAttrs) str += i + '="' + objAttrs[i] + '" ';
 str += '>';
 for (var i in params) str += '<param name="' + i + '" value="' + params[i] + '" /> ';
 str += '<embed ';
 for (var i in embedAttrs) str += i + '="' + embedAttrs[i] + '" ';
 str += ' ></embed></object>';
 document.write(str);
}
 
function AC_FL_RunContent(){
 var ret = AC_GetArgs ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash" );
 AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
 
function AC_SW_RunContent(){
 var ret = AC_GetArgs ( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000", null );
 AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
 
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
 var ret = new Object();
 ret.embedAttrs = new Object();
 ret.params = new Object();
 ret.objAttrs = new Object();
 for (var i=0; i < args.length; i=i+2){
  var currArg = args[i].toLowerCase();    
  switch (currArg){ 
   case "classid":
    break;
   case "pluginspage":
      ret.embedAttrs[args[i]] = args[i+1];
      break;
   case "src":
   case "movie": 
      args[i+1] = AC_AddExtension(args[i+1], ext);
      ret.embedAttrs["src"] = args[i+1];
      ret.params[srcParamName] = args[i+1];
      break;
   case "onafterupdate": case "onbeforeupdate": case "onblur": case "oncellchange": case "onclick":
   case "ondblClick": case "ondrag": case "ondragend": case "ondragenter": case "ondragleave":
   case "ondragover": case "ondrop": case "onfinish": case "onfocus": case "onhelp":
    case "onmousedown": case "onmouseup": case "onmouseover": case "onmousemove":
   case "onmouseout": case "onkeypress": case "onkeydown": case "onkeyup": case "onload":
   case "onlosecapture": case "onpropertychange": case "onreadystatechange": case "onrowsdelete":
   case "onrowenter": case "onrowexit": case "onrowsinserted": case "onstart": case "onscroll":
   case "onbeforeeditfocus": case "onactivate": case "onbeforedeactivate": case "ondeactivate":
   case "type": case "codebase":
    ret.objAttrs[args[i]] = args[i+1];
    break;
   case "width": case "height": case "align": case "vspace": case "hspace": case "class": 
   case "title": case "accesskey": case "name": case "id": case "tabindex":
    ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
    break;
   default:
    ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
  }
 }
 ret.objAttrs["classid"] = classid;
 if (mimeType) ret.embedAttrs["type"] = mimeType;
 return ret;
}
 
function glbFO(params) {
 
 if(!params.flashvars) params.flashvars = '';
 if(!params.version) params.version = 7;
 if(!params.id) params.id = 'flash' + new Date().getTime();
 if(!params.quality) params.quality = 'high';
 if(!params.bgcolor) params.bgcolor = '#ffffff';
 if(!params.wmode) params.wmode = 'window';
 if(!params.allowScriptAccess) params.allowScriptAccess = 'sameDomain';
 
 if(params.src.indexOf('.swf') > -1) params.src = params.src.split('.swf').join('');
 
 AC_FL_RunContent(
  'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + params.version + ',0,0,0',
  'width', params.width,
  'height', params.height,
  'src', params.src,
  'movie', params.src,
  'quality', params.quality,
  'bgcolor', params.bgcolor,
  'wmode', params.wmode,
  'id', params.id,
  'name', params.id,
  'allowScriptAccess', params.allowScriptAccess,
  'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
  'flashvars', params.flashvars
 );
 
}
<!--funcao GENERICA comentada pois estava quebrando todos os sites-->
/*
OBS:isto tem ser uma function. senao fica gerando no topo de todas as paginas.
data = new Date();
anoAtual = data.getFullYear();
document.write("<div class=copyright><span>©Copyright" + anoAtual + " Globo Comunicação e Participações S.A. <a href=http://www.globo.com/Globo.com/homev6/0,,PL0-0,00-POLITICA+DE+PRIVACIDADE.html> Política de Privacidade</a></span></div> "	); 
*/
/* ======================================================================================================== */
/* CLASS validateForm                                                                                       */
/* ======================================================================================================== */
function validateForm(formId, formIsAttachEvent, formIsDisplayAlert)
{
	/* ================================================================================================ */
	/* GLOBALS VARIABLES                                                                                */
	/* ================================================================================================ */
	var objForm = undefined;

	/* ================================================================================================ */
	/* PROPERTIES                                                                                       */
	/* ================================================================================================ */
	this.form = function()
	{
		this.id = undefined;
		this.isAttachEvent = undefined;
		this.isDisplayAlert = undefined;
	}

	this.form.id = formId;
	this.form.isAttachEvent = formIsAttachEvent;
	this.form.isDisplayAlert = formIsDisplayAlert;

	/* ================================================================================================ */
	/* METHODS                                                                                          */
	/* ================================================================================================ */
	this.init = init;
	this.addElement = addElement;
	this.validate = validate;
	this.showMessage = showMessage;
	this.validateEmail = validateEmail;

	/* ================================================================================================ */
	/* INITIALIZE                                                                                       */
	/* ================================================================================================ */
	if (this.form.isAttachEvent == undefined)
	{
		this.form.isAttachEvent = true;
	}

	if (this.form.isDisplayAlert == undefined)
	{
		this.form.isDisplayAlert = true;
	}

	if (this.form.id != undefined)
	{
		this.init();
	}

	/* ================================================================================================ */
	/* METHOD init()                                                                                    */
	/* ================================================================================================ */
	function init()
	{
		var formId = this.form.id;
		var formIsAttachEvent = this.form.isAttachEvent;
		var formIsDisplayAlert = this.form.isDisplayAlert;

		this.form = document.getElementById(formId);
		this.form.isAttachEvent = formIsAttachEvent;
		this.form.isDisplayAlert = formIsDisplayAlert;
		for (iForm=0; iForm<this.form.elements.length; iForm++)
		{
			this.addElement(this.form.elements[iForm]);
		}

		if (this.form.isAttachEvent)
		{
			if (window.addEventListener)
			{
				this.form.onsubmit = validate;
			}
			else
			{
				this.form.attachEvent("onsubmit", validate);
			}
		}
		objForm = this.form;
	}

	/* ================================================================================================ */
	/* METHOD addElement()                                                                              */
	/* ================================================================================================ */
	function addElement(objElement)
	{
		objElement.label = objElement.id.toUpperCase();
		objElement.isObrigatory = false;
		objElement.message = undefined;
		if ((objElement.type == "text") || (objElement.type == "password") || (objElement.type == "textarea"))
		{
			objElement.isConfirm = false;
			objElement.confirmId = "";
			objElement.minLength = 0;
			objElement.validateType = "normal";
		}
	}

	/* ================================================================================================ */
	/* METHOD validate()                                                                                */
	/* ================================================================================================ */
	function validate()
	{
		var blnIsError = false;
		for (iForm=0; iForm<objForm.elements.length; iForm++)
		{
			with (objForm.elements[iForm])
			{
				message = undefined;
				if (!disabled)
				{
					if ((isObrigatory) && (value == ""))
					{
						message = "Campo obrigatório.";
						blnIsError = true;
						continue;
					}

					if (type == "checkbox")
					{
						if ((isObrigatory) && (checked == false))
						{
							message = "Campo obrigatório.";
							blnIsError = true;
							continue;
						}
					}

					if ((type == "text") || (type == "password"))
					{
						if ((isConfirm) && (value != objForm[confirmId].value))
						{
							message = "Confirmação incorreta.";
							blnIsError = true;
							continue;
						}

						if ((minLength == maxLength) && (value.length < maxLength))
						{
							message = "Deve conter " + maxLength + " digitos.";
							blnIsError = true;
							continue;
						}

						if ((minLength > 0) && (minLength < maxLength) && ((value.length < minLength) || (value.length > maxLength)))
						{
							message = "Deve conter de " + minLength + " a " + maxLength +  " digitos.";
							blnIsError = true;
							continue;
						}

						if (validateType != "normal")
						{
							switch (validateType) {
							case "email" :
								if (!validateEmail(value))
								{
									message = "E-mail inválido.";
									blnIsError = true;
								}
								break;

							case "date" :
								if (!validateDate(value))
								{
									message = "Data inválida.";
									blnIsError = true;
								}
								break;

							case "cpf" :
								if (!validateCpf(value))
								{
									message = "CPF inválido.";
									blnIsError = true;
								}
								break;

							case "cnpj" :
								if (!validateCnpj(value))
								{
									message = "CNPJ inválido.";
									blnIsError = true;
								}
								break;

							case "codigoAssinatura" :
								if (!validateCodigoAssinatura(value))
								{
									message = "Código de assinatura inválido.";
									blnIsError = true;
								}
								break;
							}
						}
					}
				}
			}
		}

		showMessage();
		if (blnIsError)
		{
			return false;
		}
		else
		{
			return true;
		}
	}

	/* ================================================================================================ */
	/* METHOD showMessage()                                                                             */
	/* ================================================================================================ */
	function showMessage(strMessage)
	{
		if (strMessage == undefined)
		{
			var strMessage = "";
		}

		var iError = 0;
		for (iForm=0; iForm<objForm.elements.length; iForm++)
		{
			var labelElements = document.getElementsByTagName("label");
			for (var iLabel=0; iLabel<labelElements.length; iLabel++)
			{
				if (labelElements[iLabel].htmlFor == objForm.elements[iForm].id)
				{
					var labelElement = labelElements[iLabel];
					var labelClassName = new String(labelElement.className);
					labelElement.className = labelClassName.replace("labelError", "");
					break;
				}
			}

			var inputClassName = new String(objForm.elements[iForm].className);
			objForm.elements[iForm].className = inputClassName.replace("inputError", "");
			if (objForm.elements[iForm].message != undefined)
			{
				labelElement.className += " labelError";
				objForm.elements[iForm].className += " inputError";
				iError++;

				if (objForm.isDisplayAlert)
				{
					strMessage += objForm.elements[iForm].label + ": " + objForm.elements[iForm].message + "\n";
				}
				else
				{
					strMessage += "<li><strong>" + objForm.elements[iForm].label + "</strong>: " + objForm.elements[iForm].message + "</li>";
				}
			}
		}

		if (objForm.isDisplayAlert)
		{
			if (iError > 0)
			{
				var strMessageAlert = "ATENÇÃO!\n";
				strMessageAlert += "A validação do formulário encontrou o(s) seguinte(s) erro(s),      \n";
				strMessageAlert += "por favor, verifique e corrija o(s) campo(s) em destaque:     \n\n";
				strMessageAlert += strMessage + "\n";
				window.alert(strMessageAlert);
			//}
			//else
			//{
			//	var strMessageAlert = strMessage;
			}

		}
		else
		{
			if (iError > 0)
			{
				var strDisplay = "block";
				var strMessageHTML = "<div><p><strong>ATENÇÃO!</strong><br />";
				strMessageHTML += "A validação do formulário encontrou o(s) seguinte(s) erro(s), ";
				strMessageHTML += "por favor, verifique e corrija o(s) campo(s) em destaque:</p>";
				strMessageHTML += "<ul>" + strMessage + "</ul></div>";
			}
			else
			{
				if (strMessage.length > 0)
				{
					var strDisplay = "block";
					var strMessageHTML = "<div><strong>ATENÇÃO!</strong><br />";
					strMessageHTML += strMessage + "</div>";
				}
				else
				{
					var strDisplay = "none";
					var strMessageHTML = ""
				}
			}
			var tagDisplayMessage = document.getElementById("mensagem" + objForm.id.substring(4, objForm.id.length));
			tagDisplayMessage.innerHTML = strMessageHTML;
			tagDisplayMessage.style.display = strDisplay;
		}
	}

/* ==================================================================================================== */
/* FUNCTION detectCssUserAgent                                                                          */
/* ==================================================================================================== */

function detectCssUserAgent()
{
	var userAgent = navigator.userAgent.toLowerCase();
	var arrBrowser = new Array("opera","msie","safari","webkit","firefox","netscape","mozilla","gecko");
	var arrOSystem = new Array("win","mac","linux","x11");
	var browser, version, oSystem = "";

	for (var iBrowser=0; iBrowser<arrBrowser.length; iBrowser++)
	{
		var objRegExp = new RegExp(arrBrowser[iBrowser] + ".\\d{1,}(.\\d{1,})*");
		if (objRegExp.test(userAgent))
		{
			browser = arrBrowser[iBrowser];
			version = (objRegExp.exec(userAgent)[0].replace(/[\.]/g,"_")).replace(/[\s\/]/g,"-");
			if ((browser == "firefox") || (browser == "netscape") || (browser == "mozilla"))
			{
				browser = "gecko";
			}

			if (browser == "safari")
			{
				browser = "webkit";
			}
			break;
		}
	}

	for (var iOSystem=0; iOSystem<arrOSystem.length; iOSystem++)
	{
		if (userAgent.indexOf(arrOSystem[iOSystem]) > -1)
		{
			oSystem = arrOSystem[iOSystem];
			if (oSystem == "x11")
			{
				oSystem = "linux";
			}
			break;
		}
	}

	var tagHtml = document.getElementsByTagName("html")[0];
	tagHtml.className += oSystem + " " + browser + " " + version;
}

/* ==================================================================================================== */
/* CALL detectCssUserAgent                                                                              */
/* ==================================================================================================== */

detectCssUserAgent();	/* ================================================================================================ */
	/* FUNCTION validateEmail()                                                                         */
	/* ================================================================================================ */
	function validateEmail(strValue)
	{
		var objRegExp = /^[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
		return objRegExp.test(strValue);
	}
	
	

	/* ================================================================================================ */
	/* FUNCTION validateDate()                                                                          */
	/* ================================================================================================ */
	function validateDate(strValue)
	{
		var objRegExp = /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/
		if (!objRegExp.test(strValue))
		{
			return false;
		}

		var strValue = strValue.match(objRegExp);
		var day = parseInt(strValue[1]);
		var month = parseInt(strValue[2]);
		var year = parseInt(strValue[3]);

		if (((day < 1) || (day > 31)) && ((month < 1) || (month > 12)))
		{
			return false;
		}

		if ((day == 31) && ((month == 2) || (month == 4) || (month == 6) || (month == 9) || (month == 11)))
		{
			return false;
		}

		if ((day == 30) && (month == 2))
		{
			return false;
		}

		if ((day == 29) && (month == 2) && ((year % 4) != 0))
		{
			return false;
		}

		if ((year < 1900) || (year > 2100))
		{
		  	return false;
		}
		return true;
	}

	/* ================================================================================================ */
	/* FUNCTION validateCpf()                                                                           */
	/* ================================================================================================ */
	function validateCpf(strValue)
	{
		var intModCpf = 11 - strValue.length;
		for (var iValue=0; iValue<intModCpf; iValue++)
		{
			strValue = "0" + strValue;
		}

		var objRegExp = /^(\d{11})$/
		if (!objRegExp.test(strValue))
		{
			return false;
		}

		var qtdCharRepeat = 0;
		for (iCpf=0; iCpf<strValue.length; iCpf++)
		{
			if (strValue.charAt(0) == strValue.charAt(iCpf))
			{
				qtdCharRepeat++;
			}
		}

		if (qtdCharRepeat == 11)
		{
			return false;
		}

		for (iDV=0; iDV<2; iDV++)
		{
			var intSum = 0;
			for (iCpf=0; iCpf<(9 + iDV); iCpf++)
			{
				intSum += parseInt(strValue.charAt(iCpf)) * ((10 + iDV) - iCpf);
			}

			var intMod = 11 - (intSum % 11);
			if ((intMod == 10) || (intMod == 11))
			{
				intMod = 0;
			}

			if (intMod != parseInt(strValue.charAt((9 + iDV))))
			{
				return false;
			}
		}
		return true;
	}

	/* ================================================================================================ */
	/* FUNCTION validateCnpj()                                                                          */
	/* ================================================================================================ */
	function validateCnpj(strValue)
	{
		var objRegExp = /^(\d{14})$/
		if (!objRegExp.test(strValue))
		{
			return false;
		}

		for (iDV=0; iDV<2; iDV++)
		{
			var intSum = 0;
			var intMult = 5 + iDV;
			for (iCnpj=0; iCnpj<(12 + iDV); iCnpj++)
			{
				intSum += parseInt(strValue.charAt(iCnpj)) * intMult;
				intMult--;
				if (intMult == 1) {
					intMult = 9;
				}
			}

			var intMod = intSum % 11;
			var strMod = new String(intMod);
			if (strMod.indexOf(".") >= 0) {
				intMod = parseInt(strMod.substring(0, strMod.indexOf(".")));
			}

			if (intMod < 2) {
				intDV = 0;
			} else {
				intDV = 11 - intMod;
			}

			if (strValue.charAt((12 + iDV)) != intDV) {
				return false;
			}
		}
		return true;
	}

	/* ================================================================================================ */
	/* FUNCTION validateCodigoAssinatura()                                                              */
	/* ================================================================================================ */
	function validateCodigoAssinatura(strValue)
	{
		var strValue = new String(strValue);
		for (iCA=strValue.length; iCA<9; iCA++)
		{
			strValue = "0" + strValue;
		}

		var intSum = 0;
		var intMult = 2;
		for (iCA=0; iCA<7; iCA++)
		{
			intSum += parseInt(strValue.charAt(iCA)) * intMult;
			intMult--;
			if (intMult == 1)
			{
				intMult = 7;
			}
		}

		var intMod = intSum % 11;
		var intDV = 11 - intMod;
		if (intDV == 10)
		{
			intDV = 0;
		}
		else
		{
			if (intDV == 11)
			{
				intDV = 1;
			}
		}

		if (parseInt(strValue.charAt(8)) != intDV)
		{
			return false;
		}
		return true;
	}
}/* ==================================================================================================== */
/* TROCA O STYLE DO CAMPO BUSCA                                                                         */
/* ==================================================================================================== */

function trocaStyleCampoBusca( elementInput, elementStyle )
{
	if( elementInput.value == "" )
	{
		if( elementStyle.backgroundColor )
		{
			elementInput.style.backgroundColor = elementStyle.backgroundColor;
		}

		if( elementStyle.backgroundImage )
		{
			elementInput.style.backgroundImage = "url(" + elementStyle.backgroundImage + ")";
		}

		if( elementStyle.borderColor )
		{
			elementInput.style.borderColor = elementStyle.borderColor;
		}
	}
}

/* ==================================================================================================== */
/* FUNCTION formatLabel                                                                                 */
/* ==================================================================================================== */

function formatLabel(evt)
{
	if (evt.target)
	{
		element = evt.target;
	}
	else
	{
		element = evt.srcElement;
	}

	switch (evt.type)
	{
		case "mouseover" :
			element.style.textDecoration = "underline";
			break;

		case "mouseout" :
			element.style.textDecoration = "none";
			break;
	}
}

/* ==================================================================================================== */
/* FUNCTION changeFontSize                                                                              */
/* ==================================================================================================== */

var fontSize = 1.1;
function changeFontSize(symbol) {
  if (symbol == "+") {
    fontSize += 0.1;
  } else {
    fontSize -= 0.1;
  }
  objDiv = document.getElementById("article");
  objDiv.style.fontSize = fontSize + "em";
}

/* ==================================================================================================== */
/* SUBMIT SITES                                                                                         */
/* ==================================================================================================== */

function submitSites(url)
{
	if (url.length > 0)
	{
		window.open(url);
	}
}

/* ==================================================================================================== */
/* SELECT QUIZ OPTION                                                                                   */
/* ==================================================================================================== */

function selectQuizOption(optionIndex, quizId)
{
	var quizOptions = document.getElementById("quizOptions" + quizId);
        quizOptions = quizOptions.form["quizOptions" + quizId];

	for (var i=0; i<quizOptions.length; i++)
	{
		if (i == optionIndex)
		{
			quizOptions[optionIndex].checked = true;
			return false;
		}
	}
}

/* ==================================================================================================== */
/* FUNCTION openPassword                                                                                */
/* ==================================================================================================== */

function openPassword(url)
{
	window.open(url, "popupPassword", "toolbar=no, location=no, status=no, menubar=no, resizable=no, width=417, height=500");
}

/* ==================================================================================================== */
/* FUNCTION openGallery                                                                                 */
/* ==================================================================================================== */

function openGallery(url)
{
	window.open(url, "popupGalery", "toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, width=730, height=535");
}

/* ==================================================================================================== */
/* FUNCTION openCommentaryForm                                                                          */
/* ==================================================================================================== */

function openCommentaryForm(url)
{
	window.open(url, "popupCommentary", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=417, height=430");
}

/* ==================================================================================================== */
/* FUNCTION openCommentaryList                                                                          */
/* ==================================================================================================== */

function openCommentaryList(url)
{
	window.open(url, "popupCommentaryList", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=555, height=430");
}

/* ==================================================================================================== */
/* FUNCTION openSendEmail                                                                               */
/* ==================================================================================================== */

function openSendEmail(url)
{
	window.open(url, "popupSendEmail", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=417, height=430");
}

/* ==================================================================================================== */
/* FUNCTION openPrint                                                                                   */
/* ==================================================================================================== */

function openPrint(url)
{
	window.open(url, "popupPrint", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=555, height=430");
}

/* ==================================================================================================== */
/* FUNCTION openLargeCover                                                                              */
/* ==================================================================================================== */

function openLargeCover(url)
{
	window.open(url, "popupLargeCover", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=417, height=646");
}

/* ==================================================================================================== */
/* FUNCTION openContact                                                                                 */
/* ==================================================================================================== */

function openContact(url)
{
	window.open(url, "popupContact", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=417, height=430");
}

/* ==================================================================================================== */
/* FUNCTION openUseTerms                                                                                */
/* ==================================================================================================== */

function openUseTerms(url)
{
	window.open(url, "popupUseTerms", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=417, height=430");
}

/* ==================================================================================================== */
/* FUNCTION openQuiz                                                                                    */
/* ==================================================================================================== */

function openQuiz(url)
{
	window.open(url, "popupQuiz", "toolbar=no, location=no, status=no, menubar=no, resizable=no, scrollbars=yes, width=417, height=430");
}



/* ===== ABRE ABA ===== */

function abreAba( abaElement, abaFiltroId )
{
	var abaGlobal = abaElement.parentNode;
	for( var i = 0; i < abaGlobal.childNodes.length; i ++ )
	{
		if( abaGlobal.childNodes[i].nodeName == "A" )
		{
			if( abaGlobal.childNodes[i].id == abaElement.id )
			{
				abaGlobal.childNodes[i].className = "aba aba-selecionada";
				abaGlobal.childNodes[i].blur();
			}
			else
			{
				abaGlobal.childNodes[i].className = "aba";
			}
		}
	}
	var regexp = /[\d]$/;
	if( typeof( abaFiltroId ) != "undefined" )
	{
		abaGlobal.parentNode.abaCategoria = regexp.exec( abaElement.id );
		abaGlobal.parentNode.abaFiltro = 1;
		if( document.getElementById( abaFiltroId ))
		{
			abreAba( document.getElementById( abaFiltroId ));
		}
	}
	else
	{
		abaGlobal.parentNode.abaFiltro = regexp.exec( abaElement.id );
	}

	abreAbaConteudo( abaElement );
}

/* ===== ABRE ABA CONTEUDO ===== */

function abreAbaConteudo( abaElement )
{
	var abaConteudoGlobal = abaElement.parentNode.parentNode;
	var abaConteudoId = abaConteudoGlobal.abaCategoria + abaConteudoGlobal.abaFiltro;
	for( var i = 0; i < abaConteudoGlobal.childNodes.length; i ++ )
	{
		if(( abaConteudoGlobal.childNodes[i].nodeName == "DIV" ) &&
		   ( abaConteudoGlobal.childNodes[i].className == "boxAbaConteudo" ))
		{
			var regexp = /[\d]{2}$/;
			if( regexp.exec( abaConteudoGlobal.childNodes[i].id ) == abaConteudoId )
			{
				abaConteudoGlobal.childNodes[i].style.display = "block";
			}
			else
			{
				abaConteudoGlobal.childNodes[i].style.display = "none";
			}
		}
	}
}


/* ==================================================================================================== */
/* METHOD setChannelArticle()                                                                           */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.setChannelArticle = function(iChannel, keyword, keywordUrl, session, sessionUrl, date, heading, legend, image, url, target)
{
	this.box.channel[iChannel].mediaType = "article";
	this.box.channel[iChannel].keyword = keyword;
	this.box.channel[iChannel].keywordUrl = keywordUrl;
	this.box.channel[iChannel].session = session;
	this.box.channel[iChannel].sessionUrl = sessionUrl;
	this.box.channel[iChannel].date = date;
	this.box.channel[iChannel].heading = heading;
	this.box.channel[iChannel].legend = legend;
	this.box.channel[iChannel].image = image;
	this.box.channel[iChannel].url = url;
	this.box.channel[iChannel].target = target;
	this.box.channel[iChannel].mediaId = undefined;
	this.box.channel[iChannel].sessionId = undefined;
}

/* ==================================================================================================== */
/* METHOD setChannelOver()                                                                              */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.setChannelOver = function()
{
	this.className += " hover";
}

/* ==================================================================================================== */
/* METHOD setChannelOut()                                                                               */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.setChannelOut = function()
{
	var className = new String(this.className);
	this.className = className.replace("hover","");
}

/* ==================================================================================================== */
/* METHOD setTitleBox()                                                                                 */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.setTitleBox = function(titleBox)
{
	document.getElementById(this.box.id + "Title").firstChild.innerHTML = titleBox;
}

/* ==================================================================================================== */
/* METHOD displayChannel()                                                                              */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.displayChannel = function()
{
	var globalElement = this.parentNode.parentNode.parentNode.parentNode;
	window.clearTimeout(globalElement.channelTimeout);

	this.blur();
	this.className += " selected";
	if (globalElement.channelSelected != undefined)
	{
		var className = new String(this.parentNode.childNodes[globalElement.channelSelected].className);
		this.parentNode.childNodes[globalElement.channelSelected].className = className.replace("selected", "");
	}

	var currentChannel = parseInt(this.id.substring((globalElement.id.length + 8), this.id.length));
	var nextChannel = currentChannel + 1;
	if (nextChannel > (this.parentNode.childNodes.length - 1))
	{
		var nextChannel = 0;
	}

	var htmlKeyword = this.keyword;
	var htmlHeading = this.heading;
	var htmlHeadingTarget = "";
	var htmlLegend = this.legend;
	var htmlImage = this.image;

	switch (this.mediaType)
	{
		case "galleryPhotos" :
			htmlImage = "<div onclick=\"window.open('" + this.url + "', 'popupGallery', 'toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, width=730, height=535');\">";
			htmlImage += "<img src=\"" + this.image + "\" title=\"Clique para exibir\" /></div>";
			break;

		case "videoGMC" :
			htmlImage = "<div onclick=\"mashupEmbed.addVideoEmbed(this,{midiaId:" + this.mediaId + ",sessaoId:" + this.sessionId + ",autoStart:true});\">";
			htmlImage += "<img src=\"" + this.image + "\" title=\"Clique e assista\" /><span> </span></div>";
			break;

		case "videoYoutube" :
			htmlImage = "<div onclick=\"mashupYoutube.addVideoYoutube(this,'" + this.url + "');\">";
			htmlImage += "<img src=\"" + this.image + "\" title=\"Clique e assista\" /><span> </span></div>";
			break;

		case "article" :
			if(this.target != undefined)
			{
				htmlHeadingTarget = "target=\"" + this.target + "\"";
			}
			htmlImage = "<img src=\"" + this.image + "\" />";
			htmlHeading = "<a href=\"" + this.url + "\" title=\"" + this.heading + "\"" + htmlHeadingTarget + ">" + this.heading + "</a>";
			htmlKeyword = "<a href=\"" + this.keywordUrl + "\" title=\"" + this.keyword + "\">" + this.keyword + "</a> | ";
			htmlKeyword += "<a href=\"" + this.sessionUrl + "\" title=\"" + this.session + "\">" + this.session + "</a> | ";
			htmlKeyword += "<span>" + this.date + "</span>";
			break;
	}

	document.getElementById(globalElement.id + "Image").innerHTML = htmlImage;
	document.getElementById(globalElement.id + "Legend").innerHTML = htmlLegend;
	document.getElementById(globalElement.id + "Keyword").innerHTML = htmlKeyword;
	document.getElementById(globalElement.id + "Heading").innerHTML = htmlHeading;
	if (this.keyword == "")
	{
		document.getElementById(globalElement.id + "Keyword").style.display = "none";
	}

	if (this.heading == "")
	{
		document.getElementById(globalElement.id + "Heading").style.display = "none";
	}

	var nextChannelId = this.parentNode.childNodes[nextChannel].id;
	var nextChannelTime = parseInt(globalElement.channelTimeDisplay) * 1000;
	globalElement.channelTimeout = window.setTimeout("document.getElementById('" + nextChannelId + "').click()", nextChannelTime);
	globalElement.channelSelected = currentChannel;
}

/* ==================================================================================================== */
/* METHOD startRotation()                                                                               */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.startRotation = function()
{
	if( this.box.channel[0].mediaType == "article" )
	{
		this.addControl();
	}

	this.box.channel[0].click();
}

/* ==================================================================================================== */
/* METHOD nextChannel()                                                                                 */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.nextChannel = function()
{
	this.blur();
	var globalElement = this.parentNode.parentNode.parentNode.parentNode;
	var menuElement = this.parentNode.previousSibling;
	var nextChannel = 0;

	if( globalElement.channelSelected != undefined ) {
		nextChannel = ( globalElement.channelSelected + 1 );
		if( nextChannel > ( menuElement.childNodes.length - 1 )) {
			nextChannel = 0;
		}
	}

	globalElement.channel[ nextChannel ].click();
}

/* ==================================================================================================== */
/* METHOD previousChannel()                                                                             */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.previousChannel = function()
{
	this.blur();
	var globalElement = this.parentNode.parentNode.parentNode.parentNode;
	var menuElement = this.parentNode.previousSibling;
	var previousChannel = ( menuElement.childNodes.length - 1 );

	if( globalElement.channelSelected != undefined ) {
		previousChannel = ( globalElement.channelSelected - 1 );
		if( previousChannel < 0 ) {
			previousChannel = ( menuElement.childNodes.length - 1 );
		}
	}

	globalElement.channel[ previousChannel ].click();
}

/* ==================================================================================================== */
/* METHOD controlChannel()                                                                              */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.controlChannel = function()
{
	this.blur();
	var globalElement = this.parentNode.parentNode.parentNode.parentNode;
	var menuElement = this.parentNode.previousSibling;
	var nextChannel = 0;

	if( globalElement.channelSelected != undefined )
	{
		var nextChannel = globalElement.channelSelected + 1;
		if( nextChannel > ( this.parentNode.childNodes.length - 1 ))
		{
			nextChannel = 0;
		}
	}

	if( this.title == "Pause" )
	{
		this.title = "Play"
		this.className += " selected"
		window.clearTimeout(globalElement.channelTimeout);
	}
	else if( this.title == "Play")
	{
		this.title = "Pause"
		this.className = this.className.replace("selected", "");
		var nextChannelId = menuElement.childNodes[nextChannel].id;
		var nextChannelTime = parseInt(globalElement.channelTimeDisplay) * 1000;
		globalElement.channelTimeout = window.setTimeout("document.getElementById('" + nextChannelId + "').click()", nextChannelTime);
	}
}
/**
 * @author lpaixao
 */

var d = document;
var secao = 0;
var portal =0;
var canalId=0;
var host='';
var nomeCanal = '';
var temCanal = true;

function makeFloater(Host,session,idCanal){
host = Host;
secao = session;
canalId = idCanal;
var headLoc = d.getElementsByTagName("head").item(0);
var script = d.createElement('script');
script.setAttribute('type','text/javascript');
script.setAttribute('language','javascript');
//script.setAttribute('src','http://assinaturasms.globo.com/Portal/globocelular/js/assinaturaSMS.js');
script.setAttribute('src','http://revistaautoesporte.globo.com/Portal/globocelular/js/assinaturaSMS.js');
headLoc.appendChild(script);
}/* ==================================================================================================== */
/* CLASS EDGBoxChannelRotation() - version 2.0                                                          */
/* ==================================================================================================== */

function EDGBoxChannelRotation(id, titleBox, channelTimeDisplay, addChannelLength)
{
	this.box = new Object();
	this.box.id = id;
	this.box.channelTimeDisplay = channelTimeDisplay;
	this.box.channel = new Array();

	if (this.box.channelTimeDisplay == undefined)
	{
		this.box.channelTimeDisplay = 10;
	}

	if (this.box.id != undefined)
	{
		this.init();
		if (titleBox != undefined)
		{
			this.setTitleBox(titleBox);
		}

		if (addChannelLength != undefined)
		{
			this.addChannel(addChannelLength);
		}
	}
}

/* ==================================================================================================== */
/* METHOD init()                                                                                        */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.init = function()
{
	var htmlBox = "<div class=\"boxChannelGlobal\" id=\"" + this.box.id + "\">";
	htmlBox += "<div class=\"boxChannelHeader\"> </div>";
	htmlBox += "<div class=\"boxChannelBody\">";
	htmlBox += "<div class=\"boxChannelTitle\" id=\"" + this.box.id + "Title\"><span></span>";
	htmlBox += "<div class=\"boxChannelMenu\" id=\"" + this.box.id + "Menu\"></div>";
	htmlBox += "<div class=\"boxChannelControl\" id=\"" + this.box.id + "Control\"></div><br /></div>";
	htmlBox += "<div class=\"boxChannelContent\">";
	htmlBox += "<div class=\"boxChannelImage\" id=\"" + this.box.id + "Image\"></div>";
	htmlBox += "<div class=\"boxChannelBackground\" id=\"" + this.box.id + "Background\"></div>";
	htmlBox += "<div class=\"boxChannelText\" id=\"" + this.box.id + "Text\">";
	htmlBox += "<div class=\"boxChannelKeyword\" id=\"" + this.box.id + "Keyword\"></div>";
	htmlBox += "<div class=\"boxChannelHeading\" id=\"" + this.box.id + "Heading\"></div>";
	htmlBox += "<div class=\"boxChannelLegend\" id=\"" + this.box.id + "Legend\"></div>";
	htmlBox += "</div></div></div>";
	htmlBox += "<div class=\"boxChannelFooter\"> </div></div>";
	document.write(htmlBox);

	var boxElement = document.getElementById(this.box.id);
	boxElement.channelTimeDisplay = this.box.channelTimeDisplay;
	boxElement.channelTimeout;
	boxElement.channelSelected;
	boxElement.channel = this.box.channel;
	this.box = boxElement;

	this.importFile("http://video.globo.com/Portal/gmc4/cda/player/js/glb_gmc4_player_embed_javascript");
	this.importFile("http://video.globo.com/Portal/gmc4/cda/player/css/glb_gmc4_player_embed_mashup.css");
}

/* ==================================================================================================== */
/* METHOD importFile()                                                                                  */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.importFile = function(url)
{
	if (url.substring((url.lastIndexOf(".")+1), url.length) == "css")
	{
		var tagName = "link";
		var type = "text/css";
		var urlPropertie = "href";
		var langPropertie = "rel"
		var langValue = "stylesheet"
	}
	else
	{
		var tagName = "script";
		var type = "text/javascript";
		var urlPropertie = "src";
		var langPropertie = "language"
		var langValue = "javascript"
	}

	var arrElements = document.getElementsByTagName(tagName);
	for (var iElement=0; iElement<arrElements.length; iElement++)
	{
		if (arrElements[iElement][urlPropertie] == url)
		{
			return;
		}
	}

	var newElement = document.createElement(tagName);
	newElement.type = type;
	newElement[urlPropertie] = url;
	newElement[langPropertie] = langValue;

	var headElement = document.getElementsByTagName("head")[0];
	headElement.appendChild(newElement);
}

/* ==================================================================================================== */
/* METHOD addChannel()                                                                                  */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.addChannel = function(addChannelLength)
{
	var channelLength = this.box.channel.length;
	for (var iChannel=channelLength; iChannel<(channelLength+addChannelLength); iChannel++)
	{
		var textNode = document.createTextNode(iChannel + 1);
		var menuElement = document.createElement("button");
		menuElement.id = this.box.id + "MenuItem" + iChannel;
		menuElement.title = "Canal " + (iChannel + 1);
		menuElement.onclick = this.displayChannel;
		menuElement.onmouseover = this.setChannelOver;
		menuElement.onmouseout = this.setChannelOut;
		menuElement.appendChild(textNode);

		var menuContainer = document.getElementById(this.box.id + "Menu");
		menuContainer.appendChild(menuElement);

		this.box.channel[iChannel] = menuContainer.lastChild;
		this.box.channel[iChannel].mediaType;
		this.box.channel[iChannel].keyword;
		this.box.channel[iChannel].keywordUrl;
		this.box.channel[iChannel].session;
		this.box.channel[iChannel].sessionUrl;
		this.box.channel[iChannel].date;
		this.box.channel[iChannel].heading;
		this.box.channel[iChannel].legend;
		this.box.channel[iChannel].image;
		this.box.channel[iChannel].url;
		this.box.channel[iChannel].target;
		this.box.channel[iChannel].mediaId;
		this.box.channel[iChannel].sessionId;
	}
}

/* ==================================================================================================== */
/* METHOD addControl()                                                                                  */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.addControl = function()
{
	var controlContainer = document.getElementById(this.box.id + "Control");

	var controlElement = document.createElement("button");
	controlElement.className = "boxChannelControlPrevious";
	controlElement.id = this.box.id + "ControlPrevious";
	controlElement.title = "Anterior";
	controlElement.onclick = this.previousChannel;
	controlElement.onmouseover = this.setChannelOver;
	controlElement.onmouseout = this.setChannelOut;
	controlContainer.appendChild(controlElement);

	var controlElement = document.createElement("button");
	controlElement.className = "boxChannelControlItem";
	controlElement.id = this.box.id + "ControlItem";
	controlElement.title = "Pause";
	controlElement.onclick = this.controlChannel;
	controlElement.onmouseover = this.setChannelOver;
	controlElement.onmouseout = this.setChannelOut;
	controlContainer.appendChild(controlElement);

	var controlElement = document.createElement("button");
	controlElement.className = "boxChannelControlNext";
	controlElement.id = this.box.id + "ControlNext";
	controlElement.title = "Pr�ximo";
	controlElement.onclick = this.nextChannel;
	controlElement.onmouseover = this.setChannelOver;
	controlElement.onmouseout = this.setChannelOut;
	controlContainer.appendChild(controlElement);
}

/* ==================================================================================================== */
/* METHOD setChannelGalleryPhotos()                                                                     */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.setChannelGalleryPhotos = function(channel, keyword, heading, legend, image, url)
{
	this.box.channel[channel].mediaType = "galleryPhotos";
	this.box.channel[channel].keyword = keyword;
	this.box.channel[channel].heading = heading;
	this.box.channel[channel].legend = legend;
	this.box.channel[channel].image = image;
	this.box.channel[channel].url = url;
	this.box.channel[channel].mediaId = undefined;
	this.box.channel[channel].sessionId = undefined;
}

/* ==================================================================================================== */
/* METHOD setChannelVideoGMC()                                                                          */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.setChannelVideoGMC = function(iChannel, keyword, heading, legend, image, mediaId, sessionId)
{
	this.box.channel[iChannel].mediaType = "videoGMC";
	this.box.channel[iChannel].keyword = keyword;
	this.box.channel[iChannel].heading = heading;
	this.box.channel[iChannel].legend = legend;
	this.box.channel[iChannel].image = image;
	this.box.channel[iChannel].url = undefined;
	this.box.channel[iChannel].mediaId = mediaId;
	this.box.channel[iChannel].sessionId = sessionId;
}

/* ==================================================================================================== */
/* METHOD setChannelVideoYoutobe()                                                                      */
/* ==================================================================================================== */

EDGBoxChannelRotation.prototype.setChannelVideoYoutobe = function(iChannel, keyword, heading, legend, image, url)
{
	this.box.channel[iChannel].mediaType = "videoYoutube";
	this.box.channel[iChannel].keyword = keyword;
	this.box.channel[iChannel].heading = heading;
	this.box.channel[iChannel].legend = legend;
	this.box.channel[iChannel].image = image;
	this.box.channel[iChannel].url = url;
	this.box.channel[iChannel].mediaId = undefined;
	this.box.channel[iChannel].sessionId = undefined;
}

/* =============================================================== */function MashupYoutube()
{
	this.isVideoYoutubeOpen = false;
}

MashupYoutube.prototype.addVideoYoutube = function( q, config )
{
	if( !this.isVideoYoutubeOpen )
	{
		var html = '<a class="close" href="javascript:;" onclick="mashupYoutube.videoClose(this);">';
		html += '<img src="http://video.globo.com/Portal/globonoticias/img/boxBuscaClose.gif" width="15" height="15" alt="fechar" border="0" />';
		html += '</a><h3><img src="http://video.globo.com/Portal/homeglobocom/2006_2/img/gmc_video.gif" /></h3>';

		var divC = document.createElement( 'div' );
		divC.id = 'boxVideoConteudo';
		divC.innerHTML = youtube.createPlayer( config );

		var divT = document.createElement( 'div' );
		divT.id = 'boxVideo';
		divT.className = 'mashupYoutube';
		divT.innerHTML = html;
		divT.style.width = "425px";
		divT.appendChild( divC );
		document.body.appendChild( divT );

		this.move( q, divT, -72, 17 );
		this.isVideoEmbedOpen = true;
	}
}

MashupYoutube.prototype.move = function( target, objMove, offx, offy )
{
	this.target = target;
	this.obj = objMove;
	this.offx = offx;
	this.offy = offy;
	this.obj.style.left = this.moveX( this.offx, this.target ) + "px";
	this.obj.style.top = this.moveY( this.offy, this.target ) + "px";
	return false;
}

MashupYoutube.prototype.moveX = function( x, elem )
{
	if( !document.layers )
	{
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var mac = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = elem;
		var lastOffset = 0;
		while( par )
		{
			if( par.leftMargin && !onWindows ) x += parseInt( par.leftMargin );
			if(( par.offsetLeft != lastOffset ) && par.offsetLeft ) x += parseInt( par.offsetLeft );
			if( par.offsetLeft != 0 ) lastOffset = par.offsetLeft;
			par = mac ? par.parentElement : par.offsetParent;
		}
	}
	else if ( elem.x )
	{
		x += elem.x;		
	}
	return x;
}

MashupYoutube.prototype.moveY = function( y, elem )
{
	if( !document.layers )
	{
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var mac = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = elem;
		var lastOffset = 0;
		while( par )
		{
			if( par.topMargin && !onWindows ) y += parseInt( par.topMargin );
			if(( par.offsetTop != lastOffset ) && par.offsetTop ) y += parseInt( par.offsetTop );
			if( par.offsetTop != 0 ) lastOffset = par.offsetTop;
			par = mac ? par.parentElement : par.offsetParent;
		}
	}
	else if ( elem.y >= 0 )
	{
		y += elem.y;
	}
	return y;
}

MashupYoutube.prototype.videoClose = function( o )
{
	if( this.isVideoEmbedOpen )
	{
		this.isVideoEmbedOpen = false;
		o.parentNode.parentNode.removeChild( o.parentNode );
	}
}

var mashupYoutube = new MashupYoutube();

/**
 * Classe que implementa as funcionalidades para a utilização dos players do YouTube.com
 * @author Márcio Pimentel Espósito [mesposito@edglobo.com.br]
 * @copyright Editora Globo S.A.
 * @package edg.youtube
 * @version 1.1
 */
function YouTube()
{
}
	/**
	 * Método que cria o html do player embed
	 * @author Márcio Pimentel Espósito [mesposito@edglobo.com.br]
	 * @param {String} url
	 * @param {Object} configurations
	 * @return {String} Retorna o html do player embed
	 * @version 1.0
	 */
	YouTube.prototype.createPlayer = function( url, configurations )
	{
		if( this.isUrlEmbed( url ) || this.isUrlSite( url ))
		{
			var width = 425;
			var height = 355;
			var newUrl = url;

			if( this.isUrlSite( newUrl ))
			{
				newUrl = this.toUrlEmbed( url, configurations );
			}

			if( configurations )
			{
				if( configurations.width )
				{
					var width = configurations.width;
				}

				if( configurations.height )
				{
					var height = configurations.height;
				}
			}

			var htmlPlayer = "<object width=\"" + width + "\" height=\"" + height + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">";
			htmlPlayer += "<param name=\"movie\" value=\"" + newUrl + "\"></param>";
			htmlPlayer += "<param name=\"wmode\" value=\"transparent\"></param>";
			htmlPlayer += "<embed src=\"" + newUrl + "\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"" + width + "\" height=\"" + height + "\"></embed>";
			htmlPlayer += "</object>";

			return htmlPlayer;
		}
		else
		{
			throw "Invalid url";
		}
	};


	/**
	 * Método que converte a url do site na url do player embed
	 * @author Marcio Pimentel Esposito [mesposito@edglobo.com.br]
	 * @param {String} url
	 * @param {Object} configurations
	 * @return {String} Retorna a url do player embed
	 * @version 1.0
	 */
	YouTube.prototype.toUrlEmbed = function( url, configurations )
	{
		if( this.isUrlSite( url ))
		{
			var newUrl = "http://www.youtube.com/v/" + this.getVideoIdByUrl( url );

			if ( configurations )
			{
				if( configurations.showRelated )
				{
					newUrl += "&rel=1";
				}
				else
				{
					newUrl += "&rel=0";
				}

				if( configurations.colorDark )
				{
					newUrl += "&color1=0x" + configurations.colorDark;
				}

				if( configurations.colorLight )
				{
					newUrl += "&color2=0x" + configurations.colorLight;
				}

				if( configurations.showBorder )
				{
					newUrl += "&border=1";
				}
			}
			else
			{
					newUrl += "&rel=0";
			}

			return newUrl;
		}
		else
		{
			throw "Invalid url";
		}
	};


	/**
	 * Método que converte a url do player embed na a url do site
	 * @author Marcio Pimentel Esposito [mesposito@edglobo.com.br]
	 * @param {String} url
	 * @return {String} Retorna a url do site
	 * @version 1.0
	 */
	YouTube.prototype.toUrlSite = function( url )
	{
		if( this.isUrlEmbed( url ))
		{
			var newUrl = "http://www.youtube.com/watch?v=" + this.getVideoIdByUrl( url );
			return newUrl;
		}
		else
		{
			throw "Invalid url";
		}
	};


	/**
	 * Método que verifica se a url passada como parâmetro é do player embed
	 * @author Márcio Pimentel Espósito [mesposito@edglobo.com.br]
	 * @param {String} url
	 * @return {Boolean} Retorna true se a url passada como parâmetro for do player embed, se não retorna false
	 * @version 1.1
	 */
	YouTube.prototype.isUrlEmbed = function( url )
	{
		var regexp = /^http:\/\/(www\.)?(\w{2}\.)?youtube\.com\/v\/[\w\-]{11}&rel=[0|1](&color1=0x[\w]{6}&color2=0x[\w]{6})?(&border=[0|1])?/;
		return regexp.test( url );
	};


	/**
	 * Método que verifica se a url passada como parâmetro é do site
	 * @author Márcio Pimentel Espósito [mesposito@edglobo.com.br]
	 * @param {String} url
	 * @return {Boolean} Retorna true se a url passada como parâmetro for do site, se não retorna false
	 * @version 1.1
	 */
	YouTube.prototype.isUrlSite = function( url )
	{
		var regexp = /^http:\/\/(www\.)?(\w{2}\.)?youtube\.com\/watch\?v=[\w\-]{11}/;
		return regexp.test( url );
	};


	/**
	 * Método que retorna o id do vídeo da url passada como parâmetro
	 * @author Márcio Pimentel Espósito [mesposito@edglobo.com.br]
	 * @param {String} url
	 * @return {String} Retorna o id do vídeo
	 * @version 1.1
	 */
	YouTube.prototype.getVideoIdByUrl = function( url )
	{
		if( this.isUrlEmbed( url ) || this.isUrlSite( url ))
		{
			var regexp = /v.[\w\-]{11}/;
			return new String( regexp.exec( url )).substring( 2, 13 );
		}
		else
		{
			throw "Invalid url";
		}
	};


	/**
	 * Instância a classe YouTube
	 */
	var youtube = new YouTube();
 /* FIM JS GENERICO */
