/*
    Set both flags to false when there is no sponsor.  JS will still
    be included, but no sponsor code will execute.
*/
var SPONSOR_ACTIVE = false;
var PAGE_SPECIFIC = true;

/*
	Define which pages this will trigger on, and their corresponding view/click tags
*/
var pages = new Array();
pages[0] = new pageValues(
	'http://www.nflatino.com/jugada-de-la-semana/index.html', //Page URL
	'http://view.atdmt.com/AVE/view/176934844/direct;wi.1;hi.1/01/', //View URL
	'http://clk.atdmt.com/AVE/go/176934844/direct;wi.1;hi.1/01/', //Click URL
	'http://u.univision.com/contentroot/uol/art/images/commercial/coors/NOMETA_nfl_coors_tab.jpg', //sponsorImage
	'http://u.univision.com/contentroot/uol/art/images/commercial/coors/NOMETA_970x60_coorslight_intro.swf', //flashSWF
	'http://u.univision.com/contentroot/uol/art/images/commercial/coors/NOMETA_970x60_coorslight_intro.jpg'); //flash Alt Image

var pageOn = checkIfOnPage();




if (SPONSOR_ACTIVE || (PAGE_SPECIFIC && pageOn !== false))
{
	//Default values, used if pages are not specified
   var movieSrc = "http://n.univision.com/ads/advertisers/CoorsBrewing/NFL_Intro_970_sep08.swf";
    var clickURL = escape("http://www.univision.com/rdt.dyn?rid=4&trt=179&requrl=http://www.Coorslight.com/Espanol");
    var sponsorImg = "http://n.univision.com/ads/advertisers/CoorsBrewing/Sponsortab_0908.jpg";
    var movieWidth = "970";
    var movieHeight = "60";
    var altImgSrc = "http://";
    var extraCode = "";
	var viewURL = "";
	
	if (PAGE_SPECIFIC && pageOn !== false) {
		viewURL = pages[pageOn].viewURL;
		clickURL = escape(pages[pageOn].clickURL);
		sponsorImg = pages[pageOn].sponsorImage;
		movieSrc = pages[pageOn].flashSWF;
		altImgSrc = pages[pageOn].altImage;
	}
	document.getElementById("bcb3").style.display = "block";
    document.write('<scr' + 'ipt type="text/javascript" src="http://ads.univision.com/ads/rm_tool/js/flashIntroPartners.js"></scr' + 'ipt>');
	
	if (viewURL) {
		document.write('<img src="' + viewURL + '" border="0" />');	
	}
    setTimeout("overrideOnEndIntro();", 2000);


}
else
{
    document.write(
            '<style type="text/css">' +
            '#unibm { display: block; }' +
            '</style>'
    );
}

function overrideOnEndIntro()
{
    window.onEndIntro = function() {
        document.getElementById("bcb3").style.display = "none";
        document.getElementById("bcb3").innerHTML = "";
        document.getElementById("unibs").innerHTML = "<a href=\"" + unescape(clickURL) + "\" target=\"_blank\"><img src=\"" + sponsorImg + "\" /></a>";
        document.getElementById("unibm").style.display = "block";
    }
}



function checkIfOnPage() //returns index of the page, or false
{
	for (var i=0; i < pages.length; i++) {
		if (window.location == pages[i].url) {
			return i;	
		}
	}
	return false;
}

function pageValues(url, viewURL, clickURL, sponsorImage, flashSWF, altImage) {
	this.url = url;
	this.viewURL = viewURL;
	this.clickURL = clickURL;
	this.sponsorImage = sponsorImage;
	this.flashSWF = flashSWF;
	this.altImage = altImage;
}