// JavaScript Document
<!--
var aktivan = 1;

function toggle_menu()
{
	menu = document.getElementById('menu_cont');
	menu_pos = parseInt(document.getElementById('menu_cont').style.left.replace('px',''));
	lnk = document.getElementById('toggle_menu');
	fix = document.getElementById('fixed');
	
 	if(menu_pos < 0)
 	{
	 	cilj = 0;
		lnk.style.background = 'url(/images/menu_zatvori.png) left bottom no-repeat';		
		p = new Tween(menu.style,'left',Tween.regularEaseInOut,menu_pos,cilj,0.2,'px');
		p.start();
		f = new Tween(fix.style,'width',Tween.regularEaseInOut,70,325,0.2,'px');
		f.start();
 	}
	if(menu_pos == 0)
 	{
	 	cilj = -255;
		lnk.style.background = 'url(/images/menu_otvori.png) left bottom no-repeat';
		p = new Tween(menu.style,'left',Tween.regularEaseInOut,menu_pos,cilj,0.2,'px');
		p.start();
		f = new Tween(fix.style,'width',Tween.regularEaseInOut,325,70,0.2,'px');
		f.start();
 	}	
}
function toggle_menu2()
{
	menu = document.getElementById('menu_cont');
	menu_pos = parseInt(document.getElementById('menu_cont').style.left.replace('px',''));
	lnk = document.getElementById('toggle_menu');
	fix = document.getElementById('fixed');
	
 	if(menu_pos == -255)
 	{
	 	cilj = 0;
		lnk.style.background = 'url(/images/menu_zatvori.png) left bottom no-repeat';
		p = new Tween(menu.style,'left',Tween.regularEaseInOut,menu_pos,cilj,0.2,'px');
		p.start();
		f = new Tween(fix.style,'width',Tween.regularEaseInOut,70,325,0.2,'px');
		f.start();
 	}	
}
function toggle_menu3()
{
	menu = document.getElementById('menu_cont');
	menu_pos = parseInt(document.getElementById('menu_cont').style.left.replace('px',''));
	lnk = document.getElementById('toggle_menu');
	fix = document.getElementById('fixed');
	
 	if(menu_pos == 0)
 	{
	 	cilj = -255;
		lnk.style.background = 'url(/images/menu_otvori.png) left bottom no-repeat';
		p = new Tween(menu.style,'left',Tween.regularEaseInOut,menu_pos,cilj,0.2,'px');
		p.start();	
		f = new Tween(fix.style,'width',Tween.regularEaseInOut,325,70,0.2,'px');
		f.start();
 	}
}
function link_over(id)
{
	idx = parseInt(id);	
	if (aktivan != idx)
	{
		lnk = document.getElementById('main_menu_link_' + id);
		lnk.style.color = '#C59C6E';
	}
}
function link_out(id)
{
	idx = parseInt(id);
	if (aktivan != idx)
	{		
		lnk = document.getElementById('main_menu_link_' + id);
		lnk.style.color = '#FFFDF1';
	}
}


function stranica(id)
{
	idx = parseInt(id);
	
	for(i=1;i<10;i++)
	{
		if (i === idx)
		{
			if (document.getElementById('main_menu_link_cont_' + i)) document.getElementById('main_menu_link_cont_' + i).style.background = 'url(/images/bg_link.png) left top no-repeat';
			if (document.getElementById('main_menu_link_' + i)) document.getElementById('main_menu_link_' + i).style.background = '#FFFDF1';
			if (document.getElementById('main_menu_link_' + i)) document.getElementById('main_menu_link_' + i).style.color = '#B32317';
			if (document.getElementById('bg_main_menu_link_' + i)) document.getElementById('bg_main_menu_link_' + i).style.background = 'url(/images/bg_link_dolje.png) left bottom no-repeat';
			
			if (document.getElementById('footer_menu_link_' + i)) document.getElementById('footer_menu_link_' + i).style.color = '#7A1600';
			if (document.getElementById('main_menu_link_' + i)) aktivan = i;				
		}
		else
		{
			if (document.getElementById('main_menu_link_cont_' + i)) document.getElementById('main_menu_link_cont_' + i).style.background = 'none';
			if (document.getElementById('main_menu_link_' + i)) document.getElementById('main_menu_link_' + i).style.background = 'none';
			if (document.getElementById('main_menu_link_' + i)) document.getElementById('main_menu_link_' + i).style.color = '#FFFDF1';
			if (document.getElementById('bg_main_menu_link_' + i)) document.getElementById('bg_main_menu_link_' + i).style.background = 'none';
			
			if (document.getElementById('footer_menu_link_' + i)) document.getElementById('footer_menu_link_' + i).style.color = '#C59C6E';			
		}
	}	
}

function findPos(obj) 
{
	var curleft = curtop = 0;
	if (obj.offsetParent) do
	{
		curleft += obj.offsetLeft;
		curtop += obj.offsetTop;
	} 
	while (obj = obj.offsetParent);
	return [curleft,curtop];
}

function prikazi_sliku(id, div)
{
	ajax_loadContent('slika_' + div,'/required/slika.php?slika=' + id);	
}


-->



