function ReSize() {
    if (this.opener != null) {
        if (document.getElementById('Vote_m_divMainPopUp')) {
            var screenW = 640, screenH = 480; if (parseInt(navigator.appVersion) > 3) { screenW = screen.width; screenH = screen.height; }
            else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 3 && navigator.javaEnabled()) { var jToolkit = java.awt.Toolkit.getDefaultToolkit(); var jScreenSize = jToolkit.getScreenSize(); screenW = jScreenSize.width; screenH = jScreenSize.height; }
            var m_divMainHeightMax = Math.round((screenH * 80) / 100); var m_divMainWidthMax = Math.round((screenW * 90) / 100); var Vote_m_divMainPopUp = document.getElementById('Vote_m_divMainPopUp'); var m_divMainPopUpHeight = Vote_m_divMainPopUp.offsetHeight + 30; var m_divMain = document.getElementById('m_divMain'); if (m_divMain != null) {
                m_divMain.setAttribute('Style', 'text-align:-moz-center;'); var m_divMainWidth = m_divMain.offsetWidth + 18; var m_divMainHeight = m_divMain.offsetHeight; if (m_divMainHeight > m_divMainHeightMax && m_divMainWidth < m_divMainWidthMax) { m_divMainPopUpHeight = m_divMainHeightMax; m_divMainWidth = m_divMainWidth + 16; }
                else {
                    if (m_divMainHeight < m_divMainHeightMax && m_divMainWidth > m_divMainWidthMax) { m_divMain.style.width = m_divMainWidthMax + 'px'; m_divMainWidth = m_divMainWidthMax + 18; m_divMainPopUpHeight = m_divMainPopUpHeight; }
                    else { if (m_divMainHeight > m_divMainHeightMax && m_divMainWidth > m_divMainWidthMax) { m_divMain.style.width = m_divMainWidthMax + 'px'; m_divMainWidth = m_divMainWidthMax + 18; m_divMainPopUpHeight = m_divMainHeightMax; } } 
                }
                if (((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) != true) { m_divMainPopUpHeight = m_divMainPopUpHeight + 39; m_divMainWidth = m_divMainWidth + 17; }
                else { m_divMainPopUpHeight = m_divMainPopUpHeight + 15; m_divMainWidth = m_divMainWidth + 17; }
                window.resizeTo(m_divMainWidth, m_divMainPopUpHeight); var leftPos = ((screenW - m_divMainWidth) / 2), topPos = ((screenH - m_divMainPopUpHeight) / 2); window.moveTo(leftPos, topPos);
            };
        } 
    }
    else {
        var Vote_m_divMainPopUp = document.getElementById('Vote_m_divMainPopUp'); if (document.all) { }
        else { }
        var m_panAfterVote = document.getElementById('ctl00_m_plhPopUpMasterPage_m_ucPoll_m_panAfterVote'); if (m_panAfterVote != null) { window.scrollTo(0, top); } 
    } 
}
var _oldColor; function GridView_OnMouseOver(source) { _oldColor = source.style.backgroundColor; source.style.backgroundColor = '#FFA500'; }
function GridView_OnMouseOut(source) { source.style.backgroundColor = _oldColor; }
function Single_Confirm(m_strMessage) {
    var ReturnValue = true; if (!confirm(m_strMessage))
        ReturnValue = false; return ReturnValue;
}
function Double_Confirm(m_strMessage1, m_strMessage2) {
    var ReturnValue = true; if (!confirm(m_strMessage1))
        ReturnValue = false; else
        if (!confirm(m_strMessage2))
        ReturnValue = false; return ReturnValue;
}
function OpenPopupWithResize(strUrlForOpenPage) {
    if (document.all) {
        var screenW = 640, screenH = 480; if (parseInt(navigator.appVersion) > 3) { screenW = screen.width; screenH = screen.height; }
        else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 3 && navigator.javaEnabled()) { var jToolkit = java.awt.Toolkit.getDefaultToolkit(); var jScreenSize = jToolkit.getScreenSize(); screenW = jScreenSize.width; screenH = jScreenSize.height; }
        widthSize = 100; heightSize = 100; w = screenW; h = screenH; y = 0; x = 0;
    }
    else if (document.layers) { w = window.innerWidth; h = window.innerHeight; x = window.screenX; y = window.screenY; widthSize = w; heightSize = h; }
    else { w = window.innerWidth; h = window.innerHeight; x = window.screenX; y = window.screenY; widthSize = w; heightSize = h; }
    var popW = widthSize, popH = heightSize; var leftPos = ((w - popW) / 2) + y, topPos = ((h - popH) / 2) + x; open(strUrlForOpenPage, "_blank", "height=" + heightSize + ",width=" + widthSize + ",top=" + topPos + ",left=" + leftPos + ",resizable= yes,scrollbars=yes,toolbar=no,location=no,menubar=no", false);
}
function openPopup(strUrlForOpenPage, heightSize, widthSize) {
    if (document.all) {
        var screenW = 640, screenH = 480; if (parseInt(navigator.appVersion) > 3) { screenW = screen.width; screenH = screen.height; }
        else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 3 && navigator.javaEnabled()) { var jToolkit = java.awt.Toolkit.getDefaultToolkit(); var jScreenSize = jToolkit.getScreenSize(); screenW = jScreenSize.width; screenH = jScreenSize.height; }
        widthSize = 100; heightSize = 100; w = screenW; h = screenH; y = 0; x = 0;
    }
    else if (document.layers) { w = window.innerWidth; h = window.innerHeight; x = window.screenX; y = window.screenY; }
    else { w = window.innerWidth; h = window.innerHeight; x = window.screenX; y = window.screenY; }
    var popW = widthSize, popH = heightSize; var leftPos = ((w - popW) / 2) + y, topPos = ((h - popH) / 2) + x; open(strUrlForOpenPage, "_blank", "height=" + heightSize + ",width=" + widthSize + ",top=" + topPos + ",left=" + leftPos + ",resizable= yes,scrollbars=yes,toolbar=no,location=no,menubar=no", false);
}
function openPopupWithOutResize(strUrlForOpenPage, heightSize, widthSize) {
    if (document.all) { w = screen.width; h = screen.height; x = window.screenTop; y = window.screenLeft; }
    else if (document.layers) { w = window.innerWidth; h = window.innerHeight; x = window.screenX; y = window.screenY; }
    else { w = window.innerWidth; h = window.innerHeight; x = window.screenX; y = window.screenY; }
    var popW = widthSize, popH = heightSize; var leftPos = ((w - widthSize) / 2), topPos = ((h - heightSize) / 2); open(strUrlForOpenPage, "_blank", "height=" + heightSize + ",width=" + widthSize + ",top=" + topPos + ",left=" + leftPos + ",resizable= yes,scrollbars=yes,toolbar=no,location=no,menubar=no", false);
}
function Open(strUrlForOpenPage) { open(strUrlForOpenPage, "_self"); }
function ClosePage() { self.close(); }
function ClearQuestion_CheckBoxList(CheckBoxListId, m_strarrQuestionDivForVisible) {
    var m_blnIsExecuteResizeForClearQuestion_CheckBoxList = false; var m_strInputText_HaveOtherId = CheckBoxListId.replace('chklQuestionDetail', 'txtInputText_HaveOther'); var m_ctrlInputText_HaveOtherId = document.getElementById(m_strInputText_HaveOtherId); if (m_ctrlInputText_HaveOtherId != null) { m_ctrlInputText_HaveOtherId.value = ''; m_ctrlInputText_HaveOtherId.disabled = true; m_ctrlInputText_HaveOtherId.fireEvent = "onchange"; }
    if (!document.all) { var inputs = document.getElementById(CheckBoxListId).getElementsByTagName('INPUT'); for (var j = inputs.length - 1; j >= 0; j--) { var elem = inputs[j]; if (elem.type == 'checkbox') { elem.checked = false; } } }
    else {
        var ctrl = document.getElementById(CheckBoxListId); var col = ctrl.all
        for (i_ForCheckBoxList = 0; i_ForCheckBoxList < col.length; i_ForCheckBoxList++) { if (col[i_ForCheckBoxList].tagName.toUpperCase() == 'INPUT') { col[i_ForCheckBoxList].checked = false } } 
    }
    var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var QuestionsInRuleSplit = m_strarrQuestionDivForVisible.split(","); for (i_ForQuestionMultiChoice = 0; i_ForQuestionMultiChoice < QuestionsInRuleSplit.length; i_ForQuestionMultiChoice++) { m_QuestionId = QuestionsInRuleSplit[i_ForQuestionMultiChoice]; 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_blnIsExecuteResizeForClearQuestion_CheckBoxList = true; m_QuestionDiv.style.visibility = "visible"; m_QuestionDiv.style.display = ''; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'false'; } } }
    var retval = ShowParentQuestionGroup(QuestionsInRuleSplit);
     if (m_blnIsExecuteResizeForClearQuestion_CheckBoxList == true) { ReSize(); }
    return false;
}
function ClearQuestion_RadioButtonList(RadioButtonListId, m_strarrQuestionDivForVisible) {
    var m_blnIsExecuteResizeForClearQuestion_RadioButtonList = false; var m_strInputText_HaveOtherId = RadioButtonListId.replace('radlQuestionDetail', 'txtInputText_HaveOther'); var m_ctrlInputText_HaveOtherId = document.getElementById(m_strInputText_HaveOtherId); if (m_ctrlInputText_HaveOtherId != null) { m_ctrlInputText_HaveOtherId.value = ''; m_ctrlInputText_HaveOtherId.disabled = true; m_ctrlInputText_HaveOtherId.fireEvent = "onchange"; }
    if (!document.all) { var inputs = document.getElementById(RadioButtonListId).getElementsByTagName('INPUT'); for (var j = inputs.length - 1; j >= 0; j--) { var elem = inputs[j]; if (elem.type == 'radio') { elem.checked = false; } } }
    else {
        var ctrl = document.getElementById(RadioButtonListId); var col = ctrl.all
        for (i_ForRadioButtonList = 0; i_ForRadioButtonList < col.length; i_ForRadioButtonList++) { if (col[i_ForRadioButtonList].tagName.toUpperCase() == 'INPUT') { col[i_ForRadioButtonList].checked = false; } } 
    }
    var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var QuestionsInRuleSplit = m_strarrQuestionDivForVisible.split(","); for (i_ForQuestionSingleChoice = 0; i_ForQuestionSingleChoice < QuestionsInRuleSplit.length; i_ForQuestionSingleChoice++) { m_QuestionId = QuestionsInRuleSplit[i_ForQuestionSingleChoice]; 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_blnIsExecuteResizeForClearQuestion_RadioButtonList = true; m_QuestionDiv.style.visibility = "visible"; m_QuestionDiv.style.display = ''; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'false'; } } }
    var retval = ShowParentQuestionGroup(QuestionsInRuleSplit); 
    if (m_blnIsExecuteResizeForClearQuestion_RadioButtonList == true) { ReSize(); }
    return false;
}
function ClearQuestion_DropDownList(DropDownListId, m_strarrQuestionDivForVisible) {
    var m_blnIsExecuteResizeForClearQuestion_DropDownList = false; var m_strInputText_HaveOtherId = DropDownListId.replace('dropQuestionDetail', 'txtInputText_HaveOther'); var m_ctrlInputText_HaveOtherId = document.getElementById(m_strInputText_HaveOtherId); if (m_ctrlInputText_HaveOtherId != null) { m_ctrlInputText_HaveOtherId.value = ''; m_ctrlInputText_HaveOtherId.disabled = true; m_ctrlInputText_HaveOtherId.fireEvent = "onchange"; }
    var ctrl = document.getElementById(DropDownListId); var myindex = ctrl.selectedIndex
    ctrl.selectedIndex = 0; var m_QuestionDivId; var m_QuestionDiv; var m_QuestionId; var QuestionsInRuleSplit = m_strarrQuestionDivForVisible.split(","); for (i_ForQuestionCombo = 0; i_ForQuestionCombo < QuestionsInRuleSplit.length; i_ForQuestionCombo++) { m_QuestionId = QuestionsInRuleSplit[i_ForQuestionCombo]; 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_blnIsExecuteResizeForClearQuestion_DropDownList = true; m_QuestionDiv.style.visibility = "visible"; m_QuestionDiv.style.display = ''; m_QuestionDiv.childNodes[m_QuestionDiv.childNodes.length - 2].value = 'false'; } } }
    var retval = ShowParentQuestionGroup(QuestionsInRuleSplit);
     if (m_blnIsExecuteResizeForClearQuestion_DropDownList == true) { ReSize(); }
    return false;
}
function ClearTextBox(TextBoxId) { var ctrl = document.getElementById(TextBoxId); ctrl.value = ""; return false; }
function ClearMultiTextBox(TextBoxId) {
     var ctrl = document.getElementById(TextBoxId); var alltxt = $(ctrl).siblings(); for (i = 0; i < alltxt.length; i++) { alltxt[i].value = ""; } ctrl.value = "";
     $(ctrl).val(''); $(ctrl).parent().parent().siblings().children().children().val(''); 
 return false; }
function ClearMatrixQuestion_RadioButton(RadioButtonIds) {
    var ctrl; var RadioButtonIdsSplit = RadioButtonIds.split(","); for (i = 0; i < RadioButtonIdsSplit.length; i++) { ctrl = document.getElementById(RadioButtonIdsSplit[i]); if (ctrl != null) { ctrl.disabled = false; ctrl.checked = false; } }
    return false;
}
function ClearMatrixQuestion_CheckBox(CheckBoxIds, m_lstQuestionDetailIdsForEnable) {
    var ctrl; var CheckBoxIdsSplit = CheckBoxIds.split(","); for (i = 0; i < CheckBoxIdsSplit.length; i++) { ctrl = document.getElementById(CheckBoxIdsSplit[i]); if (ctrl != null) { ctrl.checked = false; } }
    var m_arrQuestionDetailIdsForEnable = m_lstQuestionDetailIdsForEnable.split(","); for (i = 0; i < m_arrQuestionDetailIdsForEnable.length; i++) { ctrl = document.getElementById(m_arrQuestionDetailIdsForEnable[i]); if (ctrl != null) { ctrl.disabled = false; } }
    return false;
}
function CustomValidator_RangeValidator_MinMax(sender, args) {
    var args_Value = args.Value; var min; var max; var QuestionDivName; min = sender.attributes['min'].nodeValue; max = sender.attributes['max'].nodeValue; QuestionDivName = sender.attributes['QuestionDivName'].nodeValue; if (args_Value == '') { args.IsValid = true; return true; }
    var m_QuestionDiv = document.getElementById(QuestionDivName); if (m_QuestionDiv != null) { if (m_QuestionDiv.style.visibility == "hidden") { args.IsValid = true; return true; } }
    args.IsValid = parseInt(args_Value) >= parseInt(min) && parseInt(args_Value) <= parseInt(max); return args.IsValid;
}
function CustomValidator_RegularValidator_Email(sender, args) {
    var args_Value = args.Value; var QuestionDivName; QuestionDivName = sender.attributes['QuestionDivName'].nodeValue; if (args_Value == '') { args.IsValid = true; return true; }
    var m_QuestionDiv = document.getElementById(QuestionDivName); if (m_QuestionDiv != null) { if (m_QuestionDiv.style.visibility == "hidden") { args.IsValid = true; return true; } }
    var RegularValidator_Email = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
    if (RegularValidator_Email.test(args_Value)) { args.IsValid = true; return true; }
    args.IsValid = false; return false;
}
function CustomValidator_RegularValidator_NUMERIC(sender, args) {
    var args_Value = args.Value; var QuestionDivName; QuestionDivName = sender.attributes['QuestionDivName'].nodeValue; if (args_Value == '') { args.IsValid = true; return true; }
    var m_QuestionDiv = document.getElementById(QuestionDivName); if (m_QuestionDiv != null) { if (m_QuestionDiv.style.visibility == "hidden") { args.IsValid = true; return true; } }
    var RegularValidator_NUMERIC = /\d*/; if (RegularValidator_NUMERIC.test(args_Value)) { args.IsValid = true; return true; }
    args.IsValid = false; return false;
}
function CustomValidator_RequiredFieldValidator(sender, args) {
    args_Value = args.Value; var Main_ControlToValidate = document.getElementById(args_Value); var Main_CtrlToValidate = document.getElementById(args);
    var QuestionDivName; QuestionDivName = sender.attributes['QuestionDivName'].nodeValue; var m_QuestionDiv = document.getElementById(QuestionDivName); if (m_QuestionDiv != null) { if (m_QuestionDiv.style.visibility == "hidden") { args.IsValid = true; return true; } }
    if (Main_ControlToValidate != null) if (Main_ControlToValidate.value != '') { args.IsValid = true; return true; } if (Main_CtrlToValidate != null) if (Main_CtrlToValidate.value != '') { args.IsValid = true; return true; }
    args.IsValid = false; return false;
}
function Copy_Value_From_HtmlTextBoxToHiddenField(This_To_TextBox, HiddenField_ID_For_Copy) { var m_ctrlHiddenField_ID_For_Copy = document.getElementById(HiddenField_ID_For_Copy); if (m_ctrlHiddenField_ID_For_Copy != null) { m_ctrlHiddenField_ID_For_Copy.value = This_To_TextBox.value; } }
function ShowLoading() { /*document.getElementById("loading").className="loading-visible";*/ }
function HideLoading() { /*document.getElementById("loading").className="loading-invisible";*/ }
function MouseOver(obj){obj.src = obj.src.toLowerCase().replace('.jpg', '-hover.jpg');}
function MouseOut(obj){obj.src = obj.src.toLowerCase().replace('-hover.jpg', '.jpg');} 
