// JavaScript Document

function changeFuncnavClass(obj)
{
obj.className = "funcnavOver";	
}
function restoreFuncnavClass(obj)
{
obj.className = "funcnavNormal";	
}



function changeHornavClass(obj)
{
obj.className = "hornavOver";	
}
function restoreHornavClass(obj)
{
obj.className = "hornavNormal";	
}



function changeHorsubnavClass(obj)
{
obj.className = "horsubnavOver";	
}
function restoreHorsubnavClass(obj)
{
obj.className = "horsubnavNormal";	
}




function showMenu(elmnt)
{
	hideAll();
	document.getElementById(elmnt).style.visibility = "visible";
	window.clearTimeout(document.menuTimer);
}
function outMenu() 
{
	document.menuTimer = setTimeout('hideAll()',200);
}
function hideAll()
{
		document.getElementById('horsubnav01').style.visibility = "hidden";
		document.getElementById('horsubnav02').style.visibility = "hidden";
		document.getElementById('horsubnav03').style.visibility = "hidden";	
}
function hideError(){
		document.getElementById('errorWindow').style.visibility = "hidden";
}

function preSelectRadio(radios,value) {
	for (i=0;i<radios.length;i++){
		if (radios[i].value==value){
			radios[i].checked=true;
		}
	}
}

function preSelectCheckboxByName(theForm,value) {
	for (i=0;i<theForm.elements.length;i++) {
    e = theForm.elements[i];
		if ( e.type == 'checkbox' && e.name==value ) {
			e.checked=true;
		}
	}
}

function preSelectCheckboxByValue(theForm,value) {
	for (i=0;i<theForm.elements.length;i++) {
    e = theForm.elements[i];
		if ( e.type == 'checkbox' && e.value==value ) {
			e.checked=true;
		}
	}
}

function LaunchPresentation(path, bChromeless, bResize) {
	var nWidth = screen.availWidth;
	var nHeight = screen.availHeight;

	// Get the width
	if (nWidth > 820)
	{
		nWidth = 980;
		nHeight = 640;
	}

	// Build the options string
	var strOptions = "width=" + nWidth +",height=" + nHeight;
	if (bResize)
	{
		strOptions += ",resizable=yes"
	}

	if (bChromeless)
	{
		strOptions += ", status=0, toolbar=0, location=0, menubar=0, scrollbars=0";
	}
	else
	{
		strOptions += ", status=1, toolbar=1, location=1, menubar=1, scrollbars=1";
	}

	// Launch the URL
	window.open(path , "_blank", strOptions);

}
