

function MakeWin(url,ww,hh,scrl,WinName)
  {
   NLWindow = window.open("",WinName,"toolbar=no,location=no,status=no,scrollbars="+scrl+",width="+ww+",innerWidth="+ww+",height="+hh+",innerheight="+hh+",screenX=100,screenY=100,pageXoffset=100,pageYoffset=100,resizable=yes");

   if (NLWindow.frames.length == 0)
     {
     NLWindow = window.open(url,WinName,"toolbar=no,location=no,status=no,scrollbars="+scrl+",width="+ww+",innerWidth="+ww+",height="+hh+",innerheight="+hh+",screenX=100,screenY=100,pageXoffset=100,pageYoffset=100,resizable=yes");
     }
   else
     {
     NLWindow.location.href = url;
     }
     NLWindow.focus();

  }

// Bei Link auf aktuelle Seite die CSS Klasse auf aktiv setzen //
function highlightCurrentPageLink() {

// Alle Links durchlaufen und pruefen

  var anzHrefs = document.getElementsByTagName("a").length;
  for (var i = 0; i <= anzHrefs - 1; i++) {
    thisurl = document.getElementsByTagName("a")[i].id;
    search1 = /^(CAT<#MENU_CAT_ID#>)$/g;
// Link auf aktuelle Seite gefunden, also umsetzen CSS auf aktiv
    if(search1.test(thisurl) == true)
      {
      document.getElementsByTagName("a")[i].className = "ShopMenuactive";
      }
    else if (!document.getElementsByTagName("a")[i].id && document.getElementsByTagName("a")[i].href == document.location.href) {
      document.getElementsByTagName("a")[i].className = "ShopMenuactive";
      }
    }
  }

function MailForm()
  {
  ThatForm = document.Mailform;

  if(ThatForm.n_o_m_b_r_e.value=='')
    {
    alert("Por favor escriba su nombre");
    ThatForm.n_o_m_b_r_e.focus();
    return false;
    }
  if(ThatForm.c_o_r_r_e_o.value=='')
    {
    alert("Por favor escriba su dirección de correo");
    ThatForm.c_o_r_r_e_o.focus();
    return false;
    }
  if((ThatForm.c_o_r_r_e_o.value.indexOf("@") == -1) || (ThatForm.c_o_r_r_e_o.value.indexOf(".") == -1))
    {
    alert("Email incorrecto. Revise su dirección de correo.");
    ThatForm.c_o_r_r_e_o.focus();
    return false;
    }
  if(ThatForm.t_i_p_o.value=='')
    {
    alert("Por favor seleccione el tipo de propiedad");
    ThatForm.t_i_p_o.focus();
    return false;
    }
  if(ThatForm.l_o_c_a_l_i_d_a_d.value=='')
    {
    alert("Por favor ponga la direccion/localidad");
    ThatForm.l_o_c_a_l_i_d_a_d.focus();
    return false;
    }
  if(ThatForm.p_r_e_c_i_o.value=='')
    {
    alert("Por favor ponga el precio");
    ThatForm.p_r_e_c_i_o.focus();
    return false;
    }
  if(ThatForm.m_e_n_s_a_j_e.value=='')
    {
    alert("Por favor escriba su mensaje");
    ThatForm.m_e_n_s_a_j_e.focus();
    return false;
    }

  return true;
  }

