function show_layer(x) {
        if(document.layers)
                document.layers[x].visibility="show";
        else
                document.getElementById(x).style.visibility="visible";
}

function hide_layer(x){
        if(document.layers)
                document.layers[x].visibility="hide";
        else
                document.getElementById(x).style.visibility="hidden";
}

function init() {
        var myleft = 255;
        // переменная myleft задает смещение левого края меню относительно центра страницы
        if(document.layers)
                document.layers['menuLeft'].left=window.innerWidth/2-myleft;
        else
                document.getElementById('menuLeft').style.left=document.body.offsetWidth/2-myleft-1;
                
}

function WindowOpen(murl,name,w,h) {
var mywin;
var bfr;
bfr='toolbar=no,location=no,directories=no,status=no,menubar=no,width='+w+',height='+h+"'";

    mywin = window.open('','photo',bfr);
        mywin.document.open();
        mywin.document.write('<html><title>Sherborne Guest Home</title><body bgcolor="#500000" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" background="img/wo_bg.gif">');
        mywin.document.write('<img src='+murl+'></body></html>');
        mywin.document.close();
        mywin.document.title=name;
        mywin.focus();
}

function preloadImg(imgObj,imgSrc) {
  if (document.images) {
    eval(imgObj+' = new Image()')
    eval(imgObj+'.src = "'+imgSrc+'"')
  }
}



