/*
  Java Script file: acl_banner.js
       Description: This JS file contains JS functions for managing the presentaion
                    of banner content
  NOTE: The JS functions in this file rely on jQuery functions

  */

  /*
     Function: SetupBanner
  */
  function SetupBanner(bannerID, speed, timeout){
    var bannerGUI;
    
    bannerGUI = GetHTMLObject(bannerID);
    
    if (bannerGUI != null){
      bannerGUI.style.display = "block";
			$(bannerGUI).cycle({
        fx: "fade",
        speed: speed,
        timeout: timeout
      });
      
    }
  } // End of SetupBanner function

  function ShowBanner(guiItem){
    var bannerID;
    var bannerGUI;
    var action;
    if (guiItem != null){
      if (HasAttribute(guiItem, "action")){
        action = guiItem.getAttribute("action");
        if (action != null){
          if (HasAttribute(guiItem, "bannerID")){
            bannerID = guiItem.getAttribute("bannerID");
            bannerGUI = GetHTMLObject(bannerID);
            if (bannerGUI != null){
              if (action == "Next"){
           			$(bannerGUI).cycle("next");
              } // Navigate to the next banner image
              else if (action == "Previous"){
           			$(bannerGUI).cycle("prev");
              } // Navigate to the previous banner image
            }
          } // Check if the banner ID attribute is defined
        } // Check if the action attribute is defined
      }
    }
  } // End of ShowBanner function


