/*
 *  Harvard International Relations Council
 *  Copyright ©1997-2003 Techlar Innovations. All rights reserved.
 *  
 *  Filename:       mslayout.css
 *  Version:        1.0.3790.0
 *  Purpose:        Implements client-side scripts for Internet Explorer
 *  Modified:       May 2, 2004
 *  Flags:            
 *
 */


/*  Public Functions  */

function focusForm (srcForm)
{
    var nIndex;
    var srcElement;

    //
    // Loop through every element in the document and locate the first
    // input box of the specified form.
    //

    for (nIndex = 0; nIndex < srcForm.elements.length; nIndex++)
    {
        srcElement = srcForm.elements(nIndex);
        if ((srcElement.tagName != "INPUT" || srcElement.type != "hidden") && !srcElement.disabled)
        {
            srcElement.focus ();
            if (srcElement.tagName == "TEXTAREA" || (srcElement.tagName == "INPUT" && srcElement.type == "text"))
            {
                srcElement.select ();
            }
            return;
        }
    }
}
