/*-------------------------------------------------------*/
//	Setting this function aside because it's so cool.	
function get_url_vars()
{
	var vars = [ ], hash;
	var hashes = window.location.href.slice( window.location.href.indexOf( '?') + 1).split( '&');
	for(var i = 0; i < hashes.length; i++)
	{
		hash = hashes[ i].split( '=');
		vars.push(hash[ 0]);
		vars[hash[ 0]] = hash[ 1];
	}
		return vars;
}
var url_vars = get_url_vars();


/*-------------------------------------------------------*/

var sidebar = new Array( 2);
sidebar[ 0] = "sidebar_forest-1.jpg";
sidebar[ 1] = "sidebar_tall-oak.jpg";

var sidebar_path = "_images/";
var sidebar_index = Math.floor( Math.random() * 2);	//	for alternating sidebar background images

var sidebar_style = 'style="float:left; width:190px; height:800px; background-image: url( _images/sidebar_tall-oak.jpg); background-repeat: no-repeat;"';
//	var sidebar_style = 'style="float:left; width:190px; height:840px; background-image: url(' + sidebar_path + sidebar[ sidebar_index] + '); background-repeat: no-repeat;"';
//	var sidebar_style = 'style="float:left; width:240px; height:840px; background-color:#666;"';

var panels_red = new Array( 12);
panels_red[ 0] = "panel_red_00.jpg";
panels_red[ 1] = "panel_red_01.jpg";
panels_red[ 2] = "panel_red_02.jpg";
panels_red[ 3] = "panel_red_03.jpg";
panels_red[ 4] = "panel_red_04.jpg";
panels_red[ 5] = "panel_red_05.jpg";
panels_red[ 6] = "panel_red_06.jpg";
panels_red[ 7] = "panel_red_07.jpg";
panels_red[ 8] = "panel_red_08.jpg";
panels_red[ 9] = "panel_red_09.jpg";
panels_red[10] = "panel_red_10.jpg";
panels_red[11] = "panel_red_11.jpg";

var panels_tan = new Array( 12)
panels_tan[ 0] = "panel_tan_00.jpg";
panels_tan[ 1] = "panel_tan_01.jpg";
panels_tan[ 2] = "panel_tan_02.jpg";
panels_tan[ 3] = "panel_tan_03.jpg";
panels_tan[ 4] = "panel_tan_04.jpg";
panels_tan[ 5] = "panel_tan_05.jpg";
panels_tan[ 6] = "panel_tan_06.jpg";
panels_tan[ 7] = "panel_tan_07.jpg";
panels_tan[ 8] = "panel_tan_08.jpg";
panels_tan[ 9] = "panel_tan_09.jpg";
panels_tan[10] = "panel_tan_10.jpg";
panels_tan[11] = "panel_tan_11.jpg";

var panel_path = "_images/menu_panels/";

//	Oak Wine Barrels:
var panel_index = Math.floor( Math.random() * 12);
var panel_c1 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_1 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_2 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_3 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_4 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_5 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_6 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_7 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_8 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_9 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_10 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_11 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c1_12 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';


//	Oak Alternatives (Add Ins):
var panel_index = Math.floor( Math.random() * 12);
var panel_c2 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_1 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_2 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_3 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_4 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_5 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_6 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_7 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_8 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_9 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_10 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_11 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_12 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_13 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c2_14 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';


//	Tanks and Casks:
var panel_index = Math.floor( Math.random() * 12);
var panel_c3 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	The Company:
var panel_index = Math.floor( Math.random() * 12);
var panel_c4 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	Cooperages:
var panel_index = Math.floor( Math.random() * 12);
var panel_c5 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c5_1 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c5_2 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c5_3 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';


//	Sources of Oak:
var panel_index = Math.floor( Math.random() * 12);
var panel_c6 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c6_1 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c6_2 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';

	var panel_index = Math.floor( Math.random() * 12);
	var panel_c6_3 = 'style="background-image: url(' + panel_path + panels_tan[ panel_index] + '); background-repeat: no-repeat;"';


//	Oak Wood Toasting:
var panel_index = Math.floor( Math.random() * 12);
var panel_c7 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	Sensory Analysis:
//	var panel_index = Math.floor( Math.random() * 12);
//	var panel_c8 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	Research
var panel_index = Math.floor( Math.random() * 12);
var panel_c9 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	Megnin Mills
var panel_index = Math.floor( Math.random() * 12);
var panel_c10 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	Nadalié Worldwide
var panel_index = Math.floor( Math.random() * 12);
var panel_c11 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	Information and Forms:
	var panel_index = Math.floor( Math.random() * 12);
	var panel_c12 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat;"';


//	Contact Us:
var panel_index = Math.floor( Math.random() * 12);
var panel_c13 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


//	Site Map:
var panel_index = Math.floor( Math.random() * 12);
var panel_c14 = 'style="background-image: url(' + panel_path + panels_red[ panel_index] + '); background-repeat: no-repeat"';


