function getFunc(func, elm) {
    if(func=='checkBox') {
        //validate only when last input is calling this
        var lastElem = jQuery("[name="+elm.name+"]").get(jQuery("[name="+elm.name+"]").length-1)
        
        if (elm.id != lastElem.id){
            return true;
        }

        //countes checked boxes
        var checkedInputs = jQuery("[name="+elm.name+"]:checked").length;
        if (checkedInputs>0){
            return true;
        }else{
            return false;
        }
    //only validate agreement chk box
    } else{
        return true;
    }
}
