function agregar(){
   if ((navigator.appName=="Microsoft Internet Explorer") && 
         (parseInt(navigator.appVersion)>=4)) {
      var url="http://www.lacinco.com/"; 
      var titulo="LaCinco Loteria online";
      window.external.AddFavorite(url,titulo);
   } else { 
      if(navigator.appName == "Netscape") 
         alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
   }
}


function escribir(numeros, precio){
var elemento=numeros + 1;
var indices=eval ('document.compra_loteria.nboletos'+ numeros +'.options[document.compra_loteria.nboletos'+ numeros +'.selectedIndex].value');
var resultado3=eval ('document.compra_loteria.text'+elemento+'.value=(indices*precio)');
return resultado3;
}

function Validar(form){
	var campos_formulario=(document.compra_loteria.elements.length-2);
	var ciclos=(campos_formulario/5);
	var suma=0;
	var numeros=0;
		while (numeros<(ciclos*2)) {		
		if(eval ('document.compra_loteria.nboletos'+ numeros +'.options[document.compra_loteria.nboletos'+ numeros +'.selectedIndex].value')==0) suma++; numeros=numeros+2;
	}	
		
		if(suma==ciclos) {alert("Debe indicar los décimos que desea comprar."); return false; }
		
			compra_loteria.submit();		
	}
	

function fixH(one,two) {
if (document.getElementById(one)) {
var lh=document.getElementById(one).offsetHeight;
var rh=document.getElementById(two).offsetHeight;
var nh = Math.max(lh, rh); 
document.getElementById(one).style.height=nh+"px";
document.getElementById(two).style.height=nh+"px";
}
}

window.onload=function(){
fixH('col_menu','contenido');
}




function ampliar(imagen)
{

		var bName = navigator.appName;
		var bVer = parseFloat(navigator.appVersion);		
    		
			ventana=window.open("/ampliar.php","ventana","width=300, height=190");
    		ventana.document.open();
    		ventana.document.write('<html><head><title>Loteria de Lacinco.com<\/title><\/head><body style=\"background-color: #ffffff; margin=0 \">');
			
    	ventana.document.write('<img src="images/decimos/'+imagen+'.jpg" width="300">');
        ventana.document.close();
        ventana.focus();
}

function imprimir()
{

		var bName = navigator.appName;
		var bVer = parseFloat(navigator.appVersion);
		
    		var contenido = document.getElementById("capa_resultados").innerHTML;
			ventana=window.open("print.php","ventana","width=600, height=800");
    		ventana.document.open();
    		ventana.document.write('<html><head><title>LaCinco.com<\/title><link rel="stylesheet" type="text/css" href="css/estilos.css"><link rel="stylesheet" type="text/css" href="/css/general.css"><\/head><body style=\"background-color: #FFFFFF\">');
			
		ventana.document.write('<br><p>&nbsp;&nbsp;&nbsp;<strong>LaCinco.com</strong></p>');	
    	ventana.document.write(contenido);
        ventana.document.close();
        ventana.print();
        ventana.focus();
}