function displayDay(url,wname) 
{
	try
	{
	    window.open(url, wname, "scrollbars=yes,toolbar=no,status=yes,location=no,menubar=no,resizable=yes,height=400,width=600,left=10,top=10");
	}
	catch(e) { reportError(e, "displayDay"); }	    
}

function highlightText(objText)
{
	try
	{
		objText.style.color = "#6B94B4";
	}
	catch(e) { reportError(e, "highlightText"); }
}

function highlightButtonOld(strRowId)
{
	try
	{
		var objLeft;
		var objMiddle;
				
		objLeft = document.getElementById(strRowId + "_left");		
		objMiddle = document.getElementById(strRowId + "_middle");
	
//		objLeft.style.color = "#6B94B4";
//		objMiddle.style.color = "#6B94B4";
		objLeft.style.color = "yellow";
		objMiddle.style.color = "yellow";
		objLeft.style.fontWeight = "normal";
		objMiddle.style.fontWeight = "normal";
		
	}
	catch(e) { reportError(e, "highlightButton"); }
}

function lowlightButtonOld(strRowId)
{
	try
	{
		var objLeft;
		var objMiddle;
		
		objLeft = document.getElementById(strRowId + "_left");
		objMiddle = document.getElementById(strRowId + "_middle");
	
		objLeft.style.color = "white";
		objMiddle.style.color = "white";
		objLeft.style.fontWeight = "normal";
		objMiddle.style.fontWeight = "normal";
	}
	catch(e) { reportError(e, "lowlightButton"); }
}

function highlightButton(strRowId)
{
	try
	{
		var objMiddle;
				
		objMiddle = document.getElementById(strRowId + "_middle");
	
		objMiddle.style.color = "yellow";
		objMiddle.style.fontWeight = "normal";
		
	}
	catch(e) { reportError(e, "highlightButton"); }
}

function lowlightButton(strRowId)
{
	try
	{
		var objMiddle;
		
		objMiddle = document.getElementById(strRowId + "_middle");
	
		objMiddle.style.color = "white";
		objMiddle.style.fontWeight = "normal";
	}
	catch(e) { reportError(e, "lowlightButton"); }
}


function lowlightText(objText)
{	
	try
	{
		objText.style.color = "white";
	}
	catch(e) { reportError(e, "lowlightText"); }
}


function selectMenuOption(sPage)
{
	try
	{
		document.forms[0].action = sPage;
		document.forms[0].submit();
//		document.MenuForm.action = sPage;
//		document.MenuForm.submit();
	}
	catch(e) { reportError(e,"selectMenuOption"); }		
}

//----------------------------------------------------------------------------------------------------------------
// Name          : reportError
//
// Description   : This utility is used to report an error with a standard alery box.  It is called from 
//		   all error handlers.
// Frame Depend. : none
//
// Inputs        : e 		Error object.
//		   sFunction  	Name of function in which the error was caught.
// Output        :   
//             
// Rev. History  : 2003/02/28	Michael Thiessen	Created
//----------------------------------------------------------------------------------------------------------------
function reportError(e, sFunction)
{
	alert("A JavaScript error has occurred.\n\nFile: wanner.js\nFunction: " + sFunction + "\nName: " + e.name + "\nMessage: " + e.message + "\nNumber: " + e.number + "\nDescription: " + e.description);
}


function toggleSubMenu(sParent)
{
	try
	{		
		var objParent = null
		objParent = document.getElementById(sParent);
		if (objParent != null)
		{
			if (objParent.style.display == "none")			
			{
				objParent.style.display = getTableDisplayString();
			}
			else
				objParent.style.display = "none";
		}
	}
	catch(e) { reportError(e, "toggleSubMenu"); }
}

function getTableDisplayString()
{
	if (window.navigator.appName == "Microsoft Internet Explorer") 
		return "block";
	else
		return "table-row";
}
