<!-- 
var state = 'none'; 

function showhide(layer_ref) { 

if (state == 'block') { 
state = 'none'; 
} 
else { 
state = 'block'; 
} 
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + layer_ref + ".style.display = state"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[layer_ref].display = state; 
} 
if (document.getElementById &&!document.all) { 
hza = document.getElementById(layer_ref); 
hza.style.display = state; 
} 
} 
/**********************************************************************************
 * Opens a dialig box (popup windows) using the supplied parameters.
 * Opens modally if support by the browser.
 *********************************************************************************/
function OpenPopupWindow( URL, Left, Top, Width, Height )
{
    
	if( window.showModalDialog )
	{
		OpenModalDialog( URL, Left, Top, Width, Height )
	}
	else
	{
		OpenWindowModal( URL, Left, Top, Width, Height )
	}
}


/************************************************************
 * Opens a modal dialig box using the supplied parameters.
 * This function is called by OpenPopupWindow.  See OpenPopupWindow.
 ************************************************************/
function OpenModalDialog( URL, Left, Top, Width, Height )
{	
    Left = getScreenX(Left);      
    Top = getScreenY(Top);
    
	try
	{

		window.showModalDialog( URL, window.self, "dialogLeft:" + Left + "px; dialogTop:" + Top + "px; dialogWidth:" + Width + "px; dialogHeight:" + Height + "px; status:no; resizable:yes; scroll:yes;" );
	}
	catch(e)
	{
		alert( "This application requires that popup windows be enabled in your browser. Please enable popup windows for this site and try again." );
	}
}


/**********************************************************************************
 * Opens a dialig box (popup form) using the supplied parameters.
 * This function is called by OpenPopupWindow.  See OpenPopupWindow.
 *********************************************************************************/
function OpenWindowModal( URL, Left, Top, Width, Height )
{
    Left = getScreenX(Left);      
    Top = getScreenY(Top);

	var features = 'left=' + Left + 'px, top=' + Top + 'px, width=' + Width + 'px, height=' + Height + 'px,';
	features += 'titlebar=no,scrollbars=yes,fullscreen=no,modal=yes, resizable=yes';
	var childWindow = window.open( URL, '_blank', features, false );
	if (window.focus) {childWindow.focus();}
	return childWindow;
}
/********************************************************************************************
 * Translates X-Coordinate to make it relative to the client window, not the screen/monitor.
 * Need to test functionality in FireFox and on multi-screen monitor configurations
 ********************************************************************************************/
function getScreenX(xOffset)
{
    if (window.screenLeft)
    {
        return window.screenLeft + xOffset;
    }
    else if (window.screenX)
    {   // not tested:
        return window.screenX + xOffset;
    }
    else return xOffset;
}


/********************************************************************************************
 * Translates Y-Coordinate to make it relative to the client window, not the screen/monitor.
 * Need to test functionality in FireFox and on multi-screen monitor configurations
 ********************************************************************************************/
function getScreenY(yOffset)
{
    if (window.screenTop)
    {
        return window.screenTop + yOffset;
    }
    else if (window.screenY)
    {   // not tested:
        return window.screenY + yOffset;
    }
    else return yOffset;
}
//--> 