var gE = function(id) {return document.getElementById(id);}
function fnValidateMandatoryFieldsOnSaveButtonClick()
{
    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'); 
        return false;
    }
    return true;         
}
function fnConfirmDeleteAlertConfiguration()
{
    var ConfirmSave= confirm(MessageVars.ALE_0015);
    if (ConfirmSave == true)
    {
        return true;    
    }
    else
    {
        return false;
    }
}
function fnAllowNumericOnly(event)
{
   return(fnNumeric(event));
   
}
function fnSaveAlert() {
	var himsValidator = [new hims_ctl_val("ctl00_CP_ModuleDropDownList", "Module Name", "T", "", "", "", 20),
		new hims_ctl_val("ctl00_CP_EventDropDownList", "Event Name", "T", "", "", "", 20),
		new hims_ctl_val("ctl00_CP_RecipientTypeDropDownList", "Recipient Type", "T", "", "", "", 20),
		new hims_ctl_val("ctl00_CP_RecipientDropDownList", "Recipient", "T", "", "", "", 20),
		new hims_ctl_val("ctl00_CP_AlertModeDropDownList", "Alert Mode", "T", "", "", "", 20),
		new hims_ctl_val("ctl00_CP_TriggerDropDownList", "Trigger", "T", "", "", "", 20),
		new hims_ctl_val("ctl00_CP_DurationTextBox", "Duration Value", "T", "", "", "", 20),
		new hims_ctl_val("ctl00_CP_DurationDropDownList", "Duration", "T", "", "", "", 20)];
	if (fnDoValidate(himsValidator))
		return true;
	else
		return false;
}
function fnSetFocusToModuleDropDownList() {
	gE('ctl00_CP_ModuleDropDownList').focus();
}