<!--
/*=====================================================================
								PRINT POPUP
  =====================================================================*/
var oknoPrint = null;
function print_page(doc, w, h)
{
  	if (w == null) w = 790;
  	if (h == null) h = 590;
	if (oknoPrint==null || oknoPrint.closed)
	{
		oknoPrint = window.open(doc,"print",'toolbar=no,width='+ w +',height='+ h +',resizable=yes,scrollbars=yes,directories=no,status=no,menubar=yes,location=no');
		oknoPrint.creator = self;      
	}
	else
	{
		oknoPrint.location = doc;
		oknoPrint.focus();
	}
}


/*=====================================================================
							SHOW PRINT ICON
  =====================================================================*/
document.write ("<style>");
document.write ("#print {display:block;}");
document.write ("</style>");


/*=====================================================================
							SHOW/HIDE TABS
  =====================================================================*/
function showTab(id)
{	
	// vzamemo 5 cifer nazaj in 5 naprej
	start = id - 5;
	end = id + 5;
	
	// skrijemo trenutno prižganega
	for (i=start; i<=end; i++)
	{
		if (document.getElementById('tabContent'+i))
		{
			document.getElementById('tabContent'+i).style.display = 'none';	
			document.getElementById('tab'+i).className = '';
		}
	}
	
	// prižgemo izbranega
	if (!document.getElementById('tabContent'+id))
	{
		id = 1;
	}
	document.getElementById('tabContent'+id).style.display = 'block';
	document.getElementById('tab'+id).className = 'on';
}

/*=====================================================================
							RESIZE TEXT
  =====================================================================*/
function textUp()
{
	if (textSize < 1)	// 1 je najvisja stopnja
	{ 
		textSize = textSize + 1;
		replaceCSS(textSize);
	}
}

function textDown()
{
	if (textSize > -1) // -1 je najnizja stopnja
	{
		textSize = textSize - 1;
		replaceCSS(textSize);
	}
}

function replaceCSS(textSize)
{
	var i, a;
	for (i = 0; (a = document.getElementsByTagName("link")[i]); i++)
	{
		if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alt") != -1 && a.getAttribute("title"))
		{
			a.disabled = true;
			if (textSize == -1 && a.getAttribute("title") == "small")
			{
				a.disabled = false; // mali fonti
			}
			else if (textSize == 1 && a.getAttribute("title") == "large")
			{
				a.disabled = false; // veliki fonti
			}
		}
	}
}

function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

// ko zapustimo stran, se zapiše v cookie izbrana velikost - ce je razlicna od default
window.onunload = function(e)
{
	if (textSize != 0) createCookie("textSize", textSize, 365);
	else createCookie("textSize","",-1);
}

// preberemo cookie ko se stran louda in ce ni default velikost, zamenamo stylesheet
if (document.cookie.indexOf("textSize") != -1) // preverimo, ce obstaja cookie
{
	textSize = parseInt(readCookie("textSize"));
	replaceCSS(textSize);
}
else
{
	var textSize = 0;
}
// -->