﻿/*
 * CONFIG AREA
 * 
 * 
*/
var _isLocalHost = GetIsLocalHost();

var _slidesPerColl = 9;
var _loadBuffer = 2;
var _thumbLoadBuffer = 4;
var _autoAdvance = true;
var _slideDelay = 4000;         // millisecs
var _slideFadeSpeed = 1000;     // millisecs
var _collFadeSpeed = 1000;      // millisecs
var _imageMode = 1;             // 0=NoScale    1=Fit     2=Fill (may overflow beyond the boundaries of the viz area)
var _displayW = 0.990;            // percent of screen (values under 1) / pixels (values over 1)
var _displayH = 0.900;            // percent of screen (values under 1) / pixels (values over 1)

var _thumbSize = 50;              // pixels
var _thumbEnlarge = 8;           // pixels - amout of pixels to increase the thumb size on x and y.
var _thumbPad = 10;             //  pixels, padding above and below thumbnails.

var _thumbVerticalOffset = -80;    // pixels - Pixels to move up or down the thumbnail container.
var _chasingFrameXOffst = 4;      // pixels
var _chasingFrameSpeed = 1200;    // millisecs

var _prevNextOffst = 20;           // pixels - a distance to left or right from the arrow to the thumbs.

var _thumbnails = true;
var _thumbVOffset = 0;              /// An amount of pixels to offset Up / Down the thumbnail container.



/// THE CAPTION RELATED PARAMETERS
var _captionPos = 1;              // 1: Top   // 2: bottom
var _captionMode = 0;             // 0: No Caption      1: Permanent  // 2: On picture MouseOver.
var _captionMargin = 15;             /// The distance in pixels from the Top or Bottom of the picture.
var _captionPadding = 20;            /// The distance in pixels from the Caption to its upper, lower, left, right container.
var _captionHeight = 0;             /// 0: Automatic  0.01 - 1: A percentage   >1 : a pixel value. Spans in the opposite
                                    /// direction of _captionPos
var _captionTextVAlign = 1;          /// 1: Top   2: Center 3: Bottom 
                                    /// The vert align of the Text in relationship to the Caption rectangle where it's positioned.
var _captionBackClass = "";
var _captionFrontClass = "";



/// THE PICTURE COUNTER RELATED PARAMETERS
var _pictCounter = false;
var _pictCounterPadding = 10;       /// The padding between the counter and its container.
var _pictCounterMargin = 10;        /// The offset above or below the picture being displayed.
var _pictCounterPos = 2;            /// 1: Top      2: Bottom
var _pictCounterWidth = 1;          /// Values above ONE are absolute, smaller values are percentages.
var _pictText = "#0# / #1#";
var _pictCounterBackClass = "";
var _pictCounterFrontClass = "";
var _pictVAlign = 2;                 /// 1: Top   2: Center 3: Bottom
var _pictVPad = 0;                   /// A padding applied to the top of the image if it's VTop aligned, 
                                     /// or to the bottom if it's VBottom aligned.




/// THE PHOTO HOLDERS ARE THE FRAMING CORNERS OF THE PICTURE.
var _photoHolderSize = 30;          // pixels - The size of the corner picture.
var _photoHolderOffset = 10;        // pixels - How separate from the picture will this corner be
var _footerOffsetY = 50;            // pixels



var _pausedIconPath = '/CommonAssets/PhotoGalleryWidget/Src/Paused.gif';
var _pauseDivLocation = 1;          // 1: Upper left, 2: Upper Right, 3: Lower Left, 4: Lower Right, 5: Center
var _pauseDivPadding = 10;          // Pixels.
var _enablePause = true;

/// THE LOCATION OF THE FRAMING CORNERS. USE BLANK IF YOU DON'T WANT TO USE IT.
var _framingsImageName = '/CommonAssets/PhotoGalleryWidget/Src/Box_#.gif';


var _handlerPath = "/CommonAssets/PhotoGalleryWidget/PhotoGalleryHandler.aspx";
var _debugFirstDelay = 0;

var _shuffling = false;

var _autoStart = false;

var _picturesContainer = "Contents";    /// The name of the div containing the pictures. "Contents" is the default name.

var _verticalSpace = false;             /// If the vertical space of the widget is applied elements below the widget    
                                        /// will actually show "below" the pictures and not "underneath" them.


var _sizeSource = null;             /// Specifies the ID of the tag determining the width and height of the 
                                    /// display area, instead of using the full screen size.

/// REDEFINE A COUPLE VARIABLES TO DEPICT THE ONLINE ENVIRONMENT.
///
if (!_isLocalHost) {
    _slideDelay = 4000;         // millisecs
    _debugFirstDelay = 0;
    _autoStart = false;
}



/*
 ******************************************
 ******************************************
 ******************************************
*/






function GetIsLocalHost() {
//    return false;
    return document.URL.indexOf("localhost") > -1;
}
