var num_alea;
num_alea = Math.floor(10*Math.random()+1);    
if (num_alea<=5)
	{
	var flash_ok = navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	document.write('<SCRI' + 'PT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash_ok = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash")) \n');
	document.write('</SCR' + 'IPT\> \n');
	
	function pintaflash(pelicula,width,height)
	{
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" ');
	document.write('  WIDTH=' + width + ' HEIGHT=' + height + '>');
	document.write(' <PARAM NAME=movie VALUE="' + pelicula + '"> <PARAM NAME=quality VALUE=high>'); 
	document.write(' <EMBED src="' + pelicula + '" quality=high wLiveConnect=FALSE WIDTH=' + width + ' HEIGHT=' + height);
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
	document.write(' </EMBED></OBJECT>');
	}
	
	function pintaimagen(imagen,ancho,alto,enlace) 
		{ 
		if (!enlace) // si NO viene enlace
			document.write("<img src='" + imagen + "' width='" + ancho + "' height='" + alto + "'>");
		else		
			document.write("<a href='" + enlace + "' target='_blank'><img src='" + imagen + "' width='" + ancho + "' height='" + alto + "' border=0></a>");
		}
	
	//INI SKYSCRAPER
	document.write("<DIV id='skyscraper' name='skyscraper' style='position:absolute;'>");
	//if (flash_ok) 
	//    {pintaflash("/images/promos/skyscraper/t5_120_600.swf","120","600"); }
	//else 
	    {pintaimagen("http://www.telecinco.es/images/promos/skyscraper/t5_120_600.gif","120","600","http://meetic.telecinco.es/index.php?mtcmk=018248");}
	//document.write('<IFRAME SRC="http://ad.es.doubleclick.net/adi/N3720.Telecinco/B1841262.2;sz=120x600;ord=[timestamp]?" WIDTH=120 HEIGHT=600 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR="#000000">');
	document.write("</DIV>");
	markW = 90; //pixeles ancho      
	markH = 40; //pixeles alto
	markX = 85; //porcentaje a la derecha
	markY = 0;  //porcentaje abajo
	markRefresh = 50; //milisegundos para el refresco
	if (!document.all) document.all = document;
	if (!document.getElementById("skyscraper").style)
	{ 
		document.getElementById("skyscraper").style = document.getElementById("skyscraper").skyscraper; 
	}
	wMark = document.getElementById("skyscraper").style;
	wMark.width = markW;
	wMark.height = markH;
	navDOM = window.innerHeight;
	 
	function setVals() {
	 barW = 0;
	 barH = 0;
	 if (navDOM) {
	  if (document.height > innerHeight) barW = 20;
	  if (document.width > innerWidth) barH = 20;
	  } else {
	  innerWidth = document.body.clientWidth;
	  innerHeight = document.body.clientHeight;
	  }
	 markX = 850; //((innerWidth - markW)-barW) * (markX/100);
	 markY = ((innerHeight - markH)-barH) * (markY/100);
	 }
	function wRefresh() {
	 wMark.left = 850; // markX + (navDOM?pageXOffset:document.body.scrollLeft);
	 wMark.top = markY + (navDOM?pageYOffset:document.body.scrollTop);
	 }
	function markMe() {
	 setVals();
	 window.onresize=setVals;
	 markID = setInterval ("wRefresh()",markRefresh);
	 }
	window.onload=markMe;
	}
else
	{
	buildBanner(12);
	}