var Init = new Object();
Init.start = function()
{
    delete Init['start'];  //Otherwise it runs itself recursively...not good!
    for ( var i in Init )
    {
        Init[i]();
    }

  //Show the div with id=container, which should have a style="visibility:hidden" attribute
    $('container').setStyle({visibility: 'visible', display: 'block'});
}

Init.main = function()
{
    newWindow = function(info)
    {
        viewWindow = window.open(info,'viewWin', 'width=375,height=400,status=no,resize=n0,scrollbars=no,');
        viewWindow.focus();
    }

    resetForm = function(button)
    {
        this.formElements = $A(button.form.elements);
        this.formElements.each(function(element)
        {
            if (element.type == 'text')
            {
                element.value = '';
            }
            else if (element.type == 'select-multiple' || element.type == 'select-one')
            {
                element.selectedIndex = '-1';
            }
        });
    }
}
Init.imagePreload = function()
{
  //Images for the toggle button on the top of page
    new Image().src = "/img/layout/toggle_down_mouseout.gif";
    new Image().src = "/img/layout/toggle_down_mouseover.gif";
    new Image().src = "/img/layout/toggle_up_mouseout.gif";
    new Image().src = "/img/layout/toggle_up_mouseover.gif";
}



