////////////////////////////////////////////////////////////////////////////////////////////////////
// Zgornji menu
////////////////////////////////////////////////////////////////////////////////////////////////////

function LoadImage()
{
	if (!document.getElementById) return
	var imgOriginSrc
	var imgTemp = new Array()
	var imgArr = document.getElementsByTagName('img')
	
	for (var i = 0; i < imgArr.length; i++)
	{
    	if (imgArr[i].getAttribute('hsrc'))
		{
    		imgTemp[i] = new Image();
			imgTemp[i].src = imgArr[i].getAttribute('hsrc')
    	    imgArr[i].onmouseover = function()
			{
    	    	imgOriginSrc = this.getAttribute('src')
    	    	this.setAttribute('src',this.getAttribute('hsrc'))
    	    }
    	    imgArr[i].onmouseout = function()
			{
    	        this.setAttribute('src',imgOriginSrc)
    	    }
		}
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// Layer show / hide
////////////////////////////////////////////////////////////////////////////////////////////////////

function showDescription(rowNo,showImage)
{
	if(document.getElementById || document.all)
	{
		var descriptionNo = 'row' + rowNo;
		var imageName = 'plus' + rowNo;

		if(document.getElementById(descriptionNo).style.display == 'none')
		{
			document.getElementById(descriptionNo).style.display = 'block';
			 if(showImage == 1) document.images[imageName].src = 'icons/1060/puscice/FF9900_minus.gif'; 
		}
		else if(document.getElementById(descriptionNo).style.display == 'block')
		{
			document.getElementById(descriptionNo).style.display = 'none';
			if(showImage == 1) document.images[imageName].src = 'icons/1060/puscice/FFCC00_plus.gif';
		}
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// TIS Routeplanner
////////////////////////////////////////////////////////////////////////////////////////////////////

idForm = "";
initialValues = new Array();
initialValues["fromcity"]= "Start";
initialValues["tocity"] = "Cilj";

function empty(o)
{
	if (o.value == initialValues[o.name]) o.value = "";
}

function tisFill(o)
{ 
	if (o.value=='') 
	{ 
		o.value=initialValues[o.name]; 
		o.style.fontWeight = "normal"; 
		o.style.color = "#FFFFFF"; 
	} 
	else if (o.value != initialValues[o.name]) 
	{ 
		o.style.fontWeight = "normal"; 
		o.style.color = "#FFFFFF"; 
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// TIS Routeplanner English
////////////////////////////////////////////////////////////////////////////////////////////////////

idForm = "";
initialValuesEng = new Array();
initialValuesEng["fromcity"]= "Start";
initialValuesEng["tocity"] = "Finish";

function emptyEng(o)
{
	if (o.value == initialValuesEng[o.name]) o.value = "";
}

function tisFillEng(o)
{ 
	if (o.value=='') 
	{ 
		o.value=initialValuesEng[o.name]; 
		o.style.fontWeight = "normal"; 
		o.style.color = "#000000"; 
	} 
	else if (o.value != initialValuesEng[o.name]) 
	{ 
		o.style.fontWeight = "normal"; 
		o.style.color = "#000000"; 
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// Ostalo
////////////////////////////////////////////////////////////////////////////////////////////////////

function okno(url,name,sirina,visina)
{
    window.open(url,name,'toolbar=0,status=0,location=0,directories=0,menubar=0,scrollbars=no,resizable=no,width='+sirina+',height='+visina);
}

function reklama(url,name,sirina,visina)
{
    window.open(url,name,'toolbar=0,status=0,location=0,directories=0,menubar=0,scrollbars=yes,resizable=no,width='+sirina+',height='+visina);
}

var newWindow= "";
function makeNewWindow(url,name,toolbar,status,location,directories,menubar,scrollbars,resizable,width,height)
{
	if (newWindow == "" || newWindow.closed) 
	{
		newWindow = window.open(url,name,'toolbar='+toolbar+',status='+status+',location='+location+',directories='+directories+',menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',width='+width+',height='+height+'');
	}
	newWindow.focus();
}