// Select team player on load
// ------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------

function getURLParameter( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

function pageOnLoad() {
    var mysel = getURLParameter("sp");
    if ( mysel ) {
        SelectOptionInList( document.getElementById("Letter_For"), mysel );
    }
}

function SelectOptionInList( lstSelectList, intID )
      {
            try
            {
                  var intIndex = 0;
                  // Loop through all the options
                  for( intIndex = 0; intIndex < lstSelectList.options.length; intIndex++ )
                  {
                        // Is this the ID we are looking for?
                        if( lstSelectList.options[intIndex].value == intID )
                        {
                              // Select it
                              lstSelectList.selectedIndex = intIndex;
                              // Yes, so stop searching
                              break;
                        }
                  }
            }
            catch( expError )
            {
                  alert( "ClientUtilities1.js::SelectOptionInList( ).\n" +
                              "Error:" + expError.number + ", " + expError.description );
            }
      } // SelectOptionInList
// ------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------
// END Select team player on load
