var domSt="http://st.dibujospedia.com/";
function hoverMenu(celda,idLink,booleano){	
	if(booleano==true){
		celda.style.backgroundColor='#FDC13D';
		document.getElementById('link_'+idLink).style.color='#ff7f11';
		celda.style.cursor='pointer';
	}else{
		celda.style.backgroundColor='#F5F6F5';
		document.getElementById('link_'+idLink).style.color='#36404b';
		celda.style.cursor='default';
	}	
}
function hoverMenu2(celda,idLink,booleano){	
	if(booleano==true){
		celda.style.backgroundColor='#FFD068';
		document.getElementById('link_'+idLink).style.color='#ff7f11';
		celda.style.cursor='pointer';
	}else{
		celda.style.backgroundColor='#FFFFFF';
		document.getElementById('link_'+idLink).style.color='#36404b';
		celda.style.cursor='default';
	}	
}
function legavi(){
	location.href="condiciones_de_uso.php";
}
function contac(){
	location.href="contacto.php";
}

var tuVoto=0;
function votar(v){
	if(tuVoto==0){
		tuVoto=v;
		for(i=1;i<=v;i++){
			document.getElementById('estrella'+i).src=domSt+"imagenes/estrella1.gif";
			document.getElementById('estrella'+i).style.cursor="default";			
		}
		for(i=v+1;i<=5;i++){
			document.getElementById('estrella'+i).src=domSt+"imagenes/estrella2.gif";
			document.getElementById('estrella'+i).style.cursor="default";			
		}
		var newScript = document.createElement("script");
		newScript.src = 'index.php?do=ajax&do2=votar&id='+idImagen+'&voto='+tuVoto;
		newScript.setAttribute('language', 'javascript');
		newScript.setAttribute('type', 'text/javascript');
		document.body.appendChild(newScript);	
	}
	document.getElementById('textoVotosId').innerHTML="Tu voto:  &nbsp; &nbsp; 	";
}
function votoEncima(v){
	if(tuVoto==0){
		for(i=1;i<=v;i++){
			document.getElementById('estrella'+i).src=domSt+"imagenes/estrella1.gif";
		}
		for(i=v+1;i<=5;i++){
			document.getElementById('estrella'+i).src=domSt+"imagenes/estrella2.gif";
		}
		document.getElementById('estrella'+v).style.cursor="pointer";
	}
}
function votoFuera(v){
	if(tuVoto==0){
		for(i=1;i<=5;i++){
			document.getElementById('estrella'+i).src=domSt+"imagenes/estrella2.gif";
		}
		document.getElementById('estrella'+v).style.cursor="default";
	}
}
function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
MM_preloadImages(domSt+"imagenes/estrella2.gif");
function enviar(im){
	var email_destino = prompt("Por favor, escribe la dirección email a la que deseas enviarle esta imagen.","");
    var newScript = document.createElement("script");
    newScript.src = 'enviar_recomendacion.php?email='+email_destino+'&url='+document.URL+'&imagen='+im;
	newScript.setAttribute('language', 'javascript');
    newScript.setAttribute('type', 'text/javascript');
    document.body.appendChild(newScript);			
}
function descargar(im){
	location.href='descargar.php?download='+im
}
function imprimir(im){
	window.open('imprimir.php?imprime='+im,'imp', 'directories=no,height='+screen.height+',location=no,menubar=no,resizable=yes,status=no,toolbar=no,width='+screen.width+',scrollbars=yes');
}
function generarResolucion(fotoUrl,fotoId,w,h){}
