////////////////////////////////////
// General globals
////////////////////////////////////
var soundOn = true;
var siteRoot = "";  // "https://elearning.diageowines.com/";

////////////////////////////////////
// Home page globals
////////////////////////////////////
var preloadFlag = false;

////////////////////////////////////
// Wines of the month globals
////////////////////////////////////
var d = new Date();
var current_month_num = d.getMonth();
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]

// Create a wine object ...
function wine(_name, _module, /* optional */ _tech_sheet) {
	this.name = _name;
	this.module = _module;
	
	// These parameters are optional
	this.tech_sheet = _tech_sheet;
}


var wines = new Array();
// NOTE: Wine objects must be pushed onto the 'wines' array
//  in order by month
// January Wines
wines.push(new wine("Bozo"));
wines.push(new wine("Moon Mountain", siteRoot + "Modules.aspx?p_PageAlias=modules&p_flash_id=2_11"));

// February Wines
wines.push(new wine("Barton&amp;Guestier"));
wines.push(new wine("Archetype", siteRoot + "Modules.aspx?p_PageAlias=modules&p_flash_id=2_2"));

// March Wines
wines.push(new wine("Acacia Vineyard", siteRoot + "Modules.aspx?p_PageAlias=modules&p_flash_id=2_1"));
wines.push(new wine("Edna Valley", siteRoot + "Modules.aspx?p_PageAlias=modules&p_flash_id=2_9"));

// November Wines
wines.push(new wine("Sterling", siteRoot + "Modules.aspx?p_PageAlias=modules&p_flash_id=2_16"));
wines.push(new wine("BV Napa Valley", siteRoot + "Modules.aspx?p_PageAlias=modules&p_flash_id=2_4"));

// December Wines
wines.push(new wine("BV Coastal")); /* Should there be a module here? */
wines.push(new wine("Sterling Napa", siteRoot + "Modules.aspx?p_PageAlias=modules&p_flash_id=2_16"));

// Create an object to represent the left and right wine
//  images on the front page
function wine_image(_left_image, _right_image)
{
	this.left_image = newImage(_left_image);
	this.right_image = newImage(_right_image);
}
		
// Create an array of these wine image objects
var wine_images = new Array();

////////////////////////////////////
// Navigation globals
////////////////////////////////////
var nav_link = function(_url,_label)
{
	this.url = _url;
	this.label = _label;
}

var nav_links = new Array();
nav_links.push(new nav_link("index.html", "Home"));
nav_links.push(new nav_link("index.html", "What's New"));
nav_links.push(new nav_link(months[current_month_num].toLowerCase() + ".html", "Wines of the Month"));
nav_links.push(new nav_link("press.html", "Press Room"));
nav_links.push(new nav_link("team.html", "The Team"));
nav_links.push(new nav_link("hot_sheets.html", "Hot Sheets"));
nav_links.push(new nav_link("#", "Wine Blog"));
nav_links.push(new nav_link("randr.html", "Rewards & Recognitions"));


////////////////////////////////////
// Flash detection globals
////////////////////////////////////
// Major version of Flash required
var requiredMajorVersion = 8;

// Minor version of Flash required
var requiredMinorVersion = 0;

// Revision of Flash required
var requiredRevision = 0;

// the version of javascript supported
var jsVersion = 1.0;

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;


////////////////////////////////////
// Scroller globals
////////////////////////////////////

// When the user clicks one of the scroll buttons,
//  how far should we scroll?
var scrollAmount = 10;

// Dynamically determine the height of the of the lozenge based on the amount of content?
var dynamic_lozenge = false;

// If 'dynamic_lozenge' (cool name for a band) is false, we need to set the height said lozenge
var lozenge_height = 40;


////////////////////////////////////
// Home page tabs globals
////////////////////////////////////
var num_tabs = 4;
var selected_tab = 0;


