function fireClickEvent(control) {
    if (document.all) { control.fireEvent("onclick"); }
    else { var clickEvent = window.document.createEvent("MouseEvent"); clickEvent.initEvent("click", false, true); control.dispatchEvent(clickEvent); } 
}
function CustomValidatorForContentForHaveOtherTextBox_ClientValidate(source, arguments) {
    arguments.IsValid = true; var m_strInputText_HaveOtherId; m_strInputText_HaveOtherId = source.attributes['m_strInputText_HaveOtherId'].nodeValue; var m_ctrlInputText_HaveOther = document.getElementById(m_strInputText_HaveOtherId); if (m_ctrlInputText_HaveOther != null) { if (m_ctrlInputText_HaveOther.disabled == false) { if (m_ctrlInputText_HaveOther.value == '') { arguments.IsValid = false; return false; } } }
    return true;
}
function f_EnabledAndDisabledHaveOtherTextBox(m_ctrlSelectedChoice, m_enumQuestionType, m_strHaveOtherTextBoxId, m_strHaveOtherHiddenFieldId, m_blnIsOther) {
    var m_ctrlSelectedChoice_ = document.getElementById(m_ctrlSelectedChoice.id); var m_ctrlHaveOtherTextBoxId = document.getElementById(m_strHaveOtherTextBoxId); switch (m_enumQuestionType) {
        case 'RADIOBUTTON_VERTICAL': case 'RADIOBUTTON_HORIZONTAL': if (m_blnIsOther == 'True') { m_ctrlHaveOtherTextBoxId.disabled = false; m_ctrlHaveOtherTextBoxId.focus(); }
            else {
                m_ctrlHaveOtherTextBoxId.disabled = true; m_ctrlHaveOtherTextBoxId.value = ''; if (!document.all)
                    m_ctrlHaveOtherTextBoxId.fireEvent = "onchange"; else { m_ctrlHaveOtherTextBoxId.fireEvent("onchange"); } 
            }
            break; case 'CHECKBOX_VERTICAL': case 'CHECKBOX_HORIZONTAL': if (m_blnIsOther == 'True') {
                if (m_ctrlSelectedChoice_.checked == true) { m_ctrlHaveOtherTextBoxId.disabled = false; m_ctrlHaveOtherTextBoxId.focus(); }
                else {
                    m_ctrlHaveOtherTextBoxId.disabled = true; m_ctrlHaveOtherTextBoxId.value = ''; if (!document.all)
                        m_ctrlHaveOtherTextBoxId.fireEvent = "onchange"; else { m_ctrlHaveOtherTextBoxId.fireEvent("onchange"); } 
                } 
            }
            break; case 'COMBOBOX': var m_blnIsOtherInDropDown = null; m_blnIsOtherInDropDown = m_ctrlSelectedChoice_[m_ctrlSelectedChoice_.selectedIndex].getAttribute("IsHaveOther"); if (m_blnIsOtherInDropDown) { m_ctrlHaveOtherTextBoxId.disabled = false; m_ctrlHaveOtherTextBoxId.focus(); }
            else {
                m_ctrlHaveOtherTextBoxId.disabled = true; m_ctrlHaveOtherTextBoxId.value = ''; if (!document.all)
                    m_ctrlHaveOtherTextBoxId.fireEvent = "onchange"; else { m_ctrlHaveOtherTextBoxId.fireEvent("onchange"); } 
            }
            break;
    } 
}
function f_ExecutePollRuleForMultiChoiceQuestion_MatrixQuestion(MultiChoiceQuestionDetailSelectedId, QuestionsIdInRule) {
    var m_MultiChoiceQuestionDetailSelectedId_Split = MultiChoiceQuestionDetailSelectedId.split("_"); var m_PrifixElementIdMatrixQuestionDetails = ''; for (var i_Form_MultiChoiceQuestionDetailSelectedId_Split = 0; i_Form_MultiChoiceQuestionDetailSelectedId_Split < m_MultiChoiceQuestionDetailSelectedId_Split.length - 1; i_Form_MultiChoiceQuestionDetailSelectedId_Split++) { m_PrifixElementIdMatrixQuestionDetails += m_MultiChoiceQuestionDetailSelectedId_Split[i_Form_MultiChoiceQuestionDetailSelectedId_Split]; m_PrifixElementIdMatrixQuestionDetails += "_"; }
    var m_MultiChoiceQuestionDetailSelected; var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var m_childNodesInQuestionDiv; var m_regexpHidFieldClearButtonName = /m_hidfieldClearButtonName/; var m_btnClear; var QuestionsInRuleSplit = QuestionsIdInRule.split(","); var m_MultiChoiceQuestionDetailSelected = document.getElementById(MultiChoiceQuestionDetailSelectedId); for (i_ForMultiChoiceQuestion = 0; i_ForMultiChoiceQuestion < QuestionsInRuleSplit.length; i_ForMultiChoiceQuestion++) {
        m_QuestionId = QuestionsInRuleSplit[i_ForMultiChoiceQuestion]; m_QuestionDivId = m_PrifixElementIdMatrixQuestionDetails + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) {
            if (m_MultiChoiceQuestionDetailSelected.checked) { m_QuestionDiv.disabled = true; m_QuestionDiv.checked = false; }
            else { m_QuestionDiv.disabled = false; } 
        } 
    } 
}
function f_ExecutePollRuleForSingleChoiceQuestion_MatrixQuestion(SingleChoiceQuestionDetailSelectedId, QuestionsIdInRuleThisQuestionDetail, QuestionsIdInRuleOtherQuestionDetails) {
    var m_MultiChoiceQuestionDetailSelectedId_Split = SingleChoiceQuestionDetailSelectedId.split("_"); var m_PrifixElementIdMatrixQuestionDetails = ''; for (var i_Form_MultiChoiceQuestionDetailSelectedId_Split = 0; i_Form_MultiChoiceQuestionDetailSelectedId_Split < m_MultiChoiceQuestionDetailSelectedId_Split.length - 1; i_Form_MultiChoiceQuestionDetailSelectedId_Split++) { m_PrifixElementIdMatrixQuestionDetails += m_MultiChoiceQuestionDetailSelectedId_Split[i_Form_MultiChoiceQuestionDetailSelectedId_Split]; m_PrifixElementIdMatrixQuestionDetails += "_"; }
    var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var m_childNodesInQuestionDiv; var m_regexpHidFieldClearButtonName = /m_hidfieldClearButtonName/; var m_btnClear; var m_OldI = 0; var m_SingleChoiceQuestionDetailSelected = document.getElementById(SingleChoiceQuestionDetailSelectedId); var QuestionsIdInRuleOtherQuestionDetailsSplit = QuestionsIdInRuleOtherQuestionDetails.split(","); for (i_ForSingleChoiceQuestion = 0; i_ForSingleChoiceQuestion < QuestionsIdInRuleOtherQuestionDetailsSplit.length; i_ForSingleChoiceQuestion++) {
        m_QuestionId = QuestionsIdInRuleOtherQuestionDetailsSplit[i_ForSingleChoiceQuestion]; m_QuestionDivId = m_PrifixElementIdMatrixQuestionDetails + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) {
            if (m_SingleChoiceQuestionDetailSelected.checked) { m_QuestionDiv.disabled = false; }
            else { m_QuestionDiv.disabled = true; m_QuestionDiv.checked = false; } 
        } 
    }
    var QuestionsIdInRuleThisQuestionDetailSplit = QuestionsIdInRuleThisQuestionDetail.split(","); for (i_ForSingleChoiceQuestion = 0; i_ForSingleChoiceQuestion < QuestionsIdInRuleThisQuestionDetailSplit.length; i_ForSingleChoiceQuestion++) {
        m_QuestionId = QuestionsIdInRuleThisQuestionDetailSplit[i_ForSingleChoiceQuestion]; m_QuestionDivId = m_PrifixElementIdMatrixQuestionDetails + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) {
            if (m_SingleChoiceQuestionDetailSelected.checked) { m_QuestionDiv.disabled = true; m_QuestionDiv.checked = false; }
            else { m_QuestionDiv.disabled = false; } 
        }
    }
    
}
function f_ExecutePollRuleForMultiChoiceQuestion(MultiChoiceQuestionDetailSelectedId, QuestionsIdInRule) {
    var m_blnIsExecuteResizeForMultiChoiceQuestion = false; var m_MultiChoiceQuestionDetailSelected; var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var m_childNodesInQuestionDiv; var m_regexpHidFieldClearButtonName = /m_hidfieldClearButtonName/; var m_btnClear; var QuestionsInRuleSplit = QuestionsIdInRule.split(","); var m_MultiChoiceQuestionDetailSelected = document.getElementById(MultiChoiceQuestionDetailSelectedId); for (i_ForMultiChoiceQuestion = 0; i_ForMultiChoiceQuestion < QuestionsInRuleSplit.length; i_ForMultiChoiceQuestion++) { m_QuestionId = QuestionsInRuleSplit[i_ForMultiChoiceQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) { if (m_MultiChoiceQuestionDetailSelected.checked) { m_childNodesInQuestionDiv = m_QuestionDiv.childNodes; for (var j = 0; j < m_childNodesInQuestionDiv.length; j++) { if (m_childNodesInQuestionDiv[j].name != null) { if (m_childNodesInQuestionDiv[j].name.search(m_regexpHidFieldClearButtonName) > -1) { m_btnClear = document.getElementsByName(m_childNodesInQuestionDiv[j].value)[0]; if (m_btnClear != null) { m_OldI = i_ForMultiChoiceQuestion; fireClickEvent(m_btnClear); i_ForMultiChoiceQuestion = m_OldI; } } } } } } }
    for (i_ForMultiChoiceQuestion = 0; i_ForMultiChoiceQuestion < QuestionsInRuleSplit.length; i_ForMultiChoiceQuestion++) {
        m_QuestionId = QuestionsInRuleSplit[i_ForMultiChoiceQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) {
        if (m_MultiChoiceQuestionDetailSelected.checked) { if (m_QuestionDiv.style.visibility != "hidden" || m_QuestionDiv.style.display != 'none') { m_blnIsExecuteResizeForMultiChoiceQuestion = true; m_QuestionDiv.style.visibility = "hidden"; m_QuestionDiv.style.display = 'none'; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'true'; HideParentQuestionGroup(QuestionsInRuleSplit[i_ForMultiChoiceQuestion].split(",")); } }
        else { if (m_QuestionDiv.style.visibility != "visible" || m_QuestionDiv.style.display != '') { m_blnIsExecuteResizeForMultiChoiceQuestion = true; m_QuestionDiv.style.visibility = "visible"; m_QuestionDiv.style.display = ''; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'false'; ShowParentQuestionGroup(QuestionsInRuleSplit[i_ForMultiChoiceQuestion].split(",")); } }
        }
    }
    if (m_blnIsExecuteResizeForMultiChoiceQuestion == true) { ReSize(); } 
}
function f_ExecutePollRuleForSingleChoiceQuestion(SingleChoiceQuestionDetailSelectedId, QuestionsIdInRuleThisQuestionDetail, QuestionsIdInRuleOtherQuestionDetails) {
    var m_blnIsExecuteResizeForSingleChoiceQuestion = false; var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var m_childNodesInQuestionDiv; var m_regexpHidFieldClearButtonName = /m_hidfieldClearButtonName/; var m_btnClear; var m_OldI = 0; var m_SingleChoiceQuestionDetailSelected = document.getElementById(SingleChoiceQuestionDetailSelectedId); var QuestionsIdInRuleOtherQuestionDetailsSplit = QuestionsIdInRuleOtherQuestionDetails.split(","); for (i_ForSingleChoiceQuestion = 0; i_ForSingleChoiceQuestion < QuestionsIdInRuleOtherQuestionDetailsSplit.length; i_ForSingleChoiceQuestion++) { m_QuestionId = QuestionsIdInRuleOtherQuestionDetailsSplit[i_ForSingleChoiceQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) { if (m_SingleChoiceQuestionDetailSelected.checked == false) { m_childNodesInQuestionDiv = m_QuestionDiv.childNodes; for (var j = 0; j < m_childNodesInQuestionDiv.length; j++) { if (m_childNodesInQuestionDiv[j].name != null) { if (m_childNodesInQuestionDiv[j].name.search(m_regexpHidFieldClearButtonName) > -1) { m_btnClear = document.getElementsByName(m_childNodesInQuestionDiv[j].value)[0]; if (m_btnClear != null) { m_OldI = i_ForSingleChoiceQuestion; fireClickEvent(m_btnClear); i_ForSingleChoiceQuestion = m_OldI; } } } } } } }
    for (i_ForSingleChoiceQuestion = 0; i_ForSingleChoiceQuestion < QuestionsIdInRuleOtherQuestionDetailsSplit.length; i_ForSingleChoiceQuestion++) {
         m_QuestionId = QuestionsIdInRuleOtherQuestionDetailsSplit[i_ForSingleChoiceQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) {
        if (m_SingleChoiceQuestionDetailSelected.checked) { if (m_QuestionDiv.style.visibility != "visible" || m_QuestionDiv.style.display != '') { m_blnIsExecuteResizeForSingleChoiceQuestion = true; m_QuestionDiv.style.visibility = "visible"; m_QuestionDiv.style.display = ''; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'false';  } }
        else { if (m_QuestionDiv.style.visibility != "hidden" || m_QuestionDiv.style.display != 'none') { m_blnIsExecuteResizeForSingleChoiceQuestion = true; m_QuestionDiv.style.visibility = "hidden"; m_QuestionDiv.style.display = 'none'; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'true';  } }
        }
    }
    if (QuestionsIdInRuleThisQuestionDetailSplit != null)
        if (QuestionsIdInRuleThisQuestionDetailSplit.toString().length > 0)
    if (m_SingleChoiceQuestionDetailSelected.checked) HideParentQuestionGroup(QuestionsIdInRuleThisQuestionDetailSplit);
    else ShowParentQuestionGroup(QuestionsIdInRuleThisQuestionDetailSplit);
    
    var QuestionsIdInRuleThisQuestionDetailSplit = QuestionsIdInRuleThisQuestionDetail.split(","); for (i_ForSingleChoiceQuestion = 0; i_ForSingleChoiceQuestion < QuestionsIdInRuleThisQuestionDetailSplit.length; i_ForSingleChoiceQuestion++) { m_QuestionId = QuestionsIdInRuleThisQuestionDetailSplit[i_ForSingleChoiceQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) { if (m_SingleChoiceQuestionDetailSelected.checked) { m_childNodesInQuestionDiv = m_QuestionDiv.childNodes; for (var j = 0; j < m_childNodesInQuestionDiv.length; j++) { if (m_childNodesInQuestionDiv[j].name != null) { if (m_childNodesInQuestionDiv[j].name.search(m_regexpHidFieldClearButtonName) > -1) { m_btnClear = document.getElementsByName(m_childNodesInQuestionDiv[j].value)[0]; if (m_btnClear != null) { m_OldI = i_ForSingleChoiceQuestion; fireClickEvent(m_btnClear); i_ForSingleChoiceQuestion = m_OldI; } } } } } } }
    for (i_ForSingleChoiceQuestion = 0; i_ForSingleChoiceQuestion < QuestionsIdInRuleThisQuestionDetailSplit.length; i_ForSingleChoiceQuestion++) {
         m_QuestionId = QuestionsIdInRuleThisQuestionDetailSplit[i_ForSingleChoiceQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) {
        if (m_SingleChoiceQuestionDetailSelected.checked) { if (m_QuestionDiv.style.visibility != "hidden" || m_QuestionDiv.style.display != 'none') { m_blnIsExecuteResizeForSingleChoiceQuestion = true; m_QuestionDiv.style.visibility = "hidden"; m_QuestionDiv.style.display = 'none'; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'true';  } }
        else { if (m_QuestionDiv.style.visibility != "visible" || m_QuestionDiv.style.display != '') { m_blnIsExecuteResizeForSingleChoiceQuestion = true; m_QuestionDiv.style.visibility = "visible"; m_QuestionDiv.style.display = ''; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'false';  } }
        
        }
    }
    if (QuestionsIdInRuleThisQuestionDetailSplit != null)
    if(QuestionsIdInRuleThisQuestionDetailSplit.toString().length>0)
     if (m_SingleChoiceQuestionDetailSelected.checked) HideParentQuestionGroup(QuestionsIdInRuleThisQuestionDetailSplit);
        else ShowParentQuestionGroup(QuestionsIdInRuleThisQuestionDetailSplit);
//    debugger;
//    var retval = HideParentQuestionGroup(QuestionsIdInRuleThisQuestionDetailSplit);
    if (m_blnIsExecuteResizeForSingleChoiceQuestion == true) { ReSize(); } 
}
function f_ExecutePollRuleForSingleChoiceQuestion_Combo(SingleChoiceQuestionSelectedId, SingleChoiceQuestionDetailsSelectedIdWithQuestionsIdInRuleThisQuestionDetail, m_intHaveOtherId, m_strtxtHaveOtherClientId) {
     var m_blnIsExecuteResizeForSingleChoiceQuestion_Combo = false; var m_selectedValue; var m_selectedIndex; var m_SingleChoiceQuestionSelectedId = document.getElementById(SingleChoiceQuestionSelectedId); m_selectedIndex = m_SingleChoiceQuestionSelectedId.selectedIndex; m_selectedValue = m_SingleChoiceQuestionSelectedId.options[m_selectedIndex].value; var m_txtHaveOtherCotrol = null; if (m_selectedValue == m_intHaveOtherId) { m_txtHaveOtherCotrol = document.getElementById(m_strtxtHaveOtherClientId); if (m_txtHaveOtherCotrol != null) { m_txtHaveOtherCotrol.disabled = ''; } }
     else { m_txtHaveOtherCotrol = document.getElementById(m_strtxtHaveOtherClientId); if (m_txtHaveOtherCotrol != null) { m_txtHaveOtherCotrol.disabled = 'disabled'; } }
     var btnClearId = SingleChoiceQuestionSelectedId.toString().replace("dropQuestionDetail", "btnClear"); var btnClear = document.getElementById(btnClearId); fireClickEvent(btnClear); m_SingleChoiceQuestionSelectedId.selectedIndex = m_selectedIndex;
    var SelectOptionsWithRuleSplit = SingleChoiceQuestionDetailsSelectedIdWithQuestionsIdInRuleThisQuestionDetail.split("|"); var SelectOptionWithRule = SelectOptionsWithRuleSplit[m_selectedIndex]; var QuestionsIdInRuleThisQuestionDetail; var QuestionsIdInRuleOtherQuestionDetails; var QuestionsIdInRule = SelectOptionWithRule.split("^"); QuestionsIdInRuleThisQuestionDetail = QuestionsIdInRule[0]; QuestionsIdInRuleOtherQuestionDetails = QuestionsIdInRule[1]; var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var m_childNodesInQuestionDiv; var m_regexpHidFieldClearButtonName = /m_hidfieldClearButtonName/; var m_btnClear; var QuestionsIdInRuleOtherQuestionDetailsSplit = QuestionsIdInRuleOtherQuestionDetails.split(","); for (i_ForComboQuestion = 0; i_ForComboQuestion < QuestionsIdInRuleOtherQuestionDetailsSplit.length; i_ForComboQuestion++) { m_QuestionId = QuestionsIdInRuleOtherQuestionDetailsSplit[i_ForComboQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) { if (m_QuestionDiv.style.visibility != "visible" || m_QuestionDiv.style.display != '') { m_blnIsExecuteResizeForSingleChoiceQuestion_Combo = true; m_QuestionDiv.style.visibility = "visible"; m_QuestionDiv.style.display = ''; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'false'; } } }
    var QuestionsIdInRuleThisQuestionDetailSplit = QuestionsIdInRuleThisQuestionDetail.split(","); for (i_ForComboQuestion = 0; i_ForComboQuestion < QuestionsIdInRuleThisQuestionDetailSplit.length; i_ForComboQuestion++) { m_QuestionId = QuestionsIdInRuleThisQuestionDetailSplit[i_ForComboQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) { m_childNodesInQuestionDiv = m_QuestionDiv.childNodes; for (var j = 0; j < m_childNodesInQuestionDiv.length; j++) { if (m_childNodesInQuestionDiv[j].name != null) { if (m_childNodesInQuestionDiv[j].name.search(m_regexpHidFieldClearButtonName) > -1) { m_btnClear = document.getElementsByName(m_childNodesInQuestionDiv[j].value)[0]; if (m_btnClear != null) { m_OldI = i_ForComboQuestion; fireClickEvent(m_btnClear); i_ForComboQuestion = m_OldI; } } } } } }
    for (i_ForComboQuestion = 0; i_ForComboQuestion < QuestionsIdInRuleThisQuestionDetailSplit.length; i_ForComboQuestion++) { m_QuestionId = QuestionsIdInRuleThisQuestionDetailSplit[i_ForComboQuestion]; m_QuestionDivId = 'QuestionId_' + m_QuestionId; m_QuestionDiv = document.getElementById(m_QuestionDivId); if (m_QuestionDiv != null) { if (m_QuestionDiv.style.visibility != "hidden" || m_QuestionDiv.style.display != 'none') { m_blnIsExecuteResizeForSingleChoiceQuestion_Combo = true; m_QuestionDiv.style.visibility = "hidden"; m_QuestionDiv.style.display = 'none'; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'true'; /*HideParentQuestionGroup(m_QuestionId.split(","));*/ } } }

    if (QuestionsIdInRuleThisQuestionDetail!=null) HideParentQuestionGroup(QuestionsIdInRuleThisQuestionDetailSplit);
    else ShowParentQuestionGroup(QuestionsIdInRuleThisQuestionDetailSplit);
    if (m_blnIsExecuteResizeForSingleChoiceQuestion_Combo == true) { ReSize(); } 
}
function f_Fill_hidfieldFreeFormatQuestionDetailSelectedInVoteTime(m_strFreeFormatQuestionGroupAndQuestionIds) {
    ShowLoading(); (m_strFreeFormatQuestionGroupAndQuestionIds == '')
    return; var m_FreeFormatDivs; var m_FreeFormatDiv; var m_FreeFormatQuestionDetailControlId; var m_FreeFormatQuestionDetailId; var m_CtrlsInFreeFormatDiv; var m_hidfieldFreeFormatQuestionDetailSelectedInVoteTimeId; var m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime; var m_strFreeFormatQuestionGroupAndQuestionId; var m_arrFreeFormatQuestionGroupAndQuestionIds; var m_arrFreeFormatQuestionGroupAndQuestionId; var m_selectedindexForFreeFormatDropDownQuestion; var m_setvalueForFreeFormatDropDownQuestion; var m_intQuestionGroupId; var m_intQuestionId; var m_strQuestionDivId; var m_ctrlQuestionDivId; m_arrFreeFormatQuestionGroupAndQuestionIds = m_strFreeFormatQuestionGroupAndQuestionIds.split(","); for (m_istrFreeFormatQuestionGroupAndQuestionIds = 0; m_istrFreeFormatQuestionGroupAndQuestionIds < m_arrFreeFormatQuestionGroupAndQuestionIds.length; m_istrFreeFormatQuestionGroupAndQuestionIds++) {
        m_strFreeFormatQuestionGroupAndQuestionId = m_arrFreeFormatQuestionGroupAndQuestionIds[m_istrFreeFormatQuestionGroupAndQuestionIds]; m_arrFreeFormatQuestionGroupAndQuestionId = m_strFreeFormatQuestionGroupAndQuestionId.split("_"); m_intQuestionGroupId = m_arrFreeFormatQuestionGroupAndQuestionId[0]; m_intQuestionId = m_arrFreeFormatQuestionGroupAndQuestionId[1]; m_hidfieldFreeFormatQuestionDetailSelectedInVoteTimeId = 'ctl00_m_plhPopUpMasterPage_m_ucPoll_QuestionGroup' + m_intQuestionGroupId + '_Question' + m_intQuestionId + '_m_hidfieldFreeFormatQuestionDetailSelectedInVoteTime'; m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime = document.getElementById(m_hidfieldFreeFormatQuestionDetailSelectedInVoteTimeId); m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value = ''; m_strQuestionDivId = 'QuestionId_' + m_intQuestionId; m_ctrlQuestionDivId = document.getElementById(m_strQuestionDivId); m_CtrlsInFreeFormatDiv = m_ctrlQuestionDivId.all; for (m_iCtrlsInFreeFormatDiv = 0; m_iCtrlsInFreeFormatDiv < m_CtrlsInFreeFormatDiv.length; m_iCtrlsInFreeFormatDiv++) {
            switch (m_CtrlsInFreeFormatDiv[m_iCtrlsInFreeFormatDiv].tagName.toUpperCase()) {
                case 'INPUT': if (m_CtrlsInFreeFormatDiv[m_iCtrlsInFreeFormatDiv].checked) {
                        if (m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value == '')
                            m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value += m_CtrlsInFreeFormatDiv[m_iCtrlsInFreeFormatDiv].id; else { m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value += ','; m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value += m_CtrlsInFreeFormatDiv[m_iCtrlsInFreeFormatDiv].id; } 
                    }
                    break; case 'SELECT': m_selectedindexForFreeFormatDropDownQuestion = m_CtrlsInFreeFormatDiv[m_iCtrlsInFreeFormatDiv].selectedIndex; if (m_selectedindexForFreeFormatDropDownQuestion != '0') {
                        m_setvalueForFreeFormatDropDownQuestion = m_CtrlsInFreeFormatDiv[m_iCtrlsInFreeFormatDiv].options[m_selectedindexForFreeFormatDropDownQuestion].id; if (m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value == '')
                            m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value += m_setvalueForFreeFormatDropDownQuestion; else { m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value += ','; m_ctrlhidfieldFreeFormatQuestionDetailSelectedInVoteTime.value += m_setvalueForFreeFormatDropDownQuestion; } 
                    }
                    break;
            } 
        } 
    } HideLoading();
}
function HideParentQuestionGroup(QuestionsIdInRuleOtherQuestionDetailsSplit)
{
    var retval;
    $('.QuestionPlaceHolder').show();
    for (i_ForSingleChoiceQuestion = 0; i_ForSingleChoiceQuestion < QuestionsIdInRuleOtherQuestionDetailsSplit.length; i_ForSingleChoiceQuestion++) {
        var m_QuestionDivId = 'QuestionId_' + QuestionsIdInRuleOtherQuestionDetailsSplit[i_ForSingleChoiceQuestion];
        var BoolValue = $('#' + m_QuestionDivId).parents('.TableQuestionG').find('Div[id*=QuestionId_]:visible').size() != 0; // 0($('#' + m_QuestionDivId).parents('.TableQuestionG').find('Div[id*=QuestionId_]').css('visibility') != 'hidden') && ($('#' + m_QuestionDivId).parents('.TableQuestionG').find('Div[id*=QuestionId_]').css('display') != 'none');
        $('#' + m_QuestionDivId).parents('.TableQuestionG').css('display', BoolValue ? 'block' : 'none');
    }
    return retval = true;
}

function ShowParentQuestionGroup(QuestionsIdInRuleOtherQuestionDetailsSplit)
{
    var retval;

    for (i_forsinglechoicequestion = 0; i_forsinglechoicequestion < QuestionsIdInRuleOtherQuestionDetailsSplit.length; i_forsinglechoicequestion++) {
        var m_questiondivid = 'QuestionId_' + QuestionsIdInRuleOtherQuestionDetailsSplit[i_forsinglechoicequestion];
        $('#' + m_questiondivid).parents('.TableQuestionG').css('display', true ? 'block' : 'none');
    }
    return retval = true;
}
