﻿/*
**********************************************
**** BEGIN New Minstry Index Code
**********************************************
*/
var toggleFlag = true;

function showIndex() {
    if (toggleFlag == true) {
        $telerik.$("#ministryIndex").animate({ "top": "+=222px" }, { duration: "normal" }, "easOut");
        toggleFlag = false;
    } else {
        $telerik.$("#ministryIndex").animate({ "top": "-=222px" }, { duration: "normal" }, "easOut");
        toggleFlag = true;
    }
}

var indexClickFlag = true;
//toggles index arrow up and down depending on state of index panel
function arrowClickSwitch() {
    if (indexClickFlag) {
        document.getElementById("v_toggle").style.background = "url(/images/_img/global/sm-whitearrow-up.gif) no-repeat right center";
        indexClickFlag = false;
    } else {
        document.getElementById("v_toggle").style.background = "url(/images/_img/global/sm-whitearrow-down.gif) no-repeat right center";
        indexClickFlag = true;
    }
}

//checks state of panel and uses correct 'over' graphic for arrow
function arrowOverSwitch() {
    if (indexClickFlag) {
        document.getElementById("v_toggle").style.background = "url(/images/_img/global/sm-blackarrow-down.gif) no-repeat right center";
    } else {
        document.getElementById("v_toggle").style.background = "url(/images/_img/global/sm-blackarrow-up.gif) no-repeat right center";
    }
}

//checks state of panel and uses correct 'out' graphic for arrow
function arrowOutSwitch() {
    if (indexClickFlag) {
        document.getElementById("v_toggle").style.background = "url(/images/_img/global/sm-whitearrow-down.gif) no-repeat right center";
    } else {
        document.getElementById("v_toggle").style.background = "url(/images/_img/global/sm-whitearrow-up.gif) no-repeat right center";
    }
}