if (isJsEnabled()) { addLoadEvent(privatemsgContactFill); } function privatemsgContactFill() { if ($('edit-quick')) { $('edit-quick').style.display = ''; $('edit-quick').onchange = function() { if( $('edit-recipient').value == "All" ){ $('edit-recipient').value = ""; } if( $('edit-recipient').value == "" || $('edit-quick').value == "All" ){ $('edit-recipient').value = $('edit-quick').value; } else { if( $('edit-recipient').value.indexOf( $('edit-quick').value ) >= 0 ){ alert('Recipient already added'); } else { $('edit-recipient').value += ";" + $('edit-quick').value; } } $('edit-quick').selectedIndex = 0; }; } if ($('edit-quick1')) { $('edit-quick1').style.display = ''; $('edit-quick1').onchange = function() { if( $('edit-quick1').value == "Clear" ){ $('edit-recipient').value = ""; } if( $('edit-quick1').value == "All" ){ $('edit-recipient').value = "All"; } $('edit-quick1').selectedIndex = 0; }; } }