<!-- Hide from older browsers
function switchImg()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data;
    for (rem=0; rem < (switchImg.arguments.length-2); rem+=3) {
    	store = switchImg.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
   	   switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = switchImg.arguments[rem+2];
  } }
  document.Data = switcher;
} //end

function restoreImg()
{ //start
  if (document.Data != null)
    for (var rem=0; rem<(document.Data.length-1); rem+=2)
      document.Data[rem].src=document.Data[rem+1];
} //end
// end hiding contents -->

function openNewWindow(URLtoOpen, windowName, windowFeatures)
{
	newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

function valida(){
	if((esta_ple(document.form.nombre))==0){
		alert("El campo del nombre no puede estar vacío");
		document.form.nombre.focus();
		return false;
	}
	if((esta_ple(document.form.apellidos))==0){
		alert("El campo de los apellidos no puede estar vacío");
		document.form.apellidos.focus();
		return false;
	}
	if((mira_email(document.form.telefono))==0){
		alert("El campo del teléfono no puede estar vacío");
		document.form.telefono.focus();
		return false;
	}
	if((esta_ple(document.form.fechallegada))==0){
		alert("El campo de la fecha de llegada no puede estar vacío");
		document.form.fechallegada.focus();
		return false;
	}
	if((esta_ple(document.form.fechasalida))==0){
		alert("El campo de la fecha de salida no puede estar vacío");
		document.form.fechasalida.focus();
		return false;
	}
	if((esta_ple(document.form.habitaciones))==0){
		alert("El campo del nº de habitaciones no puede estar vacío");
		document.form.habitaciones.focus();
		return false;
	}
return true;
}