// fix DropDown if JS is not available (redefine styles by JS)
function selectFix(name, selected_name, results_name)
{
	if (document.getElementById(name)!= null) 
		document.getElementById(name).className="navigation-select";
		
	// make preselected question visible
	// it will be hidden, if Java is disabled
	if (document.getElementById(selected_name) != null)
		document.getElementById(selected_name).style.display = "";
		
	
	// show results table
	// it will be hidden, if Java is disabled and no question is selected
	if (document.getElementById(results_name) != null)
		document.getElementById(results_name).style.display = "";
}

var t;
var d;

function toplistOn(dv)
{
	dv.className='navigation-select on';
}

function toplistOff(dv)
{
	dv.className='navigation-select';
}



// Resizes "What we do" footer block, depending on other blocks height
function ReSizeWhatWeDo()
{
	// DIVs on this "footer-features.ascx" 
	var divInvestments = document.getElementById("divInvestments");
	var divConnections = document.getElementById("divConnections");
	var divLatestNews = document.getElementById("divLatestNews");

	// DIV on "what.ascx"
	var divWhatWeDo = document.getElementById("divWhatWeDo");

	// define the heighst footer box
	var iMaxHeight = Math.max( Math.max(divInvestments.clientHeight, divConnections.clientHeight), divLatestNews.clientHeight );

	// resize "what we do" DIV
	divWhatWeDo.style.height = (iMaxHeight - 24) + "px";
	divWhatWeDo.style.display = "";
}

function Search(ev, buttonName)
{
	var keyCode;
	if(ev)			//Moz
	{
		keyCode = ev.keyCode;
	}
	if(window.event)	//IE
	{
		keyCode = window.event.keyCode;
	}
	
	// enter
	if (keyCode == 13)
	{
		// get button
		var aFormControls = document.forms[0].elements;
		for(var i = 0; i < aFormControls.length; i++)
		{
			if(aFormControls[i].id.indexOf(buttonName) != -1)
			{	
				aFormControls[i].click();
				return;
			}
		}
	}
}