// loadSettings - first method called when Settings page loads
///////////////////////////////////////////////////////////////////////////////////////////////////
function loadSettings() {   

    System.Gadget.onSettingsClosing = procSettingsClosingEvent;                 // set settings page closing event
    if (System.Gadget.Settings.read("radioURL") == ""){System.Gadget.Settings.write("radioURL","http://www.everythingeverything.co.uk/ukrp/stream.php?station=BBCROne")}
	stationPicker.value = System.Gadget.Settings.read("radioURL");
}
///////////////////////////////////////////////////////////////////////////////////////////////////
function procSettingsClosingEvent(event){
    // process settings page closing event
    if (event.closeAction == event.Action.commit) {
        // save settings
        System.Gadget.Settings.write("radioURL", stationPicker.value); 
    }
    event.cancel = false;    
}