﻿/*	TVN: Advertising: funciones de retraso en carga
	Versión: 1.0.1  10-abr-2008
	Publicaciones de DIV en este sitio:
		H)	<DIV ID='Pub_BigBanner'>
		H)	<DIV ID='Pub_Eventos'>
		I)	<DIV ID='Pub_Izquierda_1'>
		I)	<DIV ID='Pub_Izquierda_2'>
		D)	<DIV ID='Pub_Derecha_1'>
		D)	<DIV ID='Pub_Derecha_2'>
		F)	<DIV ID='Pub_Layer'>
*/
var phpadsbanner="";
var hayBigBanner=false;

function Ads_Publicar() {
//-----------------------
	if (!document.phpAds_used) document.phpAds_used = ',';
	Ads_PublishZone('Pub_BigBanner',   429,728,90);
	if (hayBigBanner) Ads_PublishZone('Pub_Eventos',    124,205,90);
//	Ads_PublishZone('Pub_Izquierda_1', 35,120,600);
//	Ads_PublishZone('Pub_Izquierda_2', 36,120,120);
	Ads_PublishZone('Pub_Derecha_1', 306,200,200);
	Ads_PublishZone('Pub_Derecha_2', 307,200,200);
	Ads_PublishZone('Pub_Derecha_3', 430,200,200);
	Ads_PublishZone('Pub_Derecha_4', 431,200,200);
	Ads_PublishZone('Pub_Derecha_5', 432,200,600);
	Ads_PublishZone('Pub_Derecha_6', 305, 200, 600);
	Ads_PublishZone('Pub_Derecha_7', 434, 200, 200);
	Ads_PublishZone('Pub_Derecha_8', 435, 200, 200);
	Ads_PublishZone('Pub_Derecha_9', 436, 200, 200);
//	Ads_PublishZone('Pub_Indicadores',  294,478,34);
//	Ads_PublishZone('Pub_Tiempo',  293,478,34);
//	Ads_PublishZone('Pub_Pulso',  301,180,34);
//	Ads_PublishZone('Pub_Menu',  317,156,40);
//	Ads_PublishZone('Pub_Derecha_Fin',107,200,356);
}
function Ads_PublishZone(bannerdiv,bannerzone,bannerwidth,bannerheight){
//--- ver: 1.0.1 -------------------------------------------------------
var ads_div,ads_src="", ads_wri="";
	if(ads_div=document.getElementById(bannerdiv)){
		if(!bannerwidth){bannerwidth=120;}
		if(!bannerheight){bannerheight=600;}

		var TOfbannerJS="",IsHtml=false;
		eval("TOfbannerJS=typeof("+bannerdiv+"JS);");
		if(TOfbannerJS=="string"){
		    if ((bannerdiv=='Pub_BigBanner') && eval(bannerdiv+"JS!=''")) hayBigBanner=true;
			eval("IsHtml=(("+bannerdiv+"JS.indexOf('<script')!=-1) && ("+bannerdiv+"JS.indexOf('expandible_tvn')==-1));");
			if(IsHtml){
                Ads_random = new String (Math.random()); Ads_random = Ads_random.substring(2,11);
			    ads_div.innerHTML="<iframe framespacing=0 frameborder=0 scrolling='no' width="+bannerwidth+" height="+bannerheight+" src='/Ads_Frame.aspx?n="+Ads_random+"&amp;ad="+bannerdiv+"JS' allowtransparency='true'></iframe>";
			} else {
				eval("ads_div.innerHTML="+bannerdiv+"JS;");
			}
			if((bannerwidth==120)||(bannerwidth==200)){
                eval("ads_div.innerHTML=\""+Ads_Separador(5,5)+"\"+ads_div.innerHTML");
            }
			Ads_axblast(bannerdiv);
		}else{
			Ads_Debug("TOBanner("+bannerdiv +"JS) no es string !\n" );
		}
	}else{
		Ads_Debug("No existe DIV='" + bannerdiv +"'" );	
	}
}
function Ads_Separador(w,h){
	return "<img src='/imagenes/pix.gif' width='"+w+"' height='"+h+"'/>";
}
function Ads_axblast(id) {
//--- ver: 1.0.0 ---------
/*	Embedded Objects Active X Warning Remover for IE. A little dutch work arround
    Use: put your embed html code (flash,movie, etc) between a div tag with an id in plain html. trigger the axblast(your_div_id); */
    if (id == undefined) { return false; }
    // Rewrite code for IE browsers only
    // Get the object HTML from div
    if (document.all && document.all[''+id+'']) { html = document.all[''+id+''].innerHTML; }
    // Write the same HTML back - couldnt be easier (-.0)
    if (document.all && document.all[''+id+'']) { document.all[''+id+''].innerHTML = html; }
}
function Ads_Debug(txt){
//-----------------------
//	alert(txt);
}

//	Preparar lo que se publica en este sitio
//	--------------------------------------------------------------------------------------
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:429");
document.write ("&amp;bannervar=Pub_BigBannerJS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

//phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
//document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
//document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
//document.write ("&amp;what=zone:185");
//document.write ("&amp;bannervar=Pub_EventosJS");
//document.write ("&amp;exclude=" + document.phpAds_used);
//if (document.referrer)
//    document.write ("&amp;referer=" + escape(document.referrer));
//document.write ("'><" + "/script>");
    

//phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
//document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
//document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
//document.write ("&amp;what=zone:35");
//document.write ("&amp;bannervar=Pub_Izquierda_1JS");
//document.write ("&amp;exclude=" + document.phpAds_used);
//if (document.referrer)
//    document.write ("&amp;referer=" + escape(document.referrer));
//document.write ("'><" + "/script>");

//phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
//document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
//document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
//document.write ("&amp;what=zone:36");
//document.write ("&amp;bannervar=Pub_Izquierda_2JS");
//document.write ("&amp;exclude=" + document.phpAds_used);
//if (document.referrer)
//    document.write ("&amp;referer=" + escape(document.referrer));
//document.write ("'><" + "/script>");

//phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
//document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
//document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
//document.write ("&amp;what=zone:278");
//document.write ("&amp;bannervar=Pub_Derecha_0JS");
//document.write ("&amp;exclude=" + document.phpAds_used);
//if (document.referrer)
//    document.write ("&amp;referer=" + escape(document.referrer));
//document.write ("'><" + "/script>");

phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:306");
document.write ("&amp;bannervar=Pub_Derecha_1JS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:307");
document.write ("&amp;bannervar=Pub_Derecha_2JS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:430");
document.write ("&amp;bannervar=Pub_Derecha_3JS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:431");
document.write ("&amp;bannervar=Pub_Derecha_4JS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write("'><" + "/script>");

phpAds_random = new String(Math.random()); phpAds_random = phpAds_random.substring(2, 11);
document.write("<" + "script language='JavaScript' type='text/javascript' src='");
document.write("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write("&amp;what=zone:432");
document.write("&amp;bannervar=Pub_Derecha_5JS");
document.write("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write("&amp;referer=" + escape(document.referrer));
document.write("'><" + "/script>");

phpAds_random = new String(Math.random()); phpAds_random = phpAds_random.substring(2, 11);
document.write("<" + "script language='JavaScript' type='text/javascript' src='");
document.write("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write("&amp;what=zone:305");
document.write("&amp;bannervar=Pub_Derecha_6JS");
document.write("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write("&amp;referer=" + escape(document.referrer));
document.write("'><" + "/script>");

phpAds_random = new String(Math.random()); phpAds_random = phpAds_random.substring(2, 11);
document.write("<" + "script language='JavaScript' type='text/javascript' src='");
document.write("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write("&amp;what=zone:434");
document.write("&amp;bannervar=Pub_Derecha_7JS");
document.write("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write("&amp;referer=" + escape(document.referrer));
document.write("'><" + "/script>");

phpAds_random = new String(Math.random()); phpAds_random = phpAds_random.substring(2, 11);
document.write("<" + "script language='JavaScript' type='text/javascript' src='");
document.write("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write("&amp;what=zone:435");
document.write("&amp;bannervar=Pub_Derecha_8JS");
document.write("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write("&amp;referer=" + escape(document.referrer));
document.write("'><" + "/script>");

phpAds_random = new String(Math.random()); phpAds_random = phpAds_random.substring(2, 11);
document.write("<" + "script language='JavaScript' type='text/javascript' src='");
document.write("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write("&amp;what=zone:436");
document.write("&amp;bannervar=Pub_Derecha_9JS");
document.write("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write("&amp;referer=" + escape(document.referrer));
document.write("'><" + "/script>");



phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:294");
document.write ("&amp;bannervar=Pub_IndicadoresJS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:293");
document.write ("&amp;bannervar=Pub_TiempoJS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:301");
document.write ("&amp;bannervar=Pub_PulsoJS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");

phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://x.tvn.cl/adjstvn.php?n=" + phpAds_random);
document.write ("&amp;what=zone:317");
document.write ("&amp;bannervar=Pub_MenuJS");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
