	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 Focus(objectId, color)
	{	
		document.getElementById(objectId).style.backgroundColor = color;
	}
	
	function ImageOver(object, objectLink) 
	{
		object.src = objectLink;
	}
	
	function Delete(msg, linkString)
	{
		if(confirm(msg))
		{
			window.location = linkString;
		}
	}
	
	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 CheckLength(objectId, maxLength, counterId)
	{
		if (document.getElementById(objectId).value.length > maxLength) 
		{
			document.getElementById(objectId).value = document.getElementById(objectId).value.substring(0, maxLength);
		}
		else
		{ 
			document.getElementById(counterId).value = maxLength - document.getElementById(objectId).value.length;
		}
	}
	
	function ConfirmLink(url, message)
	{
		if(confirm(message))
		{
			window.location = url;
		}
	}

