		function SubmitSearch()
		{
			document.getElementById("Pattern").value = document.getElementById("txtPattern").value;
			document.getElementById("frmSearch").submit();
		}
			
		function DeleteMessage(id, msg)
		{
			if (document.getElementById(id).value == msg)
				document.getElementById(id).value = '';
		}
			
		function SubmitView(ID)
		{
			window.location = "article.php?id=" + ID;			
		}
		
		function SubmitView(cat, n)
		{
			switch(cat)
			{
				case 1:
				  window.location = "casopis/infoelektronika/" + n;
				  break;
				case 2:
				  window.location = "casopis/audioprojekti/" + n;
				  break;
				case 3:
				  window.location = "knjiga/n=" + n;
				  break;				  
			}
		}
		
		function SubmitRequest(title, link)
		{
			document.getElementById("frmSearch").title.value = title;
			document.getElementById("frmSearch").filelink.value = link;
			document.getElementById("frmSearch").action = "mail.php?action=requestS";
			document.getElementById("frmSearch").submit();
		}
		
		$(function(){
			$('.nav-item a')
				.css( {backgroundPosition: "0 0"} )
				.mouseover(function(){
					$(this).stop().animate({backgroundPosition:"(0 -250px)"}, {duration:500})
				})
				.mouseout(function(){
					$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:500})
				})
		});
		
		$(document).ready(function() {
			$("#spnQty").load("include/shoppingcart_action.php?action=count");
		});