function init()
{
    if ( typeof pageInit != 'undefined' )
    {
        pageInit();
    }
    if ( typeof runTest != 'undefined' )
    {
        runTest();
    }
    if ( typeof fadeyNewsInit != 'undefined' )
    {
        fadeyNewsInit();
    }
    if ( typeof expandingRolloversInit != 'undefined' )
    {
        expandingRolloversInit();
    }
    preloadButtonGraphics();
}
function preloadButtonGraphics()
{
    var aImagesSrc = [ 'images/button_large.gif',
        'images/button_large_over.gif',
        'graphics/buttons/bt_aerial_photos.gif',
        'graphics/buttons/bt_demo.gif',
        'graphics/buttons/bt_detail_maps.gif',
        'graphics/buttons/bt_free_tools.gif',
        'graphics/buttons/bt_heights.gif',
        'graphics/buttons/bt_historical_maps.gif',
        'graphics/buttons/bt_reports.gif',
        'graphics/buttons/bt_street_maps.gif',
        'graphics/buttons/bt_aerial_photos_over.gif',
        'graphics/buttons/bt_demo_over.gif',
        'graphics/buttons/bt_detail_maps_over.gif',
        'graphics/buttons/bt_free_tools_over.gif',
        'graphics/buttons/bt_heights_over.gif',
        'graphics/buttons/bt_historical_maps_over.gif',
        'graphics/buttons/bt_reports_over.gif',
        'graphics/buttons/bt_street_maps_over.gif'
 ];
    for ( i = 0; i < aImagesSrc.length; i ++ )
    {
        var preloadImage = new Image();
        preloadImage.src = aImagesSrc[i];
    }
}
function setActiveTab( sTabName )
{
    var aMenuLinks  = document.getElementsByName( 'menuhref' );
    for ( var i = 0; i < aMenuLinks.length; i++ )
    {
        if ( aMenuLinks[i].childNodes[0].nodeValue == sTabName )
        {
            aMenuLinks[i].parentNode.className = aMenuLinks[i].parentNode.className + '_on';
            replaceCellContents( aMenuLinks[i].parentNode, sTabName );
            break;
        }
    }
}
function replaceCellContents( oTabCell, sTabName )
{
    var currentNode = oTabCell.firstChild;
    var newTextNode = document.createTextNode( sTabName );
    oTabCell.replaceChild( newTextNode, currentNode );
}
function returnFalse()
{
    return false;
}
function buttonMouseOver( obj )
{
    obj.style.background = 'url( images/button_small_over.gif)';
}
function buttonMouseOut( obj )
{
    obj.style.background = 'url( images/button_small.gif)';
}
function largeButtonMouseOver( obj )
{
    obj.style.background = 'url( images/button_large_over.gif)';
}
function largeButtonMouseOut( obj )
{
    obj.style.background = 'url( images/button_large.gif)';
}