// JavaScript Document
<!--
var foto=new Array()
foto[12]=new Image()
foto[12].src="fotos/fondo.png"
foto[0]=new Image()
foto[0].src="fotos/ganderats200.png"
foto[1]=new Image()
foto[1].src="fotos/degradado000150.png"
foto[2]=new Image()
foto[2].src="/fotos/degradado150.png"
foto[3]=new Image()
foto[3].src="fotos/degradado000150inv.png"
foto[4]=new Image()
foto[4].src="fotos/egradado150inv.pn"
foto[5]=new Image()
foto[5].src="fotos/70-000.png"
foto[6]=new Image()
foto[6].src="fotos/gettingthere150.png"
foto[7]=new Image()
foto[7].src="fotos/mail2.png"
foto[8]=new Image()
foto[8].src="fotos/subir.png"
foto[9]=new Image()
foto[9].src="fotos/bajar.png"
foto[10]=new Image()
foto[10].src="fotos/subir-hover.png"
foto[11]=new Image()
foto[11].src="fotos/bajar-hover.png"
foto[13]=new Image()
foto[13].src="fotos/fondogaleria.png"

window.moveTo(0,0);
            window.resizeTo (screen.availWidth, screen.availHeight);

//inabilita menu contextual sin necesidad de llamar desde archivo, por que va despues function?
oncontextmenu = function() {
	return false;
}
//scroll automatico desde body onload max: hasta donde, ("autoScroll()",15); velocidad
var count = 0
var max = 500
function autoScroll() 
	{
	if (navigator.appVersion > "3") 
		{
		if (count < max) 
			{
			scroll(0,count++);
			timer=setTimeout("autoScroll()",10);
			status = max-count;
			}
		}
	}
//scroll con barra lateral subiendo	
var AMOUNT2=1; /* distance to scroll for each time */
var TIME2=10; /* milliseconds */
var timer2=null;
function scrollIt2(v)
	{
	var direction2=v?-3:-1;
	var distance2=AMOUNT2*direction2;
	window.scrollBy(0,distance2);
	}
function up(v)
	{
    if(timer2) { clearInterval(timer2); timer2=null; }
    if(v)timer2=setInterval("scrollIt2(true)",TIME2);
	}
//accion del scroll con barra lateral bajando	
var AMOUNT=1; /* distance to scroll for each time */
var TIME=10; /* milliseconds */
var timer=null;
function scrollIt(v)
	{
	var direction=v?3:-1;
	var distance=AMOUNT*direction;
	window.scrollBy(0,distance);
	}
function down(v)
	{
	if(timer) { clearInterval(timer); timer=null; }
	if(v)timer=setInterval("scrollIt(true)",TIME);
	}
//botones sustitución de foto en mouse over, boton bajar y subir automático
var sustituciona = new Image(25,23);
	sustituciona.src = "fotos/subir-hover.png";
    var originala = new Image(25,23);
    originala.src = "fotos/subir.png";
function cambiarA()
    {
    document.images["ascensorArriba"].src = sustituciona.src;
    document.images["ascensorArriba"].width = sustituciona.width;
    document.images["ascensorArriba"].height = sustituciona.height;
	}
function restaurarA()
    {
    document.images["ascensorArriba"].src = originala.src;
	document.images["ascensorArriba"].width = originala.width;
    document.images["ascensorArriba"].height = originala.height;
    }
	
var sustitucion = new Image(25,23);
	sustitucion.src = "fotos/bajar-hover.png";
    var original = new Image(25,23);
    original.src = "fotos/bajar.png";
function cambiar()
    {
    document.images["ascensorAbajo"].src = sustitucion.src;
    document.images["ascensorAbajo"].width = sustitucion.width;
    document.images["ascensorAbajo"].height = sustitucion.height;
	}
function restaurar()
    {
    document.images["ascensorAbajo"].src = original.src;
	document.images["ascensorAbajo"].width = original.width;
    document.images["ascensorAbajo"].height = original.height;
    }
//validacion formulario Reserve
function correo ()
    {
	expresion=/^[a-z]([\w\.]*)@[a-z]([\w\.]*)\.[a-z]{2,3}$/;
    resultado = expresion.test(this);
    return resultado;
    }
//compromar formularios contacts english
function comprobarContactEnglish()
    {
		var fallo=false;
		var falta="";
		if (document.contacto.firstname.value=="")
		{
		falta += "Please enter your first name.\n";
		fallo = true;
		}
		if (document.contacto.lastname.value=="")
		{
		falta += "Please enter your last name.\n";
		fallo = true;
		}
		if (document.contacto.subject.value=="")
		{
		falta += "Please enter your subject.\n";
		fallo = true;
		}
//Se crea el método correo()
//en base a la función del mismo nombre.
		String.prototype.correo = correo;
				document.contacto.email.value=document.contacto.email.value.toLowerCase();
//Se comprueba la cadena.
		if (!(document.contacto.email.value.correo()))
		{
		falta += "E-mail entered is incorrect.\n";
		fallo=true;
		}
		if (document.contacto.message.value=="")
		{
		falta += "Please enter your message.\n";
		fallo = true;
		}
		if (fallo)
		{
		alert(falta);
		return false;
		} else {
		return true;
		}
	}
//validacion formulario Contacts
function comprobarContact()
    {
		var fallo=false;
		var falta="";
		if (document.contacto.firstname.value=="")
		{
		falta += "Por favor escriba su primer nombre.\n";
		fallo = true;
		}
		if (document.contacto.lastname.value=="")
		{
		falta += "Por favor escriba su primer apellido.\n";
		fallo = true;
		}
		if (document.contacto.subject.value=="")
		{
		falta += "Por favor escriba un asunto.\n";
		fallo = true;
		}
//Se crea el método correo()
//en base a la función del mismo nombre.
		String.prototype.correo = correo;
				document.contacto.email.value=document.contacto.email.value.toLowerCase();
//Se comprueba la cadena.
		if (!(document.contacto.email.value.correo()))
		{
		falta += "El E-mail ingresado es incorrecto.\n";
		fallo=true;
		}
		if (document.contacto.message.value=="")
		{
		falta += "Por favor escriba su mensaje.\n";
		fallo = true;
		}
		if (fallo)
		{
		alert(falta);
		return false;
		} else {
		return true;
		}
	}

//mover capa de -400 al 250, funcionando sin uso, siguentes funciones
		contador = -400;
function InicioMoverCapa()
            {
               fotoDerechaOtras1.style.visibility = "visible";
               desplazamiento = setInterval(mover,1);
            }

function moverCapa()
            {
               contador += 10;
               if (contador < 250)
               {
                  fotoDerechaOtras1.style.top = contador+"px";
               }
			}
//texto con mica y sin mica con imagen de fondo
function fondoTexto() 
            {
            document.getElementById("txGeneral").style.backgroundImage = "url(fotos/mica.png)";
            }
function sinFondoTexto() 
            {
            document.getElementById("txGeneral").style.backgroundImage = "";
            }
function fondoTextoA() 
            {
            document.getElementById("txSecunda").style.backgroundImage = "url(fotos/mica.png)";
            }
function sinFondoTextoA() 
            {
            document.getElementById("txSecunda").style.backgroundImage = "";
            }
//agrandar y restaurar tipografia
function agrandaTexto(){
	document.getElementById("texto").style.fontSize="16px";
	}
function achicaTexto(){
	document.getElementById("texto").style.fontSize="14px";
	}
//-->
