// //////////////////////////////////////////////////////////////////////////////////////////
function hide_show(a, b)
// //////////////////////////////////////////////////////////////////////////////////////////
{
	document.getElementById(a).style.display = 'none';
	document.getElementById(b).style.display = 'block';
}

// //////////////////////////////////////////////////////////////////////////////////////////
function toggle_visibility(id)
// //////////////////////////////////////////////////////////////////////////////////////////
{
	var e = document.getElementById(id);
	e.style.display = (e.style.display == 'none') ? 'block' : 'none';
}

// //////////////////////////////////////////////////////////////////////////////////////////
function in_array(needle, haystack, strict) {
// //////////////////////////////////////////////////////////////////////////////////////////

	var found = false, key, strict = !!strict;

	for (key in haystack)
	{
		if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle))
		{
			found = true;
			break;
		}
	}

	return found;
}

// //////////////////////////////////////////////////////////////////////////////////////////
function menuHover(elem)
// //////////////////////////////////////////////////////////////////////////////////////////
{
	elem.style.textDecoration = 'underline';
}
// //////////////////////////////////////////////////////////////////////////////////////////
function menuOut(elem)
// //////////////////////////////////////////////////////////////////////////////////////////
{
	elem.style.textDecoration = 'none';
}

// //////////////////////////////////////////////////////////////////////////////////////////
function preloadImages() 
// //////////////////////////////////////////////////////////////////////////////////////////
{
	var d = document;
	if (d.images)
	{
		if (!d.MM_p) d.MM_p = new Array();
		var i, j = d.MM_p.length;
		var a = preloadImages.arguments;
		//
		for (i = 0; i < a.length; i++)
		{
			if (a[i].indexOf("#") !=0 )
			{
				d.MM_p[j] = new Image;
				d.MM_p[j++].src = a[i];
			}
		}
	}
}

// //////////////////////////////////////////////////////////////////////////////////////////
function swapImages(tsrc, tid)
// //////////////////////////////////////////////////////////////////////////////////////////
{
	bigsrc = document.getElementById('slika_main').src;
	document.getElementById('slika_main').src = tsrc.replace('images/thumbs/', 'images/medium/');
	document.getElementById(tid).src = bigsrc.replace('images/medium/', 'images/thumbs/');
}




