<!--

//Image Preload
lis = new Image(); 
lis.src = "img/li_over.gif"; 

//carga = new Image(); 
//carga.src = "img/carga.gif"; 

divi = new Image(); 
divi.src = "img/divimagen.gif"; 

var textos = Array();
textos[0] = "448/449";
textos[1] = "600/313";
textos[2] = "300/450";
textos[3] = "600/400";
textos[4] = "600/397";
textos[5] = "440/450";
textos[6] = "600/400";
textos[7] = "382/450";
textos[8] = "600/397";
textos[9] = "600/400";

var nombreCapa = "divimage";

function foto(num)
{
var separar=textos[num-1].split("/");

var imagen = new Image();
imagen.src = "galeria/"+num+".jpg";

var wi = separar[0];
var he = separar[1];
var wi2=parseInt(wi)+0;
var he2=parseInt(he)+50;

var ancho = document.documentElement.clientWidth;
var alto = document.documentElement.clientHeight;
var top = parseInt((alto  - he2) / 2);
var left = parseInt((ancho  - wi2) / 2);

document.getElementById(nombreCapa).style.width=wi2+'px';
document.getElementById(nombreCapa).style.height=he2+'px';
document.getElementById(nombreCapa).style.visibility="visible";
//document.getElementById(nombreCapa).style.display="inline";
document.getElementById(nombreCapa).style.left=left+"px";
document.getElementById(nombreCapa).style.top=top+"px";
document.getElementById(nombreCapa).innerHTML = "<img border='1' src='galeria/"+num+".jpg'>";
if(document.f1.idioma.value=="es"){
document.getElementById(nombreCapa).innerHTML = document.getElementById(nombreCapa).innerHTML + "<center><br><a href='#' class='divlink' onclick='javascript:ocultar()'>CERRAR</a></center>";
}else{
document.getElementById(nombreCapa).innerHTML = document.getElementById(nombreCapa).innerHTML + "<center><br><a href='#' class='divlink' onclick='javascript:ocultar()'>CLOSE</a></center>";
	
}
}
function ocultar()
{
	document.getElementById(nombreCapa).style.visibility="hidden";
	//document.getElementById(nombreCapa).style.display="none;"
} 

function borrar_form(form)
{
	form.send.disabled=true;
	form.email.value="";
	form.asunto.value="";
	form.mensaje.value="";
	form.email.focus();
}

function deshabilita(form)
{
    if((form.email.value != "") && (form.asunto.value != "") && (form.mensaje.value != ""))
	{
		form.send.disabled = false; 
	}else{
    	form.send.disabled = true; 
	}
}

function evalua_envio(form)
{
	var e;
	e=busca_email(form.email.value);
	if(e==1)
	{
		if(form.idioma.value=="castellano")
		{
			form.action="contacto.php?accion=contactar";
			form.submit();
		}else{
			form.action="contacto.php?lang=en&accion=contactar";
			form.submit();
		}
	}else{
		if(form.idioma.value=="castellano")
		{
			alert("El e-mail no es correcto.");
			form.email.focus();
		}else{
			alert("The e-mail is wrong.");
			form.email.focus();
		}
	}
}

function busca_email(texto)
{
	var s=0;
	var i;
	for(i=0;i<texto.length;i++)
	{
		if(texto.charAt(i)=="@" && i!=(texto.length-1) && (i!=0))
		{
			s=1;
		}
	}
	if(s==1)
	{
		for(i=0;i<texto.length;i++)
		{
			if(texto.charAt(i)=="." && i!=(texto.length-1) && (i!=0))
			{
				s=1;
				return s;
			}else{
				s=0;
			}
		}	
	}else{
		s=0;
	}
	return s;
}





function showhide(div)
{
	if(document.getElementById(div).style.visibility=="visible")
	{
		document.getElementById(div).style.visibility="hidden";
		document.getElementById(div).style.display="none";
	}else{
		document.getElementById(div).style.visibility="visible";
		document.getElementById(div).style.display="block";
	}
}

function player(idioma)
{
	var ancho = document.documentElement.clientWidth;
	var alto = document.documentElement.clientHeight;
	var top1 = parseInt((alto  - 400) / 2);
	var left1 = parseInt((ancho  - 500) / 2);
	var opciones = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=500, height=400, top="+top1+", left="+left1;
	var dest = "player.php?lang="+idioma;
	window.open(dest,"ventana",opciones);
	
}




//-->

