﻿
var adminAreas = new Array();
var activeArea = null;

adminAreas[0] = 'bookingManagementDiv';
adminAreas[1] = 'userManagementDiv';
adminAreas[2] = 'siteSettingsDiv';
adminAreas[3] = 'contentManagementDiv';

function displayAdminPanel(index) {

    if (activeArea != null && activeArea != index) {
        new Effect.BlindUp(adminAreas[activeArea]);
    }

    if (index != activeArea) {

        if (activeArea == null) {
            new Effect.BlindDown(adminAreas[index]);
        } else {
            setTimeout(function() { new Effect.BlindDown(adminAreas[index]); }, 1200);
        }
       
        activeArea = index;
    }
}

var imgNamesList = new Array();

function initImageHover(imgNames) 
{
    imgNamesList = imgNames;
}

function hoverSetImage(index) 
{
    document.forms[0].fullimg.src = imgNamesList[index];
}

function blindDownArea(id) 
{
    new Effect.BlindDown(id);
}

function cgBlindDown() 
{
    document.getElementById('showGroups').innerHTML = "Select a Group";
    document.getElementById('showGroups').removeAttribute("onclick");
    document.getElementById('showGroups').removeAttribute("href");
    new Effect.BlindDown('cgBlindDown');

}
