//var dominioparceiro;
VerificaDominioParceiro();

function VerificaDominioParceiro(){ 
  var urlorigem,strorigem,idx01,idx02;
	  
  urlorigem = window.location;
  strorigem = String(urlorigem)
  idx01 = strorigem.indexOf("msn.")
  idx02 = strorigem.indexOf(".msn.")
  //idx03 = strorigem.indexOf("msn.desenv.lancenet")
  //idx04 = strorigem.indexOf("msn.prod.lancenet")
  if ((idx01 >= 0) || (idx02 >= 0)){
    dominioparceiro = true;
  }else{
    dominioparceiro = false;
  }
}
function Personalizacao_Parceiro(local)
{
/*  var urlorigem,strorigem,idx,origemmsn;
  var htmlHeader,htmlFooter;

  origemmsn = "0";
	  
  urlorigem = window.location;
  strorigem = String(urlorigem);
  idx01 = strorigem.indexOf("msn.lancenet.com.br")
  idx02 = strorigem.indexOf("lancenet.msn.com.br")
  idx03 = strorigem.indexOf("msn.desenv.lancenet")
  idx04 = strorigem.indexOf("msn.prod.lancenet")
  if ((idx01 >= 0) || (idx02 >= 0) || (idx03 >= 0) || (idx04 >= 0)){
    origemmsn= "1";
  }
			
  if (origemmsn == "1"){
    if (local == 'header'){
      htmlHeader = '<iframe src="/header_msn.htm" width="978" height="50" scrolling="no" frameborder="0"></iframe>'
      document.getElementById("HeaderParceiro").innerHTML = htmlHeader;
    }else{
      htmlFooter = '<iframe src="/copyright_msn.htm" width="978" height="70" scrolling="no" frameborder="0"></iframe>'
      document.getElementById("FooterParceiro").innerHTML = htmlFooter;
    }
  }	*/
}

function Parceiro_PageViews()
{
  var urlorigem,strorigem,idx,origemmsn;
  var htmlHeader,htmlFooter;

  origemmsn = "0";
	  
  urlorigem = window.location;
  strorigem = String(urlorigem);
  idx01 = strorigem.indexOf("msn.")
  idx02 = strorigem.indexOf(".msn.")
  //idx03 = strorigem.indexOf("msn.desenv.lancenet")
  //idx04 = strorigem.indexOf("msn.prod.lancenet")
  if ((idx01 >= 0) || (idx02 >= 0)){
    origemmsn= "1";
  }
			
  if (origemmsn == "1"){
	  document.write ('<script type="text/javascript">');
	  document.write ('var cImage;');
	  document.write ('cImage = new Image;');
	  document.write ('var RF= escape('+parent.document.referrer+')');
	  document.write ('cImage.src ="http://c.msn.com/c.gif?DI=2349&PI=9566&TP=http://tk2bedprvwa01/esportes'+document.location.pathname+'&PS=10300&RF="+RF');
	  document.write ('</script>');
//	  document.write ('<div style="display: none">');
	  document.write ('<script type="text/javascript">');
	  document.write ('var s_account="msnportalbresportes";');
	  document.write ('</script>');
//	  document.write ('<script type="text/javascript" src="http://stj.msn.com/br/om/js/s_code.js"></script>');
	  document.write ('<script type="text/javascript">');
	  document.write ('s.linkInternalFilters="javascript:,BR-Esportes";');
	  document.write ('s.trackExternalLinks=true;');
	  document.write ('s.channel="msn.br";');
	  document.write ('s.pageName="Esportes:"'+document.location.pathname+';');
	  document.write ('s.prop1="Esportes";');
	  document.write ('s.prop2="pt-br";');
	  document.write ('s.prop3="";');
	  document.write ('s.prop4="";');
	  document.write ('var s_code=s.t();');
	  document.write ('if(s_code)document.write(s_code);');
	  document.write ('</script>');
	  document.write ('<script type="text/javascript">');
	  document.write ('<!--if(navigator.appVersion.indexOf("MSIE")>=0)document.write(unescape("%3C")+"\!-"+"-")//--></script>');
	  document.write ('<noscript>');
	  document.write ('<img src="http://msnportalpresents.112.2O7.net/b/ss/msnportalpresents/1/H.1--NS/0" height="1" width="1" border="0" alt="" />');
	  document.write ('</noscript>');
//	  document.write ('</div>');
  }	
}




//YAHOO CONTENT MATCH
var cb = Math.floor(Math.random() * 100000);

function yahoo_ad_rand() {
	var categorias = new Array(1,"lancenet_1", 1,"lancenet_2", 1,"lancenet_3");
	var pesocategorias = new Array();
	for (i=0;i<categorias.length;i = i+2)  {
      for (x=0;x<categorias[i];x++) {  pesocategorias[pesocategorias.length] = categorias[i+1];  }
  }
	return pesocategorias[Math.floor(Math.random()*pesocategorias.length)];
}

//remove anchors ("#nome") to prevent errors in IE
var urlLocation = document.URL;
urlLocation = urlLocation.split("#", 1);
var a = 'http://cm.br.lancenet.overture.com/js_flat_1_0/?config=8605480630&source=lancenet_js_br_ctxt2&ctxtUrl='+
        document.Url+'&keywordCharEnc=latin1&outputCharEnc=latin1&maxCount=3&ctxtId=' + yahoo_ad_rand() + '&cb=';
var url = a + cb;

document.write('<SCRIPT LANGUAGE=JavaScript1.1 SRC="' + url + '"></SCRIPT>');


// Shows Yahoo Content Match links...
/*function YAHOO_1C3L_Show(){
	p_content = '\n<table id="yahoo_cm_ad">';

	for(i=1;i<=3;i++){
	    p_content += '<tr><td>';
			p_content +=    '<a href="'+ zSr[(i*6)+2]+'" target="_blank" id="yahoo_cm_ad_link">' + zSr[(i*6)+3];
			p_content +=    '<div id="yahoo_cm_ad_text">' + zSr[(i*6)] + '</div>';
			p_content +=    '<div id="yahoo_cm_ad_url">'+ zSr[(i*6)+4]+ '</div>';
			p_content +=    '</a>';
		  p_content += '</tr></td>';
  }

	p_content += '</table>';

	document.write(p_content);
}*/

// Shows Yahoo Content Match links...
function YAHOO_1C3L_Show(){
	p_content = ""
		for(i=1;i<=3;i++){
		p_content += '<P><SPAN class="autorparceiros">';
		p_content +=    '<strong><A TARGET="_new" HREF="'+ zSr[(i*6)+2]+'"><font color="#ff6600">' + zSr[(i*6)+3];
		p_content +=    '</font></A></strong></SPAN>'
		p_content +=	'<font family=verdana size=2 color="#222222">' + zSr[(i*6)] + '</font><br>';
		p_content +=    '<A TARGET="_new" HREF="'+ zSr[(i*6)+2]+'"><SPAN class="host_parceiros">('+ zSr[(i*6)+4]+ ')</a></SPAN></p><br>';
  }
	document.write(p_content);
}



//Define ShowListings function that processes Content Match 2 results - YAHOO - VELHO
/*var cb_random = Math.floor(Math.random() * 100000);
var urlfutebol = '<SCRIPT type="text/javascript" language="javascript" src="http://cm.br.lancenet.overture.com/js_flat_1_0/?config=8605480630&#38;source=lancenet_js_br_ctxt2&#38;type=futebol&#38;ctxtUrl=http://www.lancenet.com.br&#38;ctxtId=futebol&#38;maxCount=3&#38;cb=' + cb_random + '"></script>'
var urlesporte = '<SCRIPT type="text/javascript" language="javascript" src="http://cm.br.lancenet.overture.com/js_flat_1_0/?config=8605480630&#38;source=lancenet_js_br_ctxt2&#38;type=esportes&#38;ctxtUrl=http://www.lancenet.com.br&#38;ctxtId=futebol&#38;maxCount=3&#38;cb=' + cb_random + '"></script>'


var local = location.href;
var strprocura = "esportes"
var posicaopalavra;


posicaopalavra = local.indexOf(strprocura);

if (posicaopalavra > 0){
	document.write(urlesporte);
}
else {
	document.write(urlfutebol);
}


function ShowListings() {
var i=6;
while (i < zSr.length) {
var descr = zSr[i++]; // listing description
var unused1 = zSr[i++]; // (ignore)
var clickURL = zSr[i++]; // listing link
var title = zSr[i++]; // listing title
var sitehost = zSr[i++]; // advertiser’s domain name
var unused2 = zSr[i++]; // (ignore)
document.write('<P><SPAN class="autorparceiros">');
document.write('<strong><A TARGET="_new" HREF="' + clickURL + '">');
document.write('<font color="#ff6600">' + title + '</font></A></strong></SPAN>');
document.write('<font family=verdana size=2 color="#222222">' + descr + '</font><BR>');
document.write('<A TARGET="_new" HREF="' + clickURL + '">');
document.write('<SPAN class="host_parceiros">(' + sitehost + ')</A></SPAN></P><BR>');
}
}*/

function ContabilizaMSN(page){
	var s_account='msnportalbresportes';
	s.linkInternalFilters='javascript:,BR-Esportes'; s.trackExternalLinks=true;
	s.channel='msn.br';
	s.pageName=page;
	s.prop1='Esportes';
	s.prop2='pt-br';
	s.prop3='';
	s.prop4='';

	if (dominioparceiro){
		var s_code=s.t();if(s_code)document.write(s_code);
		var cImage = new Image;var RF= escape(parent.document.referrer);
		cImage.src ='http://c.msn.com/c.gif?DI=2349&PI=9566&TP=http://esportes.msn.com.br/esportes'+ document.location.pathname +'&PS=10300&RF="'+ RF +'" ';
	}
}
