function ObtemData()
{
		var strData, strMonth, strDay, strYear;
		
		dataAtual = new Date();

		strDay = '' + dataAtual.getDate ();
		
		if (strDay.length == 1)
		
			strDay = '0' + strDay;
		
		month = dataAtual.getMonth() + 1;
		
		strMonth = '' + month;
		
		if (strMonth.length == 1)
		
			strMonth = '0' + strMonth;
		
		strYear = '' + dataAtual.getFullYear ();
		
		strData = strYear.substring(2, 4) + '-' + strMonth + '-' + strDay;

		return(strData);
}	

function NavegaNoticiasDia(strData)
{
	if (strData != '')
		document.location.href = 'noticias/' + strData + '/';
	else
		document.location.href = 'noticias/' + ObtemData() + '/';
}

function NavegaTodasNoticias()
{
	var url = (document.location.href).toLowerCase();
	
	var dest = "";

	if (url.indexOf("noticias") == -1) //capa principal
	{
		dest = 'noticias/' + ObtemData() + '/';
	}else{ //íntegra de notícia
		dest = '../../noticias/' + ObtemData() + '/';
	}

	document.location.href = dest;
}

function NavegaTodasNoticiasPequim()
{
	//Para as internas
	document.location.href = '/especiais/pequim-2008/noticias/' + ObtemData() + '/';
}

function EnvieParaUmAmigo(link)
{
	window.open('http://www.lancenet.com.br/envie/envieparaumamigo.asp?link=' + link,'Envie','width=400,height=340')
}

function AbreParceiro(link, nomeparceiro, width, height)
{

	window.open(link, nomeparceiro,'width=' + width + ',height=' + height)

}

function AbrePopup(url) 
  {    
  window.open(url,'LancePopupGaleria','width=330,height=290,toolbars=no')   
  }
  
function AbreEnquete(url) 
  {    
  window.open(url,'LancePopupEnquete','width=500,height=500,toolbars=no,scrollbars=yes')    
  }

function NavegaNoticiasDia(strData)

{

	if (strData != '')

		document.location.href = '/noticias/' + strData + '/';

	else

		document.location.href = '/noticias/' + ObtemData() + '/';

}

function AbreRadio(v,t,c)
{
	link = "v=" + URLencode(v) + "&t=" + URLencode(t) + "&c=" + URLencode(c)
	
	window.open("http://www.radiolance.com.br/RadioL/tabid/86/Default.aspx?" + link);
	
	if (dominioparceiro)
	{
		url = "http://msn.radiolance.com.br/RadioL/tabid/86/Default.aspx?";
	} else {
		url = "http://www.radiolance.com.br/RadioL/tabid/86/Default.aspx?";
	}
	
	window.open(url + link);
}

function URLencode(sStr) {
    return escape(sStr).
             replace(/\+/g, '%2B').
                replace(/\"/g,'%22').
                   replace(/\'/g, '%27').
                     replace(/\//g,'%2F');
  }