function GetSelectedValue(theSelect, sSeparator)
{
if ( !sSeparator ) sSeparator = ",";
var strList = "";
if (theSelect.options.length > 0)
{
for (var i = 0; i < theSelect.options.length ; i++)
if (theSelect.options[i].selected)
strList += theSelect.options[i].value + sSeparator;