
// image for second-level children
 var SecondaryNavIcon = new Image();
 SecondaryNavIcon.src = "/Images/Shell/Bullets/Yellow_Bullet.gif";
    
// image for the second-level children hover state    
var SecondaryNavIconHover = new Image();
SecondaryNavIconHover.src = "/Images/Shell/Bullets/White_bullet.gif";


///<summary>
/// Selects the appropriate option from a select box
///</summary>
///<param name="oEl">The select object we need to select</param>
///<param name="sVal">The value we are setting the select to</param>
function SetSelect(oEl, sVal)
{
    if(oEl != null)
    {
        for(var i=0; i<oEl.options.length; i++)        
        {
            if(oEl.options[i].value == sVal)
            {
                oEl.selectedIndex = i;
                break;
            }
        }
    }
}//SetSelect

///<summary>
/// Disables all fields within the User Preference form. Also sets a tooltip on everything to inform
/// the user why it is disabled.
///</summary>
function DisableUserPreferenceForm()
{    
    var disabledMsg = "You have already joined. Go to 'Edit My Profile', to change your settings";    
    var oForm = document.UserPreferences;     
    for(var i=0; i<oForm.elements.length; i++)
    {
        var Type = oForm.elements[i].type + "";
        if(Type.indexOf("select") != -1)
        {
            oForm.elements[i].disabled = true;
        }
        oForm.elements[i].title = disabledMsg;
        oForm.elements[i].readOnly = true;
    }
    oForm.title = disabledMsg;
    oForm.disabled = true;     
    
}//DisableUserPreferenceForm
