//variables
var src_publi = 'gif/';

function ponPubli(cual){

	 numero=0;
	 eval('tamano = publi_imagen'+cual+'.length')
	 if(tamano>1)
	  numero = Math.round((tamano-1)  * Math.random());
	 
	 eval('p_enlace = publi_enlace'+cual+'[numero]'); 
	 eval('p_x = publi_x'+cual+'[numero]'); 
	 eval('p_y = publi_y'+cual+'[numero]'); 
	 eval('p_imagen = publi_imagen'+cual+'[numero]'); 
	 eval('p_ventana = publi_ventana'+cual+'[numero]'); 
if (p_imagen=='spacer.gif'){
	html='';
}else{
	 if(p_ventana=='S')
	  ventana='onclick="javascript:window.open(\''+p_enlace+'\',\'PUBLI\',\'width='+p_x+',height='+p_y+',resizable=yes,scrollbars=yes\');"';
	 else
	  ventana='target="_new"';
	  
	 html='<tr>\n'; 
	 html+='<td align="center" valign="top" ><a href="#" '+ventana+'><img src="'+src_publi+p_imagen+'" width="120" border="0"></a></td>\n';
	 html+='</tr>\n';
}
 return html;
 
}

function busca(pag){
    
  if( isNaN(parseInt(pag)) || parseInt(pag)<100 || parseInt(pag)>899){
   alert('El número de página es muy alto o muy bajo.');
   return '100/100_0001.htm';
  }  
  else{
   var p_numero = pag.substr(0,1);
   return p_numero+'00/'+pag+'_0001.htm'
  } 
}

function parseAte(campo){ // © 2001  - DGB
   var texto = location.search.substring(1, location.search.length);
 var result ='-';
 if(texto.indexOf(campo)>=0){
  var txtRst = texto.substring(texto.indexOf(campo),texto.length);
  var txtCmp = txtRst.substring(0,txtRst.indexOf('&'));
  if (txtCmp=='') txtCmp = txtRst.substring(0,txtRst.length);
  result = txtCmp.substring((txtCmp.indexOf('=')+1),txtCmp.length);
 }
 return(result);
}

function abrePlayer(v_xml,v_eslista,v_repaudio,v_comentario){
	//wo = window.open('/ondacero/web/player/index.htm','playerAudio','width=600,height=320');
  //llamada_player='/ondacero/web/html/player/repfram.htm?xmlfile='+v_xml;
  llamada_player='/ondacero/web/html/player/repfram.htm?xmlfile=/ondacero_2005/xml/'+v_xml;
  //llamada_player='/ondacero/web/html/player/repfram.htm?xmlfile='+v_xml;
  if(v_eslista!='')
   llamada_player+='&eslista='+v_eslista;
  if(v_repaudio!='')
   llamada_player+='&repaudio=/ondacero_2005/asx/'+v_repaudio;
  if(v_comentario!='')
   llamada_player+='&txtrel=='+v_comentario; 
   
  wo = window.open(llamada_player,'af','width=600,height=320');
	setTimeout("if(wo)wo.focus()",200);
}

//Buscador
// *********************************** BUSCADOR  *********************************** 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
} 

function EscBuscadorMin(){
  var zB = '';
  zB+= '<td colspan="2" rowspan="2" background="/a3tv2004/web/img/comun/a3tv_def_r1_c4.gif"><div align="center">';
  zB+= '<input name="textfield" type="text" class="aux1" size="33" onfocus="javascript:offYahooIcon();" onkeyDown="javascript:onClickEnter(event);" style="background-image:url(http://www.antena3.com/yahooads/yahoo0.gif); background-repeat: no-repeat;background-position:center;">';
  zB+= '</div></td>';
  zB+= '<td rowspan="2"><a href="JavaScript:EnvBusquedaEspotting()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'a3tv_def_r1_c6\',\'\',\'/a3tv2004/web/img/comun/a3tv_def_r1_c61_f2.gif\',1);"><img name="a3tv_def_r1_c6" src="/a3tv2004/web/img/comun/a3tv_def_r1_c61.gif" width="43" height="27" border="0" alt=""></a></td>';
  zB+= '<td rowspan="2"><a href="JavaScript:EnvBusquedaEspotting()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'a3tv_def_r1_c7\',\'\',\'/a3tv2004/web/img/comun/a3tv_def_r1_c7_f2.gif\',1);"><img name="a3tv_def_r1_c7" src="/a3tv2004/web/img/comun/a3tv_def_r1_c7.gif" width="32" height="27" border="0" alt=""></a></td>';
  document.write(zB);
}
<!--YAHOO Script--> 
function EnvBusquedaEspotting()
{
    if (document.frmBuscador2.textfield.value=="")
    {
        alert("Debes rellenar el campo del buscador con algún valor");
        document.frmBuscador2.textfield.value="";
        return;
    }

   
     //buscar en inet
		document.frmBuscador2.action="http://www.antena3.com/a3tv2004/web/html/yahooads/buscar.jsp?p="+document.frmBuscador2.textfield.value+"&ei=UTF-8&fr=antena3_yahoo_ant3_hs_es&meta=&x=";        
    
    document.frmBuscador2.target="_blank;"
    document.frmBuscador2.submit();




}

var urlImagenYahoo;

function onYahooIcon()
{


}

function offYahooIcon()
{

	document.frmBuscador2.textfield.style.backgroundImage="";

}



function onClickEnter(e){
		   var target = e.target || e.srcElement,
	        keyCode = e.keyCode || e.which;

	if (keyCode==13){
		EnvBusquedaEspotting();
    }

}
<!--FIN YAHOO Script-->

function EscBuscadorMinB(){
  var zB = '';
  zB+= '<td colspan="2" rowspan="2" background="http://www.antena3.com/a3tv2004/web/img/comun/a3tv_def_r1_c4.gif"><div align="center">';
  zB+= '<input name="textfield" type="text" class="aux1" size="23" onKeyPress="javas'+'cript:saltaEspot();">';
  zB+= '</div></td>';
  zB+= '<td rowspan="2"><a href="JavaScript:EnvBusquedaEspotting()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'a3tv_def_r1_c6\',\'\',\'http://www.antena3.com/a3tv2004/web/img/comun/a3tv_def_r1_c6_f2.gif\',1);"><img name="a3tv_def_r1_c6" src="http://www.antena3.com/a3tv2004/web/img/comun/a3tv_def_r1_c6.gif" width="43" height="27" border="0" alt=""></a></td>';
  zB+= '<td rowspan="2"><a href="JavaScript:EnvBusquedaEspotting()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'a3tv_def_r1_c7\',\'\',\'http://www.antena3.com/a3tv2004/web/img/comun/a3tv_def_r1_c7_f2.gif\',1);"><img name="a3tv_def_r1_c7" src="http://www.antena3.com/a3tv2004/web/img/comun/a3tv_def_r1_c7.gif" width="32" height="27" border="0" alt=""></a></td>';
  document.write(zB);
}
/*function EnvBusquedaEspotting(){
	window.open('http://www.antena3.com/a3tv_2004/espotting/buscaespotting.html?keyword='+document.frmBuscador2.textfield.value,'A3nTV','');
  //self.reload();
}*/
function saltaEspot(){
  if(window.event.keyCode == 13){
    //frmBuscador2.method="GET";
    //window.open('http://www.antena3.com/a3tv_2004/espotting/buscaespotting.html?keyword='+document.frmBuscador2.textfield.value,'A3nTV','');
  }
}

function wrpie(){
  var htm = '<table width="100%" border="0" cellspacing="5" cellpadding="0">\n';
    htm+= '  <tr> \n';
    htm+= '    <td><img src="/a3tv2004/web/img/comun/shim.gif" width="10" height="10"></td>\n';
    htm+= '  </tr>\n';
    htm+= '  <tr> \n';
    htm+= '    <td align="center"><a href="#pie" onClick="vitxt()" class="blanco11">Copyright &copy; Antena \n';
    htm+= '      3 Televisión, S.A. Madrid 28703.Reservados Todos los derechos</a></td>\n';
    htm+= '  </tr>\n';
    htm+= '  <tr> \n';
    htm+= '    <td class="blanco11" id="copytxt" style="display:none" align="center">Antena 3 de Televisión, \n';
    htm+= '      S.A., con domicilio social en Avda. Isla Graciosa 13, 28703, San Sebastián \n';
    htm+= '      de los Reyes, Madrid, con CIF número A-78 839271 e inscrita en el registro \n';
    htm+= '      mercantil de Madrid, Tomo 1924, Sección 8, Folio 108, Hoja M-34473.<a name="pie"></a></td>\n';
    htm+= '  </tr>\n';
    htm+= '</table>\n';
	document.write(htm);
}

function vitxt(){
n=document.all.copytxt.style.display;
if(n=='none'){
	document.all.copytxt.style.display = '';
}else{
	document.all.copytxt.style.display = 'none';
}
}

function LSSI(){
	window.open('/a3tv2004/web/html/legal/index.htm','LSSI','scrollbars=yes,width=580,height=500');
}