function checkBrowserAndChangeBaner()
{
  var browser = navigator.appName;
  if(browser == "Netscape") {
    var baner = document.getElementById("banerTop");
    baner.src = "http://saniterm.yoyo.pl/media/saniterm.gif";
    baner.style.display = "block";
  }
}

function validate_email(field,alerttxt)
{
  with (field) {
    apos=value.indexOf("@");
    dotpos=value.lastIndexOf(".");
    if (apos<1||dotpos-apos<2) {
      alert(alerttxt);
      return false;
    }
    else {
      return true;
    }
  }
}

function validate_form_pol(thisform, lang)
{
  with (thisform) {  
    if (validate_email(email, "Nie poprawny adres e-mail!") == false) {
      email.focus();
      return false;
    }
  }
}
function validate_form_eng(thisform, lang)
{
  with (thisform) {
    if (validate_email(email, "Not a valid e-mail adress!") == false) {
      email.focus();
      return false;
    }
  }
}
function validate_form_ger(thisform, lang)
{
  with (thisform) { 
    if (validate_email(email, "Niepoprawny adres e-mail!") == false) {
      email.focus();
      return false;
    }
  }
}


function blokuj_prawy(event)
{
/*  if(event.button != 1) {
    alert("");
  }*/
}

function openImageWindow(name, w, h) {
  var options = "width=" + w + ",height=" + h + ",";
  options += "resizable=no,scrollbars=no,status=no,";
  options += "menubar=no,toolbar=no,location=no,directories=no";
  url = "materialy/produkty/" + name + "-l.jpg";
  var newWin = window.open(url, 'newWin', options);
  newWin.focus();
}

function  changePicture(id, onWhich) {
  var point = document.getElementById(id);
  point.src = onWhich;
}

