function isListSelected(strFormName, strListName, strMessage, strEmpty) { var listName = eval('document.'+strFormName+'.'+strListName) if (listName.selectedIndex > -1) { if (listName.options[listName.selectedIndex].value == strEmpty) { if (strMessage > "") { alert(strMessage) } listName.focus(); return false; } else return true; } else { if (strMessage > "") { alert(strMessage) } listName.focus(); return false; } }