<!--
// advertisment variables
var chechkm8inactive=false;
var floatskyinactive=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=="image") {
		//submitYaTV(context,query);			
		self.location.href = "http://busca.ya.com/search?origen=header&buscar="+query+"&destino=imagen";
	}else if (context=="fast-news") {
		self.location.href = "http://busca.ya.com/search?origen=header&buscar="+query+"&destino=news";	
	}else if (context=="video") {
		self.location.href = 'http://www2.yatv.com/jsp/JYatvSearchResults.jsp?s=15177&mode=text&results=5&format=video&query='+query;
	}else{
		self.location.href = "http://busca.ya.com/search?origen=header&buscar="+query+"&destino=web"; 
	}
}
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";
	if((format == "video") || (format == "mp3")){
		self.location.href = action;
	}else{
		self.location.href = "http://buscar.ya.com/fast-cgi/tsc?adtest=&mandant=toi&portallanguage=es&userlanguage=es&device=html&context=img&iocr=yes&tax_max=&tax=&language=&ocontext=&dia=tsc&hdr=1&lang=primary&q=" + query;
	}
}
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 {
		if(context == "all"){
			self.location.href = "http://buscar.ya.com/fast-cgi/tsc?mandant=toi&portallanguage=es&userlanguage=es&device=html&context=all&dia=start&lang=primary&q=" + query;
		}else if(context == "fast-news"){
			self.location.href = "http://buscar.ya.com/fast-cgi/tsc?adtest=&mandant=toi&portallanguage=es&userlanguage=es&device=html&context=web-news&iocr=yes&tax_max=&tax=&language=&ocontext=&dia=tsc&hdr=1&q=" + query + "&fmt=all";
		}
		//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) {
var kw="";
function extraer(texto)           
{
var inicio=0, fin=0, parte ="";                                    
inicio=(texto.indexOf("/", 8)+1);
if(inicio>0)
{
fin=texto.indexOf("/", inicio);
if(fin<0){fin=texto.length;}
parte = texto.substring(inicio, fin);
}
return parte;
};
kw=extraer(window.location.href);
ord=Math.random()*10000000000000000;
document.write('<script language="JavaScript" src="http://ad.es.doubleclick.net/adj/especiales.ya.com/e02ron;kw='+kw+';ancho='+(screen.width)+';tile=1;dcopt=ist;sz=468x60;ord=' + ord + '?" type="text/javascript"><\/script>');

}

function publicidad122 (sec3) {

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

	
	var bust = Math.floor(89999999*Math.random()+10000000);
	document.writeln('<IFRAME src="http://advertpro.ya.com/servlet/view/banner/html/zone?zid='+pd+'&pid=0&random='+bust+'" height="70" width="90" hspace="0" vspace="0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no">');
	document.writeln('<A href="http://advertpro.ya.com/servlet/click/zone?zid='+pd+'&pid=0&lookup=true&random='+bust+'" target="_top">');
	document.writeln('<IMG src="http://advertpro.ya.com/servlet/view/banner/image/zone?zid='+pd+'&pid=0&random='+bust+'" height="70" width="90" hspace="0" vspace="0" border="0" alt="Click Here!">');
	document.writeln('</A>');
	document.writeln('</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';
}

sz = "80x80";
 st = "noticias.ya.com";
 pd = "e01home"; 
 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="80" height="80" border="0"></a>'); }
else {
document.write ('<SCR'+'IPT language="JavaScript" SRC="'+std+'adj/'+st+'/'+pd+';sz='+sz+';'+vartext+';ord='+randnum+'?"></SCR'+'IPT>'); }






}

function ecommerce (sec5) {

	pd = sec5;
	if ((arguments.length==0)||(sec5 == "null")||(pd.length < 1)) {
		pd = '30';
	}
	
	var bust = Math.floor(89999999*Math.random()+10000000);
	document.writeln('<IFRAME src="http://advertpro.ya.com/servlet/view/banner/html/zone?zid='+pd+'&pid=0&random='+bust+'" height="70" width="90" hspace="0" vspace="0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no">');
	document.writeln('<A href="http://advertpro.ya.com/servlet/click/zone?zid='+pd+'&pid=0&lookup=true&random='+bust+'" target="_top">');
	document.writeln('<IMG src="http://advertpro.ya.com/servlet/view/banner/image/zone?zid='+pd+'&pid=0&random='+bust+'" height="70" width="90" hspace="0" vspace="0" border="0" alt="Click Here!">');
	document.writeln('</A>');
	document.writeln('</IFRAME>');

}

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+'">';
}
	


<!-- LOTERIA -->
function validate(f) {
	if (f.N.value == "") {
		alert("Debes introducir un número");
		f.numero.focus();
		return false;
		
	}
	var NUMEROS="1234567890";
	for (var i=0;i<f.N.value.length;i++) {
		if (NUMEROS.indexOf(f.N.value.charAt(i))<0) {
			alert("El número solo debe tener digitos, sin puntos");
			f.N.focus();
			f.N.select();
			return false;
		}
	}
	if (f.N.value.length>5) {
		alert("El número solo puede tener un máximo de 5 dígitos");
		f.N.focus();
		f.N.select();
		return false;
	}
	for (var i=0;i<f.CC.value.length;i++) {
		if (NUMEROS.indexOf(f.CC.value.charAt(i))<0) {
			alert("La cantidad solo debe tener dígitos, sin puntos");
			f.CC.focus();
			f.CC.select();
			return false;
		}
	}
	var i=0;
	for (i=0;i<f.D.value.length;i++) {
		if (NUMEROS.indexOf(f.D.value.charAt(i))<0) {
			alert("La cantidad sólo debe tener dígitos, sin puntos");
			f.D.focus();
			f.D.select();
			return false;
		}
	}
	if(i!=2){
			alert("Debe introducir 2 dígitos");
			f.D.focus();
			f.D.select();
			return false;
		}
	if (f.D.value!="" && f.CC.value == "") {
		//alert("Debes introducir la cantidad jugada");
		//f.cantidad.focus();
		//return false;
		f.CC.value=0;
	}
	f.C.value=f.CC.value + "." + f.D.value
	f.submit();
}

<!-- FIN LOTERIA -->


//--> 