//TIMER BEGIN
    var timerID = null
    var timerRunning = false

    function InitializeTimer(par_locatie) {
        // Set the length of the timer, in seconds
        StopTheClock()
        StartTheTimer(par_locatie)
    }

    function StopTheClock() {
        if (timerRunning)
            clearTimeout(timerID)
        timerRunning = false
    }

    function StartTheTimer(par_locatie) {
            //show div
            timerRunning = true
			switch (par_locatie)
				{
					case 1: timerID = self.setTimeout("HideMenuConcurs()", 200); break;
					case 2: timerID = self.setTimeout("HideMenuPlatformaDeInvatare()", 200); break;
					case 3: timerID = self.setTimeout("HideMenuBibliotecaScolaraVirtuala()", 200); break;
					case 4: timerID = self.setTimeout("HideMenuCentreDeInvatare()", 200); break;
					case 5: timerID = self.setTimeout("HideMenuScoalaAcasa()", 200); break;
				}
        }
//TIMER END

//HIDE ALL START
	function HideAll(par_locatie){
			switch (par_locatie)
				{
					case 1:
						HideMenuPlatformaDeInvatare();
						HideMenuBibliotecaScolaraVirtuala();
						HideMenuScoalaAcasa();
						break;
					case 2:
						HideMenuConcurs();
						HideMenuBibliotecaScolaraVirtuala();
						HideMenuScoalaAcasa();
						break;
					case 3:
						HideMenuPlatformaDeInvatare();
						HideMenuConcurs();
						HideMenuScoalaAcasa();
						break;
					case 4:
						HideMenuConcurs();
						HideMenuBibliotecaScolaraVirtuala();
						HideMenuPlatformaDeInvatare();
						HideMenuScoalaAcasa();
						break;
					case 5:
						HideMenuPlatformaDeInvatare();
						HideMenuConcurs();
						HideMenuBibliotecaScolaraVirtuala();
						break;	
				}
		
	}
	
//HIDE ALL END
	
//1 - SUBMENIUL CONCURS
    function HideMenuConcurs() {
            StopTheClock()
            //hide div
            tmp_buton = document.getElementById("mainmenu_concurs_li_id");
            tmp_buton.style.backgroundImage = "url('imagini/top_menu_background.png')";
            tmp_div = document.getElementById("popupmenu_concurs");
            tmp_div.style.display = "none";
        }

    function ShowConcursMenu() {
        tmp_buton = document.getElementById("mainmenu_concurs_li_id");
        tmp_buton.style.backgroundImage = "url('imagini/top_menu_ajutor_background.png')";
        tmp_div = document.getElementById("popupmenu_concurs");
        tmp_div.style.display = "block";
        timerRunning = false;
    }
//2 - SUBMENIUL PLATFORMA DE INVATARE
    function HideMenuPlatformaDeInvatare() {
            StopTheClock()
            //hide div
            tmp_buton = document.getElementById("mainmenu_platformadeinvatare_li_id");
            tmp_buton.style.backgroundImage = "url('imagini/top_menu_background.png')";
            tmp_div = document.getElementById("popupmenu_platformadeinvatare");
            tmp_div.style.display = "none";
        }

    function ShowMenuPlatformaDeInvatare() {
        tmp_buton = document.getElementById("mainmenu_platformadeinvatare_li_id");
        tmp_buton.style.backgroundImage = "url('imagini/top_menu_ajutor_background.png')";
        tmp_div = document.getElementById("popupmenu_platformadeinvatare");
        tmp_div.style.display = "block";
        timerRunning = false;
    }
//3 - SUBMENIUL BIBLIOTECA SCOLARA VIRTUALA
    function HideMenuBibliotecaScolaraVirtuala() {
            StopTheClock()
            //hide div
            tmp_buton = document.getElementById("mainmenu_bibliotecascolaravirtuala_li_id");
            tmp_buton.style.backgroundImage = "url('imagini/top_menu_background.png')";
            tmp_div = document.getElementById("popupmenu_bibliotecascolaravirtuala");
            tmp_div.style.display = "none";
        }

    function ShowMenuBibliotecaScolaraVirtuala() {
        tmp_buton = document.getElementById("mainmenu_bibliotecascolaravirtuala_li_id");
        tmp_buton.style.backgroundImage = "url('imagini/top_menu_ajutor_background.png')";
        tmp_div = document.getElementById("popupmenu_bibliotecascolaravirtuala");
        tmp_div.style.display = "block";
        timerRunning = false;
    }
//4 - CENTRE DE INVATARE
   
     
//5 - SCOALA ACASA
    function HideMenuScoalaAcasa() {
            StopTheClock()
            //hide div
            tmp_buton = document.getElementById("mainmenu_scoalaacasa_li_id");
            tmp_buton.style.backgroundImage = "url('imagini/top_menu_background.png')";
            tmp_div = document.getElementById("popupmenu_scoalaacasa");
            tmp_div.style.display = "none";
        }

    function ShowMenuScoalaAcasa() {
        tmp_buton = document.getElementById("mainmenu_scoalaacasa_li_id");
        tmp_buton.style.backgroundImage = "url('imagini/top_menu_ajutor_background.png')";
        tmp_div = document.getElementById("popupmenu_scoalaacasa");
        tmp_div.style.display = "block";
        timerRunning = false;
    }

