﻿function bookmarksite(title, url){
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "")
}

function select() {
	var x=document.getElementById("coment")
	x.select()
	x.focus()
}

function text() {
	document.getElementById("texto").innerHTML="<br><h1>O Seu Alojamento</h1><h2>No Centro</h2><h2>da Cidade de Viseu</h2>"
}

function textFR() {
	document.getElementById("texto").innerHTML="<br><h1>Votre Hôtel</h1><h2>au coeur</h2><h2>de Viseu</h2>"
}

function textGB() {
	document.getElementById("texto").innerHTML="<br><h1>Your Hotel</h1><h2>in the heart</h2><h2>of Viseu</h2>"
}


function valida_form()
{
valida=document.reservas;

	if (valida.nome.value=="") 
		{
		alert("Tem de introduzir um nome !");
		valida.nome.focus();
		return false;
		}
			
	if (valida.tel.value=="") 
		{
		alert("Tem de fornecer um número de telefone !");
		valida.tel.focus();
		return false;
		}
		
	if (isNaN(valida.tel.value)) 
		{
		alert("O telefone tem der ser um número valido !!");
		valida.tel.focus();
		return false;
		}
		
	if (valida.email.value=="") 
		{
		alert("Tem de introduzir um email !");
		valida.email.focus();
		return false;
		}

	
return true;
}

function valida_formGB()
{
valida=document.reservas;

	if (valida.nome.value=="") 
		{
		alert("You must enter a name !");
		valida.nome.focus();
		return false;
		}
			
	if (valida.tel.value=="") 
		{
		alert("You must enter a phone number !");
		valida.tel.focus();
		return false;
		}
		
	if (isNaN(valida.tel.value)) 
		{
		alert("You must enter a valid phone number !!");
		valida.tel.focus();
		return false;
		}
		
	if (valida.email.value=="") 
		{
		alert("You must enter an email !");
		valida.email.focus();
		return false;
		}

	
return true;
}


function valida_formFR()
{
valida=document.reservas;

	if (valida.nome.value=="") 
		{
		alert("Vous devez entrer un nom !");
		valida.nome.focus();
		return false;
		}
			
	if (valida.tel.value=="") 
		{
		alert("Vous devez entrer un numÃ©ro de tÃ©lÃ©phone !");
		valida.tel.focus();
		return false;
		}
		
	if (isNaN(valida.tel.value)) 
		{
		alert("Vous devez entrer un numÃ©ro de tÃ©lÃ©phone valide !!");
		valida.tel.focus();
		return false;
		}
		
	if (valida.email.value=="") 
		{
		alert("Vous devez entrer un e-mail !");
		valida.email.focus();
		return false;
		}

	
return true;
}



function valida_form_ml()
{
valida=document.ml;

	if (valida.nome.value=="") 
		{
		alert("Tem de introduzir um nome !");
		valida.nome.focus();
		return false;
		}

		
	if (valida.email.value=="") 
		{
		alert("Tem de introduzir um email !");
		valida.email.focus();
		return false;
		}

	
return true;
}
