//Included by Ranjith on 15-Sep-2011
function ValidationSendEmail() {

    var txtSub = document.getElementById('txtSubject');
    var hdnContact = document.getElementById('hdnContacts');
 

    var isError = false;
    var controlToBeFocused;
    var alertMessage = '';

    if (RemoveSpaces(txtSub).length == 0) {

        alertMessage += (alertMessage.length == 0 ? '' : '\n') + 'Please enter the subject. \n';
        if (!isError) {
            isError = true;
            controlToBeFocused = txtSub;
        }

        txtSub.style.backgroundColor = 'lightyellow';
    }
    else {
        txtSub.style.backgroundColor = 'white';
    }

    if (hdnContact.value == '') {

        alertMessage += (alertMessage.length == 0 ? '' : '\n') + 'Please select the contacts.';
        if (!isError) {
            isError = true;
            controlToBeFocused = hdnContact;
        }        
    }
    if (isError) {        
        TrinetraCustomAlerts(alertMessage);
        return false;
    }
    else {
        return true;
    }
}

