//http://stevenharman.net/blog/archive/2007/07/10/add-option-elements-to-a-select-list-with-javascript.aspx
function AddSelectOption(selectObj, text, value, isSelected) 
{
    if (selectObj != null && selectObj.options != null)
    {
        selectObj.options[selectObj.options.length] = 
            new Option(text, value, false, isSelected);
    }
}
//http://www.mredkj.com/tutorials/tutorial005.html
//http://blog.pothoven.net/2006/10/addremove-options-tofrom-select-list.html
//Alex Morales
function clearSelectOptions(selectObject){
//console.log('length: ' + selectObject.length);
 for (i = selectObject.length - 1; i>=0; i--) {
//    console.log(selectObject.options[i].value);
      selectObject.remove(i);
 }
}