	<script type="text/javascript" src="<?=$g_path_sl_res?>js/f-58.js"></script>
	<script type="text/javascript" src="<?=$g_path_sl_res?>js/datetimepicker_css.js"></script>
	<script type="text/javascript">
		var g_path_sl = '<?=$g_path_sl?>';
		var g_path_sl_res = '<?=$g_path_sl_res?>';
	</script>

<?
	if(!$_GET['a'] && !$_GET['b']){
		// naslovnica
?>
		<script type="text/javascript" src="<?=$g_path_sl_res?>js/livepipe-ui-master/all.js"></script>
		<script type="text/javascript">
			document.observe('dom:loaded',function(){
				
			var scrollbar = new Control.ScrollBar('scrollbar-content-1','scrollbar-track-1');
			var scrollbar = new Control.ScrollBar('scrollbar-content-2','scrollbar-track-2');
			var scrollbar = new Control.ScrollBar('scrollbar-content-3','scrollbar-track-3');
			var scrollbar = new Control.ScrollBar('scrollbar-content-4','scrollbar-track-4');
			var scrollbar = new Control.ScrollBar('scrollbar-content-5','scrollbar-track-5');
			
			/*
			$('scroll_down_50').observe('click',function(event){
				scrollbar.scrollBy(-50);
				event.stop();
			});
			
			$('scroll_up_50').observe('click',function(event){
				scrollbar.scrollBy(50);
				event.stop();
			});
			
			$('scroll_top').observe('click',function(event){
				scrollbar.scrollTo('top');
				event.stop();
			});
			
			$('scroll_bottom').observe('click',function(event){
				//to animate a scroll operation you can pass true
				//or a callback that will be called when scrolling is complete
				scrollbar.scrollTo('bottom',function(){
					if(typeof(console) != "undefined")
						console.log('Finished scrolling to bottom.');
				});
				event.stop();
			});
			
			$('scroll_second').observe('click',function(event){
				//you can pass a number or element to scroll to
				//if you pass an element, it will be centered, unless it is
				//near the bottom of the container
				scrollbar.scrollTo($('second_subhead'));
				event.stop();
			});
			
			$('scroll_third').observe('click',function(event){
				//passing true will animate the scroll
				scrollbar.scrollTo($('third_subhead'),true);
				event.stop();
			});
			
			$('scroll_insert').observe('click',function(event){
				$('scrollbar-content-1').insert('&lt;p><b>Inserted: ' + $('repeat').innerHTML + '</b>&lt;/p&gt;');
				//you only need to call this if ajax or dom operations modify the layout
				//this is automatically called when the window resizes
				scrollbar.recalculateLayout();
				event.stop();
			});
			*/
	
			});
		</script>
<?
	}
	
	
	switch($_GET['a']){
		case 1:
			switch($_GET['b']){
				case 1:
?>
					<script type="text/javascript">
						var g_akcija_promijeni_podatke = '<?=$g_term[$g_language_sign]['top_akcija_promijeni_podatke']?>';
						var g_akcija_dodaj_novu_org_jedinicu = '<?=$g_term[$g_language_sign]['top_akcija_dodaj_novu_org_jedinicu']?>';
						var g_akcija_brisi_org_jedinicu = '<?=$g_term[$g_language_sign]['top_akcija_brisi_org_jedinicu']?>';
					</script>
<?
					include $g_path."html/hjs_organizacijska_shema_drustva.php";
					break;
				
				default:
			}
			break;
			
		case 3:
			switch($_GET['b']){
				case 1:
					include $g_path."html/hjs_pregled_mapa.php";
?>
					<script type="text/javascript">
						var g_akcija_pregled_dokumenata = '<?=$g_term[$g_language_sign]['top_akcija_pregled_dokumenata']?>';
						var g_akcija_dodaj_novi_dokument = '<?=$g_term[$g_language_sign]['top_akcija_dodaj_novi_dokument']?>';
					</script>
<?
					break;
					
				case 2:
					include $g_path."html/hjs_uredjivanje_mapa.php";
?>
					<script type="text/javascript">
						var g_akcija_dodaj_novu_mapu = '<?=$g_term[$g_language_sign]['top_akcija_dodaj_novu_mapu']?>';
						var g_akcija_dodaj_novu_podmapu = '<?=$g_term[$g_language_sign]['top_akcija_dodaj_novu_podmapu']?>';
					</script>
<?
					break;
				
				default:
			}
			break;
		
		case 4:
			switch($_GET['b']){
				case 3:
?>
					<script type="text/javascript" src="res/js/tiny_mce/tiny_mce.js"></script>
					<script type="text/javascript">
						tinyMCE.init({
							// General options
							mode : "textareas",
							theme : "advanced",
							plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",
					
							// Theme options
							//theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
							theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
							theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
							//theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
							//theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
							theme_advanced_toolbar_location : "top",
							theme_advanced_toolbar_align : "left",
							theme_advanced_statusbar_location : "bottom",
							theme_advanced_resizing : true,
					
							// Example content CSS (should be your site CSS)
							//content_css : "css/content.css",
					
							// Drop lists for link/image/media/template dialogs
							template_external_list_url : "lists/template_list.js",
							external_link_list_url : "lists/link_list.js",
							external_image_list_url : "lists/image_list.js",
							media_external_list_url : "lists/media_list.js",
					
							// Style formats
							style_formats : [
								{title : 'Bold text', inline : 'b'},
								{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
								{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
								{title : 'Example 1', inline : 'span', classes : 'example1'},
								{title : 'Example 2', inline : 'span', classes : 'example2'},
								{title : 'Table styles'},
								{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
							],
					
							// Replace values for the template plugin
							template_replace_values : {
								username : "Some User",
								staffid : "991234"
							}
						});
					</script>
<?
					break;
				
				default:
			}
			break;
			
		case 6:
			if($_GET['b'] == 7 && $_GET['addition'] == 'Primka'){
?>
			<script type="text/javascript">
				
				
				function onload_function(){
					if(location.hash){
						var la_split = location.hash.split('#rec_item_id/');
						if(la_split.length > 1){
							document.getElementById('clickmeedit-' + la_split[1]).click();
							location.hash = '#';
						}
					}
				}
				
				if(typeof close_layers !== "function"){
					function check_hash_change(){
					}
				}
				
				var readyStateCheckInterval = setInterval(function() {
					//console.log(document.readyState);
					if (document.readyState === "interactive" || document.readyState === "complete") {
						clearInterval(readyStateCheckInterval);
						onload_function();
					}
				}, 200);
				
			</script>
<?
			}
			break;
			
		default:
	}
?>