function validateForm(form) {
	for (var f = 0; f < form.length; f++)
	{
		if (form[f].type == "text" || form[f].type == "password")
		{
			if (form[f].value == "")
			{
				alert("Polje "+form[f].name+" ne sme da bude prazno.");

				return false;
			}
		}
	}
}

function showSubmenu(menuId)
{
	var id = eval(menuId) + 1;
	// alert(id);

	if (document.getElementById("menu_"+id))
	{
		var divStyle = "" + document.getElementById("menu_"+id).style.display;
		// alert(divStyle);

		if (divStyle == "" || divStyle == "none")
		{
			document.getElementById("menu_"+id).style.display = "block";
			document.getElementById("row_"+menuId).style.background = "#9b2122";
		}

		if (divStyle == "block")
		{
			document.getElementById("menu_"+id).style.display = "none";
			document.getElementById("row_"+menuId).style.background = "#ebebeb";
		}

		document.getElementById("pic_"+menuId).src = (document.getElementById("pic_"+menuId).src.indexOf("plus.gif") > 0) ? "images/minus.gif" : "images/plus.gif";
	}

	return false;
}

function resizeMe()
{
	var NS = (navigator.appName == "Netscape")? true : false;

	var iWidth = (NS)? window.innerWidth : document.body.clientWidth; 
	var iHeight = (NS)? window.innerHeight : document.body.clientHeight; 
	iWidth = document.images[0].width - iWidth; 
	iHeight = document.images[0].height - iHeight; 

	window.resizeBy(iWidth, iHeight); 
	self.focus();
}