function changeFon_but(id,swith) {
if(swith==1) {
document.getElementById(id).style.background = '#fcf09c';
document.getElementById(id).style.color = '#1F3618';
}
else if(swith==2){
document.getElementById(id).style.background = '#1F3618';
document.getElementById(id).style.color = '#ffffff';
}
}

function changeFon(id,swith) {
if(((window.location.pathname == '/index.shtml') || (window.location.pathname == '/')) && (id!='i1' || id!='i11')) {
if(swith==1) {document.getElementById('a_'+id).style.background = 'url(/am_gif/s003.gif) no-repeat left';}
if(swith==2) {document.getElementById('a_'+id).style.background = '';}
}
else if((window.location.pathname == '/room.shtml') && (id!='i2' || id!='i21')) {
if(swith==1) {document.getElementById('a_'+id).style.background = 'url(/am_gif/s003.gif) no-repeat left';}
if(swith==2) {document.getElementById('a_'+id).style.background = '';}
}
else if((window.location.pathname == '/serv.shtml') && (id!='i3' || id!='i31')) {
if(swith==1) {document.getElementById(id).style.background = 'url(/am_gif/s003.gif) no-repeat left';}
if(swith==2) {document.getElementById(id).style.background = '';}
}
else if((window.location.pathname == '/price.shtml') && (id!='i4' || id!='i41')) {
if(swith==1) {document.getElementById(id).style.background = 'url(/am_gif/s003.gif) no-repeat left';}
if(swith==2) {document.getElementById(id).style.background = '';}
}
else if(((window.location.pathname == '/project.php') || (window.location.pathname == '/spisok_zayavok.php') || (window.location.pathname == '/gallery/')) && (id!='i5' || id!='i51')) {
if(swith==1) {document.getElementById(id).style.background = 'url(/am_gif/s003.gif) no-repeat left';}
if(swith==2) {document.getElementById(id).style.background = '';}
}
else if((window.location.pathname == '/shema.shtml') && (id!='i6' || id!='i61')) {
if(swith==1) {document.getElementById(id).style.background = 'url(/am_gif/s003.gif) no-repeat left';}
if(swith==2) {document.getElementById(id).style.background = '';}
}
}
function page_view(){
//alert(window.location.pathname);
if((window.location.pathname == '/index.shtml') || (window.location.pathname == '/')) {
document.getElementById('a_i1').style.background = 'url(/am_gif/s003.gif) no-repeat left';
document.getElementById('a_i1').style.color = '#fcf09c';
document.getElementById('a_i1').style.textDecoration = 'underline';
}
else if(window.location.pathname == '/room.shtml') {
document.getElementById('a_i2').style.background = 'url(/am_gif/s003.gif) no-repeat left';
document.getElementById('a_i2').style.color = '#fcf09c';
document.getElementById('a_i2').style.textDecoration = 'underline';
}
else if(window.location.pathname == '/serv.shtml') {
document.getElementById('i3').style.background = 'url(/am_gif/s003.gif) no-repeat left';
document.getElementById('a_i3').style.color = '#fcf09c';
document.getElementById('a_i3').style.textDecoration = 'underline';
}
else if(window.location.pathname == '/price.shtml') {
document.getElementById('i4').style.background = 'url(/am_gif/s003.gif) no-repeat left';
document.getElementById('a_i4').style.color = '#fcf09c';
document.getElementById('a_i4').style.textDecoration = 'underline';
}
else if((window.location.pathname == '/project.php') || (window.location.pathname == '/spisok_zayavok.php') || (window.location.pathname == '/gallery/')) {
document.getElementById('i5').style.background = 'url(/am_gif/s003.gif) no-repeat left';
document.getElementById('a_i5').style.color = '#fcf09c';
document.getElementById('a_i5').style.textDecoration = 'underline';
}
else if(window.location.pathname == '/shema.shtml') {
document.getElementById('i6').style.background = 'url(/am_gif/s003.gif) no-repeat left';
document.getElementById('a_i6').style.color = '#fcf09c';
document.getElementById('a_i6').style.textDecoration = 'underline';
}
}

function show_gif(i){
         document.all[i].style.visibility = "visible";

}
function close_gif(i){
         document.all[i].style.visibility = "hidden";
}
var nw1;
function show(file, name, width, height)
        {
    if(nw1) nw1.close();
    nw=window.open('', 'wbl', 'width='+width+',height='+height+',titlebar=yes,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
    nw.document.write('<html><title>'+name+'</title><body  bgcolor="#C0C0C0" leftmargin="0" topmargin="70" marginwidth="0" marginheight="100"><center><img src="'+file+'" title="'+name+'"></center></body></html>');
    nw1=nw;
    }
function path(name) {
  window.open("/path/path"+name+".html", "displayWindow", "width=800, height=700 status=no,toolbar=no,menubar=no,scrollbars=yes");
}
function closeIt() {
close();
}

