<?
	$la_menu = array(
		array('name' => $g_term[$g_language_sign]['menu_home'], 'title' => $g_term[$g_language_sign]['menu_home'], 'link' => '', 'active' => '1', 'rbr' => 0),
		array('name' => $g_term[$g_language_sign]['menu_upravljanje_resursima'], 'title' => $g_term[$g_language_sign]['menu_upravljanje_resursima'], 'link' => 'upravljanje-resursima', 'active' => '1', 'rbr' => 2),
		array('name' => $g_term[$g_language_sign]['menu_upravljanje_dokumentima'], 'title' => $g_term[$g_language_sign]['menu_upravljanje_dokumentima'], 'link' => 'contact', 'active' => '1', 'rbr' => 3),
		array('name' => $g_term[$g_language_sign]['menu_komunikacija_suradnja'], 'title' => $g_term[$g_language_sign]['menu_komunikacija_suradnja'], 'link' => 'komunikacija-i-suradnja', 'active' => '1', 'rbr' => 4),
		array('name' => $g_term[$g_language_sign]['menu_planiranje'], 'title' => $g_term[$g_language_sign]['menu_planiranje'], 'link' => 'planiranje', 'active' => '1', 'rbr' => 1),
		array('name' => $g_term[$g_language_sign]['menu_mjerenje_analize_poboljsanja'], 'title' => $g_term[$g_language_sign]['menu_mjerenje_analize_poboljsanja'], 'link' => 'mjerenja-analize-i-poboljsanja', 'active' => '1', 'rbr' => 5),
		array('name' => $g_term[$g_language_sign]['menu_kpi_smart'], 'title' => $g_term[$g_language_sign]['menu_kpi_smart'], 'link' => 'kpi-smart', 'active' => '1', 'rbr' => 8),
		array('name' => $g_term[$g_language_sign]['menu_upravljanje_rizicima'], 'title' => $g_term[$g_language_sign]['menu_upravljanje_rizicima'], 'link' => 'upravljanje-rizicima', 'active' => '1', 'rbr' => 9),
		array('name' => $g_term[$g_language_sign]['menu_upravljanje_okolisem'], 'title' => $g_term[$g_language_sign]['menu_upravljanje_okolisem'], 'link' => 'menu_upravljanje_okolisem', 'active' => '1', 'rbr' => 10),
		array('name' => $g_term[$g_language_sign]['menu_radni_dio'], 'title' => $g_term[$g_language_sign]['menu_radni_dio'], 'link' => 'radni-dio', 'active' => '1', 'rbr' => 6),
		array('name' => $g_term[$g_language_sign]['menu_opcije_alati'], 'title' => $g_term[$g_language_sign]['menu_opcije_alati'], 'link' => 'opcije-i-alati', 'active' => '1', 'rbr' => 7)
	);                                                                       
	
	$la_submenu = array(
		array(),
		
		array(
			array('name' => $g_term[$g_language_sign]['submenu_zadaci'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_zadatak'], 'title' => $g_term[$g_language_sign]['submenu_zadatak'], 'link' => 'zadatak', 'active' => '1', 'srbr' => 3, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_pr_zadatak'], 'title' => $g_term[$g_language_sign]['submenu_pr_zadatak'], 'link' => 'projektni-zadaci', 'active' => '1', 'srbr' => 4, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_drustvo'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_osd'], 'title' => $g_term[$g_language_sign]['submenu_osd'], 'link' => '12', 'active' => '1', 'srbr' => 1, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_procesi_drustva'], 'title' => $g_term[$g_language_sign]['submenu_procesi_drustva'], 'link' => '23', 'active' => '1', 'srbr' => 2, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_osnovni_planovi'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_godisnji_ciljevi'], 'title' => $g_term[$g_language_sign]['submenu_godisnji_ciljevi'], 'link' => 'godisnji-ciljevi', 'active' => '1', 'srbr' => 5, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_budzet'], 'title' => $g_term[$g_language_sign]['submenu_budzet'], 'link' => 'godisnji-ciljevi', 'active' => '1', 'srbr' => 8, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_godisnji_planovi'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_godisnji_plan_int_audit'], 'title' => $g_term[$g_language_sign]['submenu_godisnji_plan_int_audit'], 'link' => 'godisnji-plan-internih-audita', 'active' => '1', 'srbr' => 6, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_godisnji_plan_izobrazba'], 'title' => $g_term[$g_language_sign]['submenu_godisnji_plan_izobrazba'], 'link' => 'godisnji-plan-izobrazbe', 'active' => '1', 'srbr' => 7, 'type' => 2),
		),                                                                         
		array(
			array('name' => $g_term[$g_language_sign]['submenu_ljudski_resursi'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_ljudski_resursi'], 'title' => $g_term[$g_language_sign]['submenu_ljudski_resursi'], 'link' => 'ljudski-resursi', 'active' => '1', 'srbr' => 1, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_obavezna_izobrazba'], 'title' => $g_term[$g_language_sign]['submenu_obavezna_izobrazba'], 'link' => 'obavezna-izobrazba', 'active' => '1', 'srbr' => 2, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_lijecnicki_pregledi'], 'title' => $g_term[$g_language_sign]['submenu_lijecnicki_pregledi'], 'link' => 'lijecnicki-pregledi', 'active' => '1', 'srbr' => 3, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_materijalni_resursi'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_materijalni_resursi'], 'title' => $g_term[$g_language_sign]['submenu_materijalni_resursi'], 'link' => 'materijalni-resursi', 'active' => '1', 'srbr' => 4, 'type' => 2),
			array('active' => '1', 'type' => 3),                         
			array('name' => $g_term[$g_language_sign]['submenu_vozila'], 'title' => $g_term[$g_language_sign]['submenu_vozila'], 'link' => 'vozila', 'active' => '1', 'srbr' => 5, 'type' => 2),
			array('active' => '1', 'type' => 3),
			array('name' => $g_term[$g_language_sign]['submenu_vatrogasni_aparati'], 'title' => $g_term[$g_language_sign]['submenu_vatrogasni_aparati'], 'link' => 'vatrogasni-aparati', 'active' => '1', 'srbr' => 6, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_teh_pregled_opreme'], 'title' => $g_term[$g_language_sign]['submenu_teh_pregled_opreme'], 'link' => 'tehnicki-pregled-opreme', 'active' => '1', 'srbr' => 7, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_rezervacije'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_rezervacije'], 'title' => $g_term[$g_language_sign]['submenu_rezervacije'], 'link' => 'rezervacije', 'active' => '1', 'srbr' => 8, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_pomoc'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_evidencije'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_loko_voznja'], 'title' => $g_term[$g_language_sign]['submenu_loko_voznja'], 'link' => 'loko-voznja', 'active' => '1', 'srbr' => 9, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_putni_nalozi'], 'title' => $g_term[$g_language_sign]['submenu_putni_nalozi'], 'link' => 'loko-voznja', 'active' => '1', 'srbr' => 10, 'type' => 2),
		),                                                              
		array(
			array('name' => $g_term[$g_language_sign]['submenu_upravljanje_dokumentima'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_pregled_mapa'], 'title' => $g_term[$g_language_sign]['submenu_pregled_mapa'], 'link' => 'pregled-mapa', 'active' => '1', 'srbr' => 1, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_uredjivanje_mapa'], 'title' => $g_term[$g_language_sign]['submenu_uredjivanje_mapa'], 'link' => 'uredjivanje-mapa', 'active' => '1', 'srbr' => 2, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_distribucija'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_distribucijske_liste'], 'title' => $g_term[$g_language_sign]['submenu_distribucijske_liste'], 'link' => 'distribucijske-liste', 'active' => '1', 'srbr' => 3, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_dnevnik_distribucije'], 'title' => $g_term[$g_language_sign]['submenu_dnevnik_distribucije'], 'link' => 'dnevnik-distribucije', 'active' => '1', 'srbr' => 4, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_evidencija_poste'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_pregled'], 'title' => $g_term[$g_language_sign]['submenu_pregled'], 'link' => 'pregled', 'active' => '1', 'srbr' => 7, 'type' => 2),
			array('active' => '1', 'type' => 3),                         
			array('name' => $g_term[$g_language_sign]['submenu_knjige'], 'title' => $g_term[$g_language_sign]['submenu_knjige'], 'link' => 'knjige', 'active' => '1', 'srbr' => 6, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_mape'], 'title' => $g_term[$g_language_sign]['submenu_mape'], 'link' => 'mape', 'active' => '1', 'srbr' => 5, 'type' => 2),
		),
		array(
			array('name' => $g_term[$g_language_sign]['submenu_suradnja'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_poslovni_partneri'], 'title' => $g_term[$g_language_sign]['submenu_poslovni_partneri'], 'link' => 'poslovni-partneri', 'active' => '1', 'srbr' => 1, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_poruke'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_poruke'], 'title' => $g_term[$g_language_sign]['submenu_poruke'], 'link' => 'poruke', 'active' => '1', 'srbr' => 2, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_biljeske'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_biljeske'], 'title' => $g_term[$g_language_sign]['submenu_biljeske'], 'link' => 'Biljeske', 'active' => '1', 'srbr' => 3, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_zapisnici'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_zapisnici_sa_sastanaka'], 'title' => $g_term[$g_language_sign]['submenu_zapisnici_sa_sastanaka'], 'link' => 'zapisnici-sa-sastanaka', 'active' => '1', 'srbr' => 4, 'type' => 2),
			//array('name' => 'Službena zabilješka', 'active' => '1', 'type' => 1),
			//array('name' => 'Službena zabilješka', 'title' => 'Službena zabilješka', 'link' => 'sluzbena-zabiljeska', 'active' => '1', 'srbr' => 5, 'type' => 2),
		),
		array(
			array('name' => $g_term[$g_language_sign]['submenu_prevencija_korekcija'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_nesukladnosti'], 'title' => $g_term[$g_language_sign]['submenu_nesukladnosti'], 'link' => 'nesukladnosti', 'active' => '1', 'srbr' => 1, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_popravne_radnje'], 'title' => $g_term[$g_language_sign]['submenu_popravne_radnje'], 'link' => 'popravne-radnje', 'active' => '1', 'srbr' => 2, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_zastitne_radnje'], 'title' => $g_term[$g_language_sign]['submenu_zastitne_radnje'], 'link' => 'zastitne-radnje', 'active' => '1', 'srbr' => 3, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_upitnici'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_zabiljeske_reklamacije'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_zabiljeske_reklamacije'], 'title' => $g_term[$g_language_sign]['submenu_zabiljeske_reklamacije'], 'link' => 'zabiljeske-reklamacije', 'active' => '1', 'srbr' => 5, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_ocjene'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_upravina_ocjena'], 'title' => $g_term[$g_language_sign]['submenu_upravina_ocjena'], 'link' => 'upravina-ocjena', 'active' => '1', 'srbr' => 4, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_god_ocjena_dobavljaca'], 'title' => $g_term[$g_language_sign]['submenu_god_ocjena_dobavljaca'], 'link' => 'godisnja-ocjena-dobavljaca', 'active' => '1', 'srbr' => 6, 'type' => 2),
			//array('name' => $g_term[$g_language_sign]['submenu_upravljanje_okolisem'], 'active' => '1', 'type' => 1),
		),                                                              
		array(
			array('name' => $g_term[$g_language_sign]['submenu_evidencija_racuna'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_evidencija_racuna_item'], 'title' => $g_term[$g_language_sign]['submenu_evidencija_racuna_item'], 'link' => '', 'active' => '1', 'srbr' => 1, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_ponude'], 'title' => $g_term[$g_language_sign]['submenu_ponude'], 'link' => '', 'active' => '1', 'srbr' => 2, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_predracuni'], 'title' => $g_term[$g_language_sign]['submenu_predracuni'], 'link' => '', 'active' => '1', 'srbr' => 3, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_izlazni_racuni'], 'title' => $g_term[$g_language_sign]['submenu_izlazni_racuni'], 'link' => '', 'active' => '1', 'srbr' => 4, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_blagajna'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_blagajna'], 'title' => $g_term[$g_language_sign]['submenu_blagajna'], 'link' => '', 'active' => '1', 'srbr' => 5, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_evidencija_plovila'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_evidencija_plovila'], 'title' => $g_term[$g_language_sign]['submenu_evidencija_plovila'], 'link' => '', 'active' => '1', 'srbr' => 6, 'type' => 2),
		),
		array(
			//array('name' => $g_term[$g_language_sign]['submenu_jezici'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_vizualne_opcije'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_dizajn'], 'title' => $g_term[$g_language_sign]['submenu_dizajn'], 'link' => 'dizajn', 'active' => '1', 'srbr' => 4, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_upload_background'], 'title' => $g_term[$g_language_sign]['submenu_upload_background'], 'link' => 'podloga', 'active' => '1', 'srbr' => 6, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_database_admin'], 'active' => '1', 'type' => 1, 'systemadmin' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_prijevod'], 'title' => $g_term[$g_language_sign]['submenu_prijevod'], 'link' => 'prijevod', 'active' => '1', 'srbr' => 3, 'type' => 2, 'systemadmin' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_access_permissions'], 'title' => $g_term[$g_language_sign]['submenu_access permissions'], 'link' => 'dizajn', 'active' => '1', 'srbr' => 5, 'type' => 2, 'systemadmin' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_opci_podaci'], 'active' => '1', 'type' => 1, 'systemadmin' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_tvrtka'], 'title' => $g_term[$g_language_sign]['submenu_tvrtka'], 'link' => 'tvrtka', 'active' => '1', 'srbr' => 7, 'type' => 2, 'systemadmin' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_loko'], 'title' => $g_term[$g_language_sign]['submenu_loko'], 'link' => 'tvrtka', 'active' => '1', 'srbr' => 8, 'type' => 2, 'systemadmin' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_putni'], 'title' => $g_term[$g_language_sign]['submenu_putni'], 'link' => 'tvrtka', 'active' => '1', 'srbr' => 9, 'type' => 2, 'systemadmin' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_mjesto_izdavanja_racuna'], 'title' => $g_term[$g_language_sign]['submenu_mjesto_izdavanja_racuna'], 'link' => 'mjesto_izdavanja', 'active' => '1', 'srbr' => 10, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_format_racuna'], 'title' => $g_term[$g_language_sign]['submenu_format_racuna'], 'link' => 'format_racuna', 'active' => '1', 'srbr' => 11, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_pdv'], 'title' => $g_term[$g_language_sign]['submenu_pdv'], 'link' => 'pdv', 'active' => '1', 'srbr' => 12, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_napomene'], 'title' => $g_term[$g_language_sign]['submenu_napomene'], 'link' => 'napomene', 'active' => '1', 'srbr' => 13, 'type' => 2),
			//array('name' => 'Korisnici', 'active' => '1', 'type' => 1),
			//array('name' => 'Novi korisnik', 'title' => 'Novi korisnik', 'link' => 'novi-korisnik', 'active' => '1', 'srbr' => 1, 'type' => 2),
			//array('name' => 'Aktivacija novih korisnika', 'title' => 'Aktivacija novih korisnika', 'link' => 'aktivacija-novih-korisnika', 'active' => '1', 'srbr' => 2, 'type' => 2),
		),
		array(
		),
		array(
			array('name' => $g_term[$g_language_sign]['submenu_upravljanje_rizicima'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_okolisni_rizici'], 'title' => $g_term[$g_language_sign]['submenu_okolisni_rizici'], 'link' => 'okolisni-rizici', 'active' => '1', 'srbr' => 1, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_sigurnost_na_radu'], 'title' => $g_term[$g_language_sign]['submenu_sigurnost_na_radu'], 'link' => 'sigurnost_na_radu', 'active' => '1', 'srbr' => 2, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_sigurnost_informacija'], 'active' => '1', 'type' => 1),
			array('name' => $g_term[$g_language_sign]['submenu_information_services'], 'title' => $g_term[$g_language_sign]['submenu_information_services'], 'link' => 'information_services', 'active' => '1', 'srbr' => 3, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_information_assets'], 'title' => $g_term[$g_language_sign]['submenu_information_assets'], 'link' => 'information_assets', 'active' => '1', 'srbr' => 4, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_vulnerabilities'], 'title' => $g_term[$g_language_sign]['submenu_vulnerabilities'], 'link' => 'vulnerabilities', 'active' => '1', 'srbr' => 5, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_existing_controls'], 'title' => $g_term[$g_language_sign]['submenu_existing_controls'], 'link' => 'existing_controls', 'active' => '1', 'srbr' => 6, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_treatment_plan'], 'title' => $g_term[$g_language_sign]['submenu_treatment_plan'], 'link' => 'treatment_plan', 'active' => '1', 'srbr' => 7, 'type' => 2),
			array('name' => $g_term[$g_language_sign]['submenu_information_risks'], 'title' => $g_term[$g_language_sign]['submenu_information_risks'], 'link' => 'information_risks', 'active' => '1', 'srbr' => 8, 'type' => 2),
		),
		array(
		),
	);
	
	$la_submenu_2 = array(
		/*
		array('a' => 1, 'b' => 3, 
			'c' => array(
				array('name' => 'Novi zadatak', 'title' => 'Novi zadatak', 'link' => 'novi-zadatak', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
				array('active' => '1', 'type' => 3),
				array('name' => 'Šifrarnici', 'active' => '1', 'type' => 1),
				array('name' => 'Prioritet', 'title' => 'Koji je prioritet zadatka? Primjeri su 1 - Nizak, 2 - Srednji, 3- Visok i sl.', 'link' => 'prioritet', 'active' => '1', 'ssrbr' => 2, 'type' => 2, 'sub' => 1),
				array('name' => 'Novi prioritet', 'title' => 'Novi prioritet', 'link' => 'novi-prioritet', 'active' => '1', 'ssrbr' => -1, 'type' => 2, 'sub' => 2, 'only_c' => 2),
				array('name' => 'Status', 'title' => 'Koji je status zadatka? Primjeri su 1 - Nije započeto, 2 - U čekanju, 3 - U radu, 4 - Odgođen, 5 - Završen i sl.', 'link' => 'dva', 'active' => '1', 'ssrbr' => 3, 'type' => 2, 'sub' => 1),
				array('name' => 'Novi status', 'title' => 'Novi status', 'link' => 'novi-status', 'active' => '1', 'ssrbr' => -1, 'type' => 2, 'sub' => 2, 'only_c' => 3),
				array('active' => '1', 'type' => 3),
			)
		),
		array('a' => 1, 'b' => 4, 
			'c' => array(
				array('name' => 'Novi projektni zadatak', 'title' => 'Novi projektni zadatak', 'link' => 'novi-projektni-zadatak', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		array('a' => 1, 'b' => 5, 
			'c' => array(
				array('name' => 'Novi godišnji cilj', 'title' => 'Novi godišnji cilj', 'link' => 'novi-godisnji-cilj', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		array('a' => 1, 'b' => 6, 
			'c' => array(
				array('name' => 'Novi plan', 'title' => 'Novi plan', 'link' => 'novi-plan-int-audit', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		array('a' => 1, 'b' => 7, 
			'c' => array(
				array('name' => 'Novi plan', 'title' => 'Novi plan', 'link' => 'novi-plan-izobrazbe', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		array('a' => 5, 'b' => 1,
			'c' => array(
				array('name' => 'Nova nesukladnost', 'title' => 'Nova nesukladnost', 'link' => 'nova-nesukladnost', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		array('a' => 5, 'b' => 2,
			'c' => array(
				array('name' => 'Nova popravna radnja', 'title' => 'Nova popravna radnja', 'link' => 'nova-popravna-radnja', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		array('a' => 5, 'b' => 3,
			'c' => array(
				array('name' => 'Nova zaštitna radnja', 'title' => 'Nova zaštitna radnja', 'link' => 'nova-zastitna-radnja', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		array('a' => 5, 'b' => 4,
			'c' => array(
				array('name' => 'Nova upravina ocjena', 'title' => 'Nova upravina ocjena', 'link' => 'nova-upravina-ocjena', 'active' => '1', 'ssrbr' => -1, 'type' => 2),
			)
		),
		*/
	);
	
	function get_submenu($a, $b, $a_menu){
		$result = '';
		
		//print sizeof($a_menu)." ";
		for($i = 0; $i < sizeof($a_menu); $i++){
			//print_r($a_menu[$i]);
			if($a_menu[$i]['a'] == $a && $a_menu[$i]['b'] == $b){
				for($j = 0; $j < sizeof($a_menu[$i]['c']); $j++){
					if($a_menu[$i]['c'][$j]['active'] == 'false'){
						continue;
					}
					if($a_menu[$i]['c'][$j]['ssrbr'] == $_GET['c']){
						$l_akt = 'Akt';
					}else{
						$l_akt = '';
					}
					
					switch($a_menu[$i]['c'][$j]['type']){
						case 1:
							$result .= '<li><p class="sub">'.$a_menu[$i]['c'][$j]['name'].'</p></li>'."\n";
							break;
							
						case 2:
							if($a_menu[$i]['c'][$j]['sub'] == 2 && $a_menu[$i]['c'][$j]['only_c'] != $_GET['c']){
								continue;
							}
							
							switch($a_menu[$i]['c'][$j]['sub']){
								case 1:
									$l_right = '&nbsp;&raquo;&nbsp;';
									$l_more_param = '';
									break;
									
								case 2:
									$l_right = '&nbsp; &nbsp; ';
									$l_more_param = $_GET['c'].':';
									break;
									
								default:
									$l_more_param = '';
									$l_right = '';
							}
							
							$result .= '<li><a href="'.make_link($a_menu[$i]['c'][$j]['link'], $_GET['a'].':'.$_GET['b'].':'.$l_more_param.$a_menu[$i]['c'][$j]['ssrbr']).
								'" class="a'.$l_akt.'3" title="'.$a_menu[$i]['c'][$j]['title'].'">'.$l_right.$a_menu[$i]['c'][$j]['name'].'</a></li>'."\n";
							break;
							
						case 3:
							$result .= '<hr class="subhr">';
							break;
					}
				}
				break;
			}
		}
		
		return $result;
	}
	
	
	if($_GET['a']){
?>
		<div class="leftTop">
<?
			if($_SESSION['__id']){
				$l_login = get_item('select login from zaposlenik where rbr_users_outer_db = '.$_SESSION['__id']);
					
				$l_smenu = '<ul class="slinks">'."\n";
				
				for($i = 0; $i < sizeof($la_menu); $i++){
					if($la_menu[$i]['rbr'] == $_GET['a']){
						$l_smenu .= '<li><h1>'.$la_menu[$i]['name'].'</h1></li>';
						break;
					}
				}
				
				for($i = 0; $i < sizeof($la_submenu[$_GET['a']]); $i++){
					
					if($la_submenu[$_GET['a']][$i]['systemadmin'] == 1 && $l_login != 'systemadmin'){
						continue;
					}
					
					if($la_submenu[$i]['active'] == 'false'){
						continue;
					}
					
					if($la_submenu[$_GET['a']][$i]['srbr'] == $_GET['b']){
						$l_akt = 'Akt';
					}else{
						$l_akt = '';
					}
					
					$l_smenu .= '<li>';
					switch($la_submenu[$_GET['a']][$i]['type']){
						case 1:
							$l_smenu .= '<p class="p1">'.$la_submenu[$_GET['a']][$i]['name'].'</p>';
							break;
							
						case 2:
							$l_smenu .= '<a href="'.make_link($la_submenu[$_GET['a']][$i]['link'], $_GET['a'].':'.$la_submenu[$_GET['a']][$i]['srbr']).
								'" class="a'.$l_akt.'2">'.$la_submenu[$_GET['a']][$i]['name'].'</a>';
							break;
							
						case 3:
							$l_smenu .= '<hr class="hr">';
							break;
					}
					$l_smenu .= '</li>'."\n";
					
					if($_GET['b'] == $la_submenu[$_GET['a']][$i]['srbr']){
						$l_smenu .= get_submenu($_GET['a'], $la_submenu[$_GET['a']][$i]['srbr'], $la_submenu_2);
					}
				}
				
				$l_smenu .= '</ul>'."\n";
			}
			print $l_smenu."\n";
?>
		</div>
		<div class="leftBottom">
<?
			if($_SESSION['__id']){
				/*
				$l_menu = '<ul class="links">'."\n";
				for($i = 0; $i < sizeof($la_menu); $i++){
					if($la_menu[$i]['active'] == 'false'){
						continue;
					}
					
					if($la_menu[$i]['rbr'] == $_GET['a']){
						$l_akt = 'Akt';
						$l_iakt = ' class="li2"';
					}else{
						$l_akt = '';
						$l_iakt = '';
					}
					
					$l_menu .= '<li'.$l_iakt.'><a href="'.make_link($la_menu[$i]['link'], $la_menu[$i]['rbr']).'" title="'.$la_menu[$i]['title'].'" '.
						'class="a'.$l_akt.'2">'.$la_menu[$i]['name'].'</a></li>'."\n";
				}
				$l_menu .= '<li><a href="'.$g_path_sl.'index.php/site/logout" title="'.$g_term[$g_language_sign]['menu_odjava'].'" '.
					'class="a2">'.$g_term[$g_language_sign]['menu_odjava'].'</a></li>'."\n";
				$l_menu .= '</ul>'."\n";
				*/
			}else{
				$l_menu = '<ul class="links">'."\n";
				$l_menu .= '<li><a href="'.make_link($la_menu[0]['link'], $la_menu[0]['rbr']).'" title="'.$la_menu[0]['title'].
					'" id=\'mm0\' class="a2">'.$la_menu[0]['name'].'</a>'.
					$l_submenu.'</li>'."\n";
				$l_menu .= '</ul>'."\n";
			}
			
	
			print $l_menu."\n";
?>
		</div>
<?
	}else{
		if($_SESSION['__id']){
			print '<a href="'.$g_path_sl.'logout.php" title="'.$g_term[$g_language_sign]['menu_odjava'].'" '.
				'class="logout">'.$g_term[$g_language_sign]['menu_odjava'].'</a>'."\n";
					
			$l_guid = get_item('select id from zaposlenik where rbr_users_outer_db = '.$_SESSION['__id']);
			$l_display_name = get_item('select DisplayName from zaposlenik where rbr_users_outer_db = '.$_SESSION['__id']);
			
			$x = get_item('select vrijednost from opcija_dizajn where rbr_zaposlenik = '.$_SESSION['__id']);
			if($x == 2){
?>
				<ul class="homeRightMenu">
					<li class="lirm a5">
						<p><a href="default.php?a=4&b=3" class="lirmHead">Bilješke</a></p>
						<div id="scrollbar-container-5">
							<div id="scrollbar-track-5"><div id="scrollbar-handle-5"></div></div>
							<div id="scrollbar-content-5">
<?
								$x = get_data('select id, Naziv, Datum '.
									' from zabiljeske '.
									' where izrada_id = "'.$l_guid.'" ', 1);
								$l_lis = '';
								for($i = 0; $i < sizeof($x['id']); $i++){
									$l_lis .= '<li class="liin"><a href="default.php?a=4&b=3&c='.$x['id'][$i].'" title="'.$x['Naziv'][$i].'">'.$x['Naziv'][$i].
										' ('.u_datum($x['Datum'][$i], 1).'.'.u_mjesec($x['Datum'][$i], 1).'.'.u_godina($x['Datum'][$i]).'.)</a></li>';
								}
?>
								<ul class="homeRightMenuIn">
									<?=$l_lis?>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
								</ul>
							</div>
						</div>
					</li>
				</ul>
<?
			}
?>
			
			
			<ul class="homeMenu">
				<li><a href="default.php?a=2" class="a1">Upravljanje resursima</a></li>
				<li><a href="default.php?a=3" class="a2">Upravljanje dokumentima</a></li>
				<li><a href="default.php?a=4" class="a3">Komunikacija i suradnja</a></li>
				<li><a href="default.php?a=1" class="a4">Planiranje</a></li>
				<li><a href="default.php?a=5" class="a5">Mjerenje, analize i poboljšanja</a></li>
				<li><a href="default.php?a=8" class="a6">KPI S.M.A.R.T.</a></li>
				<li><a href="default.php?a=9" class="a7">Upravljanje rizicima</a></li>
				<li><a href="default.php?a=10" class="a8">Upravljanje okolišem</a></li>
				<li><a href="default.php?a=6" class="a9">Radni dio</a></li>
				<li><a href="default.php?a=7" class="a10">Opcije i alati</a></li>
			</ul>
<?
			$x = get_item('select vrijednost from opcija_dizajn where rbr_zaposlenik = '.$_SESSION['__id']);
			if($x != 2){
?>
				<ul class="homeMenuBelow">
					<li><img src="res/images/a1.png" border="0"></li>
					<li><img src="res/images/a2.png" border="0"></li>
					<li><img src="res/images/a3.png" border="0"></li>
					<li><img src="res/images/a4.png" border="0"></li>
					<li><img src="res/images/a5b.png" border="0"></li>
					<li><img src="res/images/a6b.png" border="0"></li>
					<li><img src="res/images/a7.png" border="0"></li>
					<li><img src="res/images/a8.png" border="0"></li>
					<li><img src="res/images/a9b.png" border="0"></li>
					<li><img src="res/images/a10b.png" border="0"></li>
				</ul>
<?
			}
			
?>
			
			<ul class="homeRightMenu">
				<li class="lirm a1">
					<p><a href="default.php?a=1&b=3" class="lirmHead">Zadaci</a></p>
					<div id="scrollbar-container-1">
						<div id="scrollbar-track-1"><div id="scrollbar-handle-1"></div></div>
						<div id="scrollbar-content-1">
<?
							$x = get_data('select task.id, task.Naziv, task_assigned_to.Napomena, task_assigned_to.Datum '.
								' from task, task_assigned_to '.
								' where task.id = task_assigned_to.task_id '.
								' and task.task_status_id = "6ab46051-215b-415d-b99b-37b9189d566b" '.
								' and task_assigned_to.task_status_id = "6ab46051-215b-415d-b99b-37b9189d566b" '.
								' and (task.assigned_by = "'.$l_guid.'" or task_assigned_to.assigned_to = "'.$l_guid.'")', 1);
							$l_lis = '';
							for($i = 0; $i < sizeof($x['id']); $i++){
								$l_lis .= '<li class="liin"><a href="default.php?a=1&b=3&c='.$x['id'][$i].'" title="'.$x['Napomena'][$i].'">'.$x['Naziv'][$i].
									' ('.u_datum($x['Datum'][$i], 1).'.'.u_mjesec($x['Datum'][$i], 1).'.'.u_godina($x['Datum'][$i]).'.)</a></li>';
							}
?>
							<ul class="homeRightMenuIn">
								<?=$l_lis?>
								<li class="liin">Zadatak 1</li>
								<li class="liin">Zadatak 2</li>
								<li class="liin">Zadatak 3</li>
								<li class="liin">Zadatak 4</li>
							</ul>
						</div>
					</div>
				</li>
				<li class="lirm a2">
					<p><a href="default.php?a=1&b=4" class="lirmHead">Projektni zadaci</a></p>
					<div id="scrollbar-container-2">
						<div id="scrollbar-track-2"><div id="scrollbar-handle-2"></div></div>
						<div id="scrollbar-content-2">
<?
							$x = get_data('select zadatak.id, zadatak.NazivZadatka '.
								' from zadatak, zadatak_aktivnosti '.
								' where zadatak.id = zadatak_aktivnosti.zadatak_id '.
								' and concat(", ", zadatak_aktivnosti.OdgovornaOsoba, ", ") like "%, '.$l_display_name.',%" ', 1);
							$l_lis = '';
							for($i = 0; $i < sizeof($x['id']); $i++){
								$l_lis .= '<li class="liin"><a href="default.php?a=1&b=4&c='.$x['id'][$i].'" title="'.$x['NazivZadatka'][$i].'">'.$x['NazivZadatka'][$i].'</a></li>';
							}
?>
							<ul class="homeRightMenuIn">
								<?=$l_lis?>
								<li class="liin">Zadatak 1</li>
								<li class="liin">Zadatak 2</li>
								<li class="liin">Zadatak 1</li>
								<li class="liin">Zadatak 2</li>
								<li class="liin">Zadatak 1</li>
								<li class="liin">Zadatak 2</li>
								<li class="liin">Zadatak 1</li>
								<li class="liin">Zadatak 2</li>
								<li class="liin">Zadatak 1</li>
								<li class="liin">Zadatak 2</li>
							</ul>
						</div>
					</div>
				</li>
				<li class="lirm a3">
					<p><a href="default.php?a=4&b=2" class="lirmHead">Poruke</a></p>
					<div id="scrollbar-container-3">
						<div id="scrollbar-track-3"><div id="scrollbar-handle-3"></div></div>
						<div id="scrollbar-content-3">
<?
							$x = get_data('select poruke.id, poruke.Poruka '.
								' from poruke '.
								' where za_id = "'.$l_guid.'" ', 1);
							$l_lis = '';
							for($i = 0; $i < sizeof($x['id']); $i++){
								$l_lis .= '<li class="liin"><a href="default.php?a=4&b=2&c='.$x['id'][$i].'" title="'.$x['Poruka'][$i].'">'.skrati_tekst($x['Poruka'][$i], 30).'</a></li>';
							}
?>
							<ul class="homeRightMenuIn">
								<?=$l_lis?>
								<li class="liin">Poruka 1</li>
								<li class="liin">Poruka 2</li>
								<li class="liin">Poruka 1</li>
								<li class="liin">Poruka 2</li>
								<li class="liin">Poruka 1</li>
								<li class="liin">Poruka 2</li>
								<li class="liin">Poruka 1</li>
								<li class="liin">Poruka 2</li>
								<li class="liin">Poruka 1</li>
								<li class="liin">Poruka 2</li>
							</ul>
						</div>
					</div>
				</li>
				<li class="lirm a4">
					<p>Distribucijska lista</p>
					<div id="scrollbar-container-4">
						<div id="scrollbar-track-4"><div id="scrollbar-handle-4"></div></div>
						<div id="scrollbar-content-4">
<?
							$x = get_data('select distribucijska_lista_log.id, distribucijska_lista_log.DocumentName '.
								' from distribucijska_lista_log, distribucijska_lista_primatelji '.
								' where distribucijska_lista_log.distribucijska_lista_primatelji_id = distribucijska_lista_primatelji.id '.
								' and distribucijska_lista_primatelji.primatelj_id = "'.$l_guid.'" '.
								' and distribucijska_lista_log.potvrda = 0 ', 1);
							$l_lis = '';
							for($i = 0; $i < sizeof($x['id']); $i++){
								$l_lis .= '<li class="liin"><a href="#" onclick="window.open(\'res/distr_get?guid='.$x['id'][$i].'\'); setTimeout(\'location.reload()\',2000); return false;" title="'.$x['DocumentName'][$i].'"'.
									'>'.$x['DocumentName'][$i].'</a></li>';
							}
?>
							<ul class="homeRightMenuIn">
								<?=$l_lis?>
								<li class="liin">Datoteka 1</li>
								<li class="liin">Datoteka 2</li>
								<li class="liin">Datoteka 1</li>
								<li class="liin">Datoteka 2</li>
								<li class="liin">Datoteka 1</li>
								<li class="liin">Datoteka 2</li>
								<li class="liin">Datoteka 1</li>
								<li class="liin">Datoteka 2</li>
								<li class="liin">Datoteka 1</li>
								<li class="liin">Datoteka 2</li>
							</ul>
						</div>
					</div>
				</li>
				
				
<?
				$x = get_item('select vrijednost from opcija_dizajn where rbr_zaposlenik = '.$_SESSION['__id']);
				if($x != 2){
?>
					<li class="lirm a5">
						<p><a href="default.php?a=4&b=3" class="lirmHead">Bilješke</a></p>
						<div id="scrollbar-container-5">
							<div id="scrollbar-track-5"><div id="scrollbar-handle-5"></div></div>
							<div id="scrollbar-content-5">
<?
								$x = get_data('select id, Naziv, Datum '.
									' from zabiljeske '.
									' where izrada_id = "'.$l_guid.'" ', 1);
								$l_lis = '';
								for($i = 0; $i < sizeof($x['id']); $i++){
									$l_lis .= '<li class="liin"><a href="default.php?a=4&b=3&c='.$x['id'][$i].'" title="'.$x['Naziv'][$i].'">'.$x['Naziv'][$i].
										' ('.u_datum($x['Datum'][$i], 1).'.'.u_mjesec($x['Datum'][$i], 1).'.'.u_godina($x['Datum'][$i]).'.)</a></li>';
								}
?>
								<ul class="homeRightMenuIn">
									<?=$l_lis?>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
									<li class="liin">Bilješka 1</li>
									<li class="liin">Bilješka 2</li>
								</ul>
							</div>
						</div>
					</li>
<?
				}
?>
			</ul>
<?
		}
	}
?>
