<!--
// advertisment variables
var chechkm8inactive=false;
// end advertisment

// search 
function inputKeyPress(e,f){
	if (e.keyCode == 13) doSubmit(f);
	return true;
}
function doSubmit(f) {
	var query = f.q.value;
	f.item.value = query;
	for (i=0;i<f.context.length;i++) { 
		if (f.context[i].checked) { context = f.context[i].value; break; }
	}
	if ((context=="video")||(context=="image")||(context=="mp3")) submitYaTV(context,query);
	else submitYa(f,context,query);
}
function submitYaTV(format,query) {
	var action = "http://www2.yatv.com/jsp/JYatvSearchResults.jsp?s=15177&mode=text&results=5&format="+format+"&query="+query;
	if (query.length<1) action = "http://www.yatv.com";
	self.location.href = action;
}
function submitYa(f,context,query) {
	var action = "http://buscador.ya.com";
	if (query.length<1) {
		if (context == "fast-news") action = "http://noticias.ya.com";
		self.location.href = action;
	} else {
		f.action = "http://buscar.ya.com/fast-cgi/tsc";
		f.submit();
	}
}
// end search 

// cell rollover
function cambiacolor(idc,ida,colora,colorb) {
 if(document.all) {
  document.all[idc].style.background=colora;
  document.all[ida].style.color=colorb;
 }
}
function cambiacolorcelda(idc,colora) {
 if(document.all) {
  document.all[idc].style.background=colora;
 }
}
function cellOver() {
  if(document.all) {
     argc=cellOver.arguments.length;
     if ((argc>0)&&(argc%2==0)) {
        for (i=0;i<argc;i=i+2) {
          document.all[cellOver.arguments[i]].style.background=cellOver.arguments[i+1];
          document.all[cellOver.arguments[i]].style.cursor = 'hand';
        }
     }
  }
}
// end cell rollover

// advertisment
function publicidad468 (sec) {
sz = "468x60";
st = "noticias.ya.com";
pd = sec;
if ((arguments.length==0)||(sec == "null")||(pd.length < 1)) {
	pd = 'e02rot_gen';
}
isnt = "dcopt=ist";
vartext = "tile=1";
std = "http://ad.es.doubleclick.net/";

var time = new Date();
randnum= (time.getTime());

if (document.cookie.length > 0) {
cookies=unescape(document.cookie);
offset = cookies.indexOf("YAKEYS=");
if (offset != -1) {
offset = cookies.indexOf("P1=");
if (offset != -1) {
end =cookies.indexOf("|", offset);
vartext=cookies.substring(offset, end);}}}

if (navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.substring(0,1)>=5) {
document.write ('<a href="'+std+'jump/'+st+'/'+pd+';sz='+sz+'">');
document.write ('<img src="'+std+'ad/'+st+'/'+pd+';sz='+sz+'" width="468" height="60" border="0"></a>'); }
else {
document.write ('<SCR'+'IPT language="JavaScript" SRC="'+std+'adj/'+st+'/'+pd+';'+isnt+';sz='+sz+';'+vartext+';ord='+randnum+'?"></SCR'+'IPT>'); }
}

function publicidad122 (sec3) {

pd = sec3;
if ((arguments.length==0)||(sec3 == "null")||(pd.length < 1)) {
	pd = '119';
}

now = new Date(); 
random = now.getTime(); 
document.write('<IFRAME SRC="http://oasis.ya.com/oasisi-i.php?s='+pd+'&w=120&h=60&cb=' + random + '"'); 
document.write(' NORESIZE SCROLLING=NO HSPACE=0 VSPACE=0');
document.write(' FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0');
document.write(' WIDTH=120 HEIGHT=60>'); 
document.write('<A HREF="http://oasis.ya.com/oasisc.php?s='+pd+'&w=120&h=60&cb=' + random + '" target="_blank">');
document.write('<IMG SRC="http://oasis.ya.com/oasisi.php?s='+pd+'&w=120&h=60&cb=' + random + '"');
document.write(' WIDTH=120 HEIGHT=60 BORDER=0></A>');
document.write('</IFRAME>'); 
}

function publicidad200 (sec1) {
sz = "200x200";
st = "noticias.ya.com";
pd = sec1;
if ((arguments.length==0)||(sec1 == "null")||(pd.length < 1)) {
	pd = 'e02rot_gen';
}
vartext = "tile=2";
std = "http://ad.es.doubleclick.net/";

var time = new Date();
randnum= (time.getTime());

if (document.cookie.length > 0) {
cookies=unescape(document.cookie);
offset = cookies.indexOf("YAKEYS=");
if (offset != -1) {
offset = cookies.indexOf("P1=");
if (offset != -1) {
end =cookies.indexOf("|", offset);
vartext=cookies.substring(offset, end);}}}

if (navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.substring(0,1)>=5) {
document.write ('<a href="'+std+'jump/'+st+'/'+pd+';sz='+sz+'">');
document.write ('<img src="'+std+'ad/'+st+'/'+pd+';sz='+sz+'" width="200" height="200" border="0"></a>'); }
else {
document.write ('<SCR'+'IPT language="JavaScript" SRC="'+std+'adj/'+st+'/'+pd+';sz='+sz+';'+vartext+';ord='+randnum+'?"></SCR'+'IPT>'); }
}

function publicidad80l (sec4) {

pd = sec4;
if ((arguments.length==0)||(sec4 == "null")||(pd.length < 1)) {
	pd = '131';
}

now = new Date(); 
random = now.getTime(); 
document.write('<IFRAME SRC="http://oasis.ya.com/oasisi-i.php?s='+pd+'&w=80&h=80&cb=' + random + '"'); 
document.write(' NORESIZE SCROLLING=NO HSPACE=0 VSPACE=0');
document.write(' FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0');
document.write(' WIDTH=80 HEIGHT=80>'); 
document.write('<A HREF="http://oasis.ya.com/oasisc.php?s='+pd+'&w=80&h=80&cb=' + random + '" target="_blank">');
document.write('<IMG SRC="http://oasis.ya.com/oasisi.php?s='+pd+'&w=80&h=80&cb=' + random + '"');
document.write(' WIDTH=80 HEIGHT=80 BORDER=0></A>');
document.write('</IFRAME>'); 
}

function ecommerce (sec5) {

pd = sec5;
if ((arguments.length==0)||(sec5 == "null")||(pd.length < 1)) {
	pd = '27';
}
 
now = new Date();
random = now.getTime();
document.write('<A HREF="http://oasis.ya.com/oasisc.php?s='+pd+'&w=90&h=70&cb=' + random + '" target="_blank">');
document.write('<IMG SRC="http://oasis.ya.com/oasisi.php?s='+pd+'&w=90&h=70&cb=' + random + '"');
document.write(' WIDTH=90 HEIGHT=70 BORDER=0></A>');
}

function cCheckm8 (sec2) {
	cm8cat = sec2 ;
	if ((arguments.length==0)||(sec2 == "null")||(pd.length < 1)) {
		cm8cat = 'noticias.rot_gen';
	}
	if (!chechkm8inactive) {  
	document.write('<SC'+'RIPT language="javascript" src="http://ad.ya.com/multiplescript/checkm8_init_1.js"></SCR'+'IPT>');
	}
}
// end advertisment

// videos
function popupvideo(video, type) {
  if(type==null){
    self.location="http://www.yatv.com/video/yatv2_video_v_" + video + "_1.html";
  }
  else{
    if(type=="v"){
    self.location="http://www2.yatv.com/noticias/?v="+video+"&s=15";
    }
    if(type=="n"){
    self.location="http://www2.yatv.com/noticias/?f="+video+"&s=15";
    }
  }
}
// end videos

// images
function openImage(imagen, nombre_ventana, pie, dimensiones, ancho, alto, autor) { 
  var codHTML = "";
  var aleatorio = "" + Math.random();
  aleatorio = aleatorio.substring(1+aleatorio.indexOf("."),aleatorio.length);
  var ventana;
  ventana = window.open("/blanco.html",aleatorio, dimensiones);
  codHTML += '<HTML><HEAD><TITLE>';
  codHTML += pie;
  codHTML += '</TITLE><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD><BODY bgcolor="FFFFFF" leftMargin=0 text=000000 topMargin=0 marginwidth="0" marginheight="0">';
  codHTML += '<IMG SRC="' + imagen + '" WIDTH=' + ancho + ' HEIGHT=' + alto + ' ALT="" BORDER="0">';
  codHTML += '<BR><table width="' + ancho + '" border="0" cellspacing="0" cellpadding="5"><tr align="right"><td><div align=left>';
  if (autor != ''){
    codHTML += '<font size="1" color="#FFFFFF" face="Verdana, sans-serif"><font color="#990000">Fotograf&iacute;a</font><font color="#FFFFFF">: </font><font color="#333333">' + autor + '<br>';
  }
  codHTML += '<font size="1" color="#333333" face="Verdana, sans-serif"><font color="#990000">Imagen: </font>' + pie;
  codHTML += '</font></div>';
  codHTML += '<div align=right><font color="#FFFFFF" size=1 face="Verdana, sans-serif"><br>';
  codHTML += '<font color="#660000">&reg; Ya.com Internet Factory.</font></font></span></div></td></tr></table>';
  codHTML += '</BODY></HTML>';
  ventana.document.open();
  ventana.document.write(codHTML);
  ventana.document.close();
}
// end images

//espotting Code
function espotting(){
<!--
document.write('<script language="JavaScript" src="http://espotting.ya.com/es_yacom_noticiasyacom_viaje.js?r='+Math.random()+'"></script>');
-->
}


//redsheriff Code
var _rsCI='es-yainternetfactory';  
var _rsCG='0';  
var _rsDT=1;  
var _rsSI=escape(window.location);  
var _rsLP=location.protocol.indexOf('https')>-1?'https:':'http:';  
var _rsRP=escape(document.referrer);  
var _rsND=_rsLP+'//secure-uk.imrworldwide.com/';  
if (parseInt(navigator.appVersion)>=4) {    
    var _rsRD=(new Date()).getTime();    
    var _rsSE=0;    
    var _rsSV='';    
    var _rsSM=0;    
    _rsCL='<scr'+'ipt language="JavaScript" type="text/javascript" src="'+_rsND+'v5.js"><\/scr'+'ipt>';
} else {    
    _rsCL='<img src="'+_rsND+'cgi-bin/m?ci='+_rsCI+'&cg='+_rsCG+'&si='+_rsSI+'&rp='+_rsRP+'">';
}
	



//--> 
