// JScript File
var gE = function(id) {return document.getElementById(id);}

function fnValidateMandatoryFieldsOnSaveButtonClick()
{
//    var himsValidator = ([new hims_ctl_val("ctl00_CP_ModuleDropDownList","Select A Module Name!","T","DSI","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_EventDropDownList","Select A Event Name!","T","DSI","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_RecipientTypeDropDownList","Select A Recipient Type!","T","DSI","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_RecipientDropDownList","Select A Recipient!","T","DSI","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_AlertModeDropDownList","Select A Alert Mode Type!","T","DSI","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_TemplateDropDownList","Select A Template Type!","T","DSI","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_TriggerDropDownList","Select A Trigger Name!","T","DSI","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_DurationTextBox","Specify Duration Value!","T","N","","","","","")],
//                         [new hims_ctl_val("ctl00_CP_DurationDropDownList","Select A Duration!","T","DSI","","","","","")]
//                        )
//    
//    if (fnDoValidate(himsValidator))
//    {
//        return true;
//    }
//    else
//        return false;     
        
    if(gE("ctl00_CP_ModuleDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0002,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_EventDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0003,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_RecipientTypeDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0004,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_RecipientDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0005,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_AlertModeDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0006,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_TemplateDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0007,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_TriggerDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0008,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_DurationTextBox").value == "")
    {
        SetMessageBox(MessageVars.ALE_0009,'Error'); 
        return false;
    }
    
    if(gE("ctl00_CP_DurationDropDownList").selectedIndex <= 0)
    {
        SetMessageBox(MessageVars.ALE_0010,'Error'); 
        //SetMessageBox('Select A Duration Period!','Error');
        return false;
    }
    return true;         
}


function fnConfirmDeleteAlertConfiguration()
{
//    var ConfirmSave= confirm("Do You Want To Delete The Selected Alert Configuration??");
    var ConfirmSave= confirm(MessageVars.ALE_0015);
    if (ConfirmSave == true)
    {
        return true;    
    }
    else
    {
        return false;
    }
}



function fnAllowNumericOnly(event)
{
   return(fnNumeric(event));
   
}





