
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function openPhoto( path, alt, w, h, titl )
{
        var wo = window.open( '', '_photo', 'width=' + w + ', height=' + h + ',scrollbars=0, menubar=0, titlebar=0, status=0, directories=0, resizable=0' );
        wo.document.write('<html>');
        wo.document.write('<head>');
        wo.document.write('<title>' + titl + '</title>');
        wo.document.write('</head>');
        wo.document.write('<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor="#FFFFFF">');
        wo.document.write('<img style="cursor:pointer" src= ' + path + ' border="0" vspace="0" hspcae="0" alt="' + alt +'" title="' + alt +'" OnClick="window.close();">');
        wo.document.write('</body>');
        wo.document.write('</html>');
        wo.focus();
        return false;
}

function enter()
{
        var name = window.document.getElementById('name');
        var email = window.document.getElementById('email');
        var msg = window.document.getElementById('msg');
        var check = 0;
        var go_sub = window.document.getElementById('sub_but');

        if ((name.value == "Eiy*") || (name.value == "")) { check = 1; }
        if ((email.value == "E-mail*") || (email.value == "")) { check = 1; }
        if ((msg.value == "Aaoa niiauaiea*") || (msg.value == "")) { check = 1; }

        if (check == 1)
        {
                go_sub.disabled = true;
        } else {
                go_sub.disabled = false;
               }
        return true;
}

function changeImage(id_element,i)
{
  var DOM_element = document.getElementById(id_element);
  if (i == 1) {
    DOM_element.className = 'door_on';
  } else {
          DOM_element.className = 'door';
    }
}

function Reset_div(id_div) {
        var dom = window.document.getElementById(id_div);
        if (dom.style.display == 'block') {
                dom.style.display = 'none'; }
        else {
                dom.style.display = 'block'; }
}

function Reset_div_all(id_div) {
  for (i=0; i<1000; i++) {
        if (window.document.getElementById(id_div+i)) {
      var dom = window.document.getElementById(id_div+i);
      if (dom.style.display == 'block') {
        dom.style.display = 'none';
          } else {
          dom.style.display = 'block';
                }
        }
  }
}

function Reset_img(id_img,img1,img2) {
        var dom_img = window.document.getElementById(id_img);
        if (dom_img.style.backgroundImage == img1) {
                dom_img.style.backgroundImage = img2; }
        else {
                dom_img.style.backgroundImage = img1; }
}

function openText( path, alt, w, h, titl )
{
        var wo = window.open( '', '_photo', 'width=' + w + ', height=' + h + ',scrollbars=0, menubar=0, titlebar=0, status=0, directories=0, resizable=0' );
        wo.document.write('<html>');
        wo.document.write('<head>');
        wo.document.write('<title>' + titl + '</title>');
        wo.document.write('</head>');
        wo.document.write('<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor="#FFFFFF">');
        wo.document.write('<div style="">' + path + '</div>');
        wo.document.write('</body>');
        wo.document.write('</html>');
        wo.focus();
        return false;
}