function adjNav(){
    browserWidth = document.documentElement.clientWidth;
    leftEdge = (browserWidth - 1000)/2;
    document.getElementById('nav').style.left = leftEdge + 25 + "px";
    document.getElementById('nav').style.visibility = "visible";
    if(navigator.userAgent.indexOf("Firefox")){
        document.getElementById('base').style.backgroundImage="url('images/site_base2.png')"; }
    }
function chkForm(){
    if(document.forms['mailfrm'].elements['email'].value=="" && document.forms['mailfrm'].elements['telephone_number'].value==""){
        alert('Please fill in at least your e-mail address or your telephone number so we can get back to you'); }
        else{
            /* alert('email=' + document.forms['mailfrm'].elements['email'].value + '\nphone=' + document.forms['mailfrm'].elements['phone'].value); */
            document.forms[0].submit();
        }
}
function moveNav(){/* 1. Move with scroll */
                if(navigator.userAgent.indexOf("MSIE")!=-1){
                  if(parseFloat(document.documentElement.scrollTop)>250){
                    document.getElementById('nav').style.top = parseFloat(document.documentElement.scrollTop) + 50 + "px";
                  }
                }
                else{
                    /* bottomLimit = parseFloat(parseFloat(document.documentElement.clientHeight) - 375 - 15);
                    window.status = "bottomLimit: " + bottomLimit + ", window.scrollY+325: " + parseFloat(parseFloat(window.scrollY) + 325);
                    if(parseFloat(window.scrollY) + 325 > bottomLimit){
                        document.getElementById('nav').style.top = bottomLimit + "px";  }
                        else{   document.getElementById('nav').style.top = parseFloat(window.scrollY) + 325 + "px";  }*/
                      if(parseFloat(window.scrollY) > 250){
                            document.getElementById('nav').style.top = parseFloat(window.scrollY) + 50 + "px";
                            window.status = window.scrollY;
                      }
                }
}
window.onresize = adjNav;
window.onscroll = moveNav;