var visible_menu = 0;
var visible_cont = 0;
var hides = new Array();
var shows = new Array();



function show_menu_im(id)
{
if(id && hides[id]) clearTimeout(hides[id]);

var el = document.getElementById('submenu' + id);
if( !el ) return;
el.style.display = "";

var el2 = document.getElementById('menulink' + id);
if( !el2 ) return;
el2.style.color = "#e53c07";
el2.style.borderLeft = "2px solid #cc5035";

visible_menu = id;



 for (i=1;i<5;i++){
 if (id!=i){
 el3=document.getElementById('submenu' + i);
 if( !el3 ) return;
 el3.style.display='none';
 }
 }

}


function hide_menu_im(id)
{
var el = document.getElementById('submenu' + id);
if( !el ) return;
el.style.display = "none";

var el2 = document.getElementById('menulink' + id);
if( !el2 ) return;
el2.style.color = "#e68f74";
el2.style.borderLeft = "2px solid #fff";


if(visible_menu == id) visible_menu = 0;
}




function hide_menu(id)
{
hides[id] = setTimeout("hide_menu_im(" + id +")", 500);
}

function show_menu(id)
{
show_menu_im(id);
}


function calendar_show(divid){

var divname_need = document.getElementById('calendar_hid_month' + divid );
if( !divname_need ) return;
divname_need.style.display = "";

for(i=0; i<4; i++)
    {

    var divname = document.getElementById('calendar_hid_month' + i );
    if( !divname ) return;

    if (divname != divname_need)
    {
    divname.style.display = "none";
    }

    }
}

function photo(img,hgt,wdt,number){
number=number+1;
var doc = '<html><head><title>Photo. Click to close window.</title>' + '<style>body{overflow: hidden;margin:0;}img{border:0;}</style>' + '</head><body><a href="javascript:self.close()">' + '<img alt="Click to close window" id="image" src=http://www.kharkivoda.gov.ua/photobank/' + img + ' /></a></body></html>';
popup = window.open('', number, 'HEIGHT='+ hgt + ',WIDTH=' + wdt + ',resizable=no,scrollbars=no');
popup.document.write(doc);
popup.document.close();
}
