

function applyHighLights()
{
	// mainnav

	ref = document.getElementById("navigation");
	
	for(i=0; i<ref.childNodes.length; i++)
	{
		if(ref.childNodes[i].nodeName && ref.childNodes[i].nodeName.toLowerCase() == "li")
		{
			for(ii=0; ii<ref.childNodes[i].childNodes.length; ii++)
			{
				if(ref.childNodes[i].childNodes[ii].nodeName && ref.childNodes[i].childNodes[ii].nodeName.toLowerCase() == "a")
				{
					if(ref.childNodes[i].childNodes[ii].className && ref.childNodes[i].childNodes[ii].className.toLowerCase() == "hi")
					{
						// set section
						p = ref.childNodes[i].childNodes[ii].firstChild.src.split("_");
						section = p[p.length - 2];
						
						ref.childNodes[i].childNodes[ii].firstChild.src = ref.childNodes[i].childNodes[ii].firstChild.getAttribute("src").replace( /lo.gif/, "hi.gif");
					}
					else
					{	
						ref.childNodes[i].childNodes[ii].onmouseover = function()
						{
							this.firstChild.src = this.firstChild.getAttribute("src").replace( /lo.gif/, "hi.gif");
						};
	
						ref.childNodes[i].childNodes[ii].onmouseout = function()
						{
							this.firstChild.src = this.firstChild.getAttribute("src").replace( /hi.gif/, "lo.gif");
						};
					}

					/*
						dirty IE 5.1 fix
					*/
					ref.childNodes[i].childNodes[ii].onclick = function()
					{
						location.href = this.getAttribute("href");
					};
				}
			}
		}
	}


	// buttons_top

	ref = document.getElementById("login-nav");
	
	for(i=0; i<ref.childNodes.length; i++)
	{
		if(ref.childNodes[i].nodeName && ref.childNodes[i].nodeName.toLowerCase() == "a")
		{
			ref.childNodes[i].onmouseover = function()
			{
				this.firstChild.src = this.firstChild.getAttribute("src").replace( /lo.gif/, "over.gif");
			};

			ref.childNodes[i].onmouseout = function()
			{
				this.firstChild.src = this.firstChild.getAttribute("src").replace( /over.gif/, "lo.gif");
			};


			/*
				dirty IE 5.1 fix
			*/
			ref.childNodes[i].onclick = function()
			{
				location.href = this.getAttribute("href");
			};
		}
	}
}




function searchDates(str)
{	
	if(!document.getElementById("search-form"))
		return false;
		
	var match = new Array();
	
	match[0] = document.getElementById("from_day");
	match[1] = document.getElementById("from_month");
	match[2] = document.getElementById("from_year");
	match[3] = document.getElementById("to_day");
	match[4] = document.getElementById("to_month");
	match[5] = document.getElementById("to_year");
	
	// form 
	oneSelected = false;
	allSelected = true;

	for(i=0; i<match.length; i++)
	{
		if(match[i].selectedIndex > 0)
			oneSelected = true;
		else
			allSelected = false;
	}
	
	
	if(allSelected)
		return true;

	if(!allSelected && !oneSelected)
		return true;

	alert(str);
	return false;
}