function drop_down(element, action) {
	element.getElementsByTagName('ul')[0].style.visibility= action;
}


function preload() { 
   for(i=0; i<preload.arguments.length; i++) (new Image()).src = preload.arguments[i];
}

/*
function popup() {
	var index=document.forms['searchForm'].businessSector.selectedIndex;
	
	var url1 = "tenderieu/kategorijaIzbor.php?category="+index;
	ajaxCategoriesWindow = window.open(url1, "Select", "menubar=no,width=700,height=600,toolbar=no");
}
*/

function popup() {
	var index=document.forms['searchForm'].businessSector.selectedIndex;
	
	var url1 = "tenderieu/kategorijaIzbor.php?category="+index;
//	ajaxCategoriesWindow = window.open(url1, "Select", "menubar=no,width=700,height=600,toolbar=no");
//tb_show("Podkategorije", url1, false);
}

function adjustHeight(){
	var container = document.getElementById("container");
	var parted = document.getElementById("parted");
	var h = parted.offsetHeight
	
	if(h<285){
		if(navigator.appName == "Microsoft Internet Explorer"){
			container.style.height = "614px";
		} else {
			container.style.height = "609px";
		}
	} else {
		if(navigator.appName == "Microsoft Internet Explorer"){
			h = h + 308;
			container.style.height = h+"px";
		}
		else {
			if(document.getElementById("onePart")!=null)
				container.style.height = "609px";
			else {
				h = h + 310;
				container.style.height = h+"px";
			}
		}
	}

}
/*
function adjustHeight2(){
	var container = document.getElementById("container");
	var parted = document.getElementById("parted");
	var h = parted.offsetHeight
	
	if(h<285){
		if(navigator.appName == "Microsoft Internet Explorer" && container.style.height != "614px"){
			container.style.height = "614px";
		} else if(container.style.height != "609px"){
			container.style.height = "609px";
		}
	} else {
		if(navigator.appName == "Microsoft Internet Explorer"){
			h = h + 328;
			if(container.style.height != h)
				container.style.height = h+"px";
		}
		else {
			if(document.getElementById("onePart")!=null && container.style.height!="609px")
				container.style.height = "609px";
			else {
				h = h + 330;
				if(container.style.height != h)
					container.style.height = h+"px";
			}
		}
	}

}*/

function adjustHeight2(){

	window.alert("D");
	var h =	$('parted').css('height');

	var $container = $('container');

	
	if(h<285){
		if(navigator.appName == "Microsoft Internet Explorer" && container.style.height != "614px"){
			$container.css('height',"614px");
		} else if(container.style.height != "609px"){
			$container.css('height',"609px");
		}
	} else {
		if(navigator.appName == "Microsoft Internet Explorer"){
			h = h + 328;
			if($container.css('height') != (h+"px"))
				$container.css('height',h+"px");
		}
		else {
			if($('onePart') && $container.css('height')!="609px")
				$container.css('height',"609px");
			else {
				h = h + 330;
			if($container.css('height') != (h+"px"))				
				$container.css('height',h + "px");
			}
		}
	}

}

