	function WinOpen(URL,name,width,height)
	{
		window.open(URL,name,"height=" + height + ",width=" + width + ",status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=1,resizable=no,fullscreen=no,left=" + ((screen.width/2) - width/2) + ",top=" + ((screen.height/2) - height/2));
	}
	
	// funkcija za sirenje opisa polja 
	function Expand(div)
	{
		var objDiv = document.getElementById(div);
		if(objDiv.style.display == "none"){
			objDiv.style.display = "";
		}
		else
		{
			objDiv.style.display = "none";
		}
		
	}
	
	function HideFlashObjects() 
	{
		var objects = document.getElementsByTagName("object");
		for (i=0; i<objects.length; i++) 
		{
			objects[i].style.visibility = "hidden";		
		}
	}
	
	function ShowFlashObjects() 
	{
		var objects = document.getElementsByTagName("object");
		for (i=0; i<objects.length; i++) 
		{
			objects[i].style.visibility = "visible";		
		}
	}
	
	function Delete(msg, linkString)
	{
		if(confirm(msg))
		{
			window.location = linkString;
		}
	}
	
	function ExpandMenu(currentMenuId, total)
	{
			    
		for(var i=0; i < total; i++)
	    {
        	document.getElementById('menuItem' + i).style.display = 'none';
	    }
	    
	    if(document.getElementById('menuItem' + currentMenuId).style.display == 'none')
	    {
	        document.getElementById('menuItem' + currentMenuId).style.display = '';
	    }
	    else
	    {
	        document.getElementById('menuItem' + currentMenuId).style.display = 'none';
	    }
	}
	
	
	function disableEnterKey(e)
    {
         var key;

         if(window.event)
              key = window.event.keyCode;     //IE
         else
              key = e.which;     //firefox

         if(key == 13)
              return false;
         else
              return true;
    }
	
	function GetOptionValue(optionName)
	{
		var objOptions = document.getElementsByName(optionName);
		
		if(objOptions.length > 0)
		{
			var val = '';
			
			for(var i=0; i < objOptions.length; i++)
			{
				if(objOptions[i].checked)
				{
					val = objOptions[i].value;
				}
			}
			
			return val;
		}
		else
		{
			return null;
		}		
	}
	
	function OnlyNumbers(obj)
	{
		if(isNaN(obj.value))
		{
			obj.value = obj.value.substring(0, obj.value.length - 1);
			
			return false;
		}
		
		return true;
	}