function Animacija() {
    document.write('<object type="application/x-shockwave-flash" data="/Resources/Logo/Header_Naslovnica.swf" width="959" height="320">\n');
    document.write('<param name="movie" value="/Resources/Logo/Header_Naslovnica.swf" />\n');
    document.write('<a href="http://www.macromedia.com/go/getflashplayer"><img src="/_Data/KatSlike/Main.jpg" alt="WebManager"/></a>\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('</object>\n');
}
function SearchEngine() {
  document.write('<div id="Pretrazivac_Naslov">Pretra&#382;ivanje</div>\n');
  document.write('<div id="Pretrazivac">\n');
  document.write('<input type="text" name="srcfield" id="sText" onkeypress="enterCancel(event||window.event);" class="Pinput"/><br >\n');
  document.write('<div class="Holder"><div class="Button"><p><a href="javascript:;" onClick="Search();return false">Pretra&#382;i</a></p></div></div>\n');
  document.write('</div>\n');
}
function setFocusTimeout(controlID) {
	focusControlID = controlID;
	setTimeout("setFocus(focusControlID)", 300);
}
function setFocus() { 
	if ( document.getElementById(focusControlID)) { 
		document.getElementById(focusControlID).focus(); 
	}
}
function ShowMenu(menuid) {
	if ( document.getElementById(menuid) ) {
		var parStyle = document.getElementById(menuid).parentNode.style;
		if ( parStyle.display=="none") {
			parStyle.display="block";
		}
		else {
		parStyle.display="none";
		}
	}
}
function Search(jezik ) {
	if ( document.getElementById("sText") ) {
		var pojam = document.getElementById("sText").value;
		window.location="/Search_" + jezik + ".aspx?pojam=" + pojam;
	}
}
function Search_Top(jezik ) {
	if ( document.getElementById("Search1_sText") ) {
		var pojam = document.getElementById("Search1_sText").value;
		window.location="/Search_" + jezik + ".aspx?pojam=" + pojam;
	}
}
function SearchBox(jezik ) {
	if ( document.getElementById("Search_Rezultati1_sText") ) {
		var pojam = document.getElementById("Search_Rezultati1_sText").value;
		window.location="/Search_" + jezik + ".aspx?pojam=" + pojam;
	}
}
function enterCancel(evt){
  if (evt.keyCode == 13) {
    if (evt.preventDefault) {
      evt.preventDefault();
    } else {
      evt.returnValue = false;
    }
  }
}
function enterCancel(evt){
  if (evt.keyCode == 13) {
    if (evt.preventDefault) {
      evt.preventDefault();
    } else {
      evt.returnValue = false;
    }
  }
}
function pizza_enterCancel(evt){
  if (evt.keyCode == 13) {
    __doPostBack('Search1$TabContainer1$Pizza_Tab$lb_Pizza','');
  }
}
function search_enterCancel(evt){
  if (evt.keyCode == 13) {
    __doPostBack('Search1$TabContainer1$Pizza_Web$lb_Search','');
  }
}
function pizza2_enterCancel(evt){
  if (evt.keyCode == 13) {
	__doPostBack('Search2$TabContainer1$Pizza_Tab$lb_Pizza','');
  }
}
function search2_enterCancel(evt){
  if (evt.keyCode == 13) {
	__doPostBack('Search2$TabContainer1$Pizza_Web$lb_Search','');
  }
}
function SetFooterPosition() {
	if ( document.getElementById("Sadrzaj") != null && document.getElementsByTagName("html") !=null && document.getElementsByTagName("body") !=null ) {
		var PageHeight = document.getElementsByTagName("html")[0];
		var BodyHeight = document.getElementsByTagName("body")[0];
		var Footer = document.getElementById("MenuBottom");
		var Container = document.getElementById("Sadrzaj");
		//alert( PageHeight.clientHeight + "|" + BodyHeight.clientHeight + "|" +  Container.clientHeight + "|" +  Container.style.height);
		if ( PageHeight.clientHeight > BodyHeight.clientHeight ) {
			if ( isExplorer()) {
			    Container.style.height = Container.clientHeight + ( PageHeight.clientHeight - BodyHeight.clientHeight) - 12 + "px";
				//alert( PageHeight.clientHeight + "|" + BodyHeight.clientHeight + "|" +  Container.clientHeight + "|" +  Container.style.height);
		    }
		    else {
			    var stil = Container.style;
				stil.height = Container.clientHeight + ( PageHeight.clientHeight - BodyHeight.clientHeight) - 12 + "px";
				//alert( PageHeight.clientHeight + "|" + BodyHeight.clientHeight + "|" +  Container.clientHeight + "|" +  stil.height);
		    }
		}
	}
}
function SetSadrzajHeight() {
	if ( document.getElementById("Sadrzaj") != null && document.getElementsByTagName("html") !=null && document.getElementsByTagName("body") !=null ) {
		var BrandingHeight = 0;
		var PageHeight = document.getElementsByTagName("html")[0];
		var BodyHeight = document.getElementsByTagName("body")[0];
		if ( document.getElementById("BrandingContainer") != null ){
			BrandingHeight = document.getElementById("BrandingContainer");
		}
		var Footer = document.getElementById("MenuBottom");
		var CB = document.getElementById("Container");
		var Container = document.getElementById("Sadrzaj");
		var OtherElementsHeight = 230;
		var VISINA = 0;
		//alert( PageHeight.clientHeight + " - PAGE|" + CB.clientHeight + " - BODY|" +  Container.clientHeight + " - SADRZAJ|" +  Container.style.height + "BrandingHeight:" + BrandingHeight  + "Footer:" + Footer.clientHeight );
		// ŠTO JE VECE BODY ILI CONTAINER
		if ( CB.clientHeight > BodyHeight.clientHeight ) {
			VISINA = CB.clientHeight;
		}
		else{
			VISINA = BodyHeight.clientHeight;
		}
		// POSTAVI VISINU
		//alert( "VISINA:" + VISINA );
		var elementi = Container.clientHeight + OtherElementsHeight + BrandingHeight + Footer.clientHeight;
		//alert( "ELEMENTI:" + elementi );
		if ( VISINA > elementi ) {
			if ( isExplorer()) {
				Container.style.height = Container.clientHeight + ( VISINA - elementi ) + "px";
				//alert( "EXPLORER" + PageHeight.clientHeight + "|" + BodyHeight.clientHeight + "|" +  Container.clientHeight + "|" +  Container.style.height);
			}
			else {
				var stil = Container.style;
				stil.height = Container.clientHeight + ( VISINA - elementi ) + "px";
				//alert( "EXPLORER" + PageHeight.clientHeight + "|" + BodyHeight.clientHeight + "|" +  Container.clientHeight + "|" +  stil.height);
			}
		}

	}
	setFocusTimeout("Search1_TabContainer1_Pizza_Tab_p_Text");
}

function isExplorer() {
	var browser_type=navigator.appName
	var browser_version=parseInt(navigator.appVersion)
	//if IE 4+
	if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4) {
		return true;
	}
	else {
		return false;
	}
}