// Global Variable Declarations

function goHiBandwidth(in_language, in_promo_site) {
//	document.forms[0].elements["LanguageChoice"].value = in_language;
	document.forms[0].elements["BandwidthChoice"].value = 'hi';
//	document.forms[0].elements["PromoSiteChoice"].value = in_promo_site;
	document.forms[0].elements["SubmitContext"].value='Submit';
	document.forms[0].submit();
}

function goLoBandwidth(in_language, in_promo_site) {
//	document.forms[0].elements["LanguageChoice"].value = in_language;
	document.forms[0].elements["BandwidthChoice"].value = 'lo';
//	document.forms[0].elements["PromoSiteChoice"].value = in_promo_site;
	document.forms[0].elements["SubmitContext"].value='Submit';
	document.forms[0].submit();
}

function submitCountryOnly() {
	document.forms[0].elements["SubmitContext"].value='CountryChange';
	document.forms[0].submit();
}

function blurDay() {
	if (document.forms[0].elements["bDay"].value=="") {
		document.forms[0].elements["bDay"].value="DD";
	}
}

function focusDay() {
	if (document.forms[0].elements["bDay"].value=="DD") {
		document.forms[0].elements["bDay"].value="";
	}
}

function blurYear() {
	if (document.forms[0].elements["bYear"].value=="") {
		document.forms[0].elements["bYear"].value="YYYY";
	}
}

function focusYear() {
	if (document.forms[0].elements["bYear"].value=="YYYY") {
		document.forms[0].elements["bYear"].value="";
	}
}

function init(in_lcode) {
	
	// Replace + in_lcode + with + '' +
	// Set the splash page window Name
	window.name = "BacardiSplash";
	/*
	languageselecthigh_englishhigh_off = new Image;
	languageselecthigh_englishhigh_off.src = js_root + "images/splash_new/lselect_english_off" + ".gif";
	languageselecthigh_englishhigh_roll = new Image;
	languageselecthigh_englishhigh_roll.src = js_root + "images/splash_new/lselect_english_roll" + ".gif";
	
	languageselectlow_englishlow_off = languageselecthigh_englishhigh_off;
	languageselectlow_englishlow_roll = languageselecthigh_englishhigh_roll;

	languageselecthigh_englishushigh_off = new Image;
	languageselecthigh_englishushigh_off.src = js_root + "images/splash_new/lselect_englishus_off" + ".gif";
	languageselecthigh_englishushigh_roll = new Image;
	languageselecthigh_englishushigh_roll.src = js_root + "images/splash_new/lselect_englishus_roll" + ".gif";

	languageselectlow_englishuslow_off = languageselecthigh_englishushigh_off;
	languageselectlow_englishuslow_roll = languageselecthigh_englishushigh_roll;

	languageselecthigh_englishukhigh_off = new Image;
	languageselecthigh_englishukhigh_off.src = js_root + "images/splash_new/lselect_englishuk_off" + ".gif";
	languageselecthigh_englishukhigh_roll = new Image;
	languageselecthigh_englishukhigh_roll.src = js_root + "images/splash_new/lselect_englishuk_roll" + ".gif";

	languageselecthigh_englishirehigh_off = new Image;
	languageselecthigh_englishirehigh_off.src = js_root + "images/splash_new/lselect_englishire_off" + ".gif";
	languageselecthigh_englishirehigh_roll = new Image;
	languageselecthigh_englishirehigh_roll.src = js_root + "images/splash_new/lselect_englishire_roll" + ".gif";

	languageselectlow_englishuklow_off = languageselecthigh_englishukhigh_off;
	languageselectlow_englishuklow_roll = languageselecthigh_englishukhigh_roll;
	
	// canada
	languageselecthigh_englishcahigh_off = new Image;
	languageselecthigh_englishcahigh_off.src = js_root + "images/splash_new/lselect_englishca_off" + ".gif";
	languageselecthigh_englishcahigh_roll = new Image;
	languageselecthigh_englishcahigh_roll.src = js_root + "images/splash_new/lselect_englishca_roll" + ".gif";

	languageselectlow_englishcalow_off = languageselecthigh_englishcahigh_off;
	languageselectlow_englishcalow_roll = languageselecthigh_englishcahigh_roll;

    // australia
	languageselecthigh_englishauhigh_off = new Image;
	languageselecthigh_englishauhigh_off.src = js_root + "images/splash_new/lselect_englishau_off" + ".gif";
	languageselecthigh_englishauhigh_roll = new Image;
	languageselecthigh_englishauhigh_roll.src = js_root + "images/splash_new/lselect_englishau_roll" + ".gif";

	languageselectlow_englishaulow_off = languageselecthigh_englishauhigh_off;
	languageselectlow_englishaulow_roll = languageselecthigh_englishauhigh_roll;
	
	// netherlands
	languageselecthigh_dutchhigh_off = new Image;
	languageselecthigh_dutchhigh_off.src = js_root + "images/splash_new/lselect_dutch_off" + ".gif";
	languageselecthigh_dutchhigh_roll = new Image;
	languageselecthigh_dutchhigh_roll.src = js_root + "images/splash_new/lselect_dutch_roll" + ".gif";

	languageselecthigh_dutchbelgiumhigh_off = new Image;
	languageselecthigh_dutchbelgiumhigh_off.src = js_root + "images/splash_new/lselect_dutchbelgium_off" + ".gif";
	languageselecthigh_dutchbelgiumhigh_roll = new Image;
	languageselecthigh_dutchbelgiumhigh_roll.src = js_root + "images/splash_new/lselect_dutchbelgium_roll" + ".gif";

	languageselecthigh_dutchnetherlandshigh_off = new Image;
	languageselecthigh_dutchnetherlandshigh_off.src = js_root + "images/splash_new/lselect_dutchnetherlands_off" + ".gif";
	languageselecthigh_dutchnetherlandshigh_roll = new Image;
	languageselecthigh_dutchnetherlandshigh_roll.src = js_root + "images/splash_new/lselect_dutchnetherlands_roll" + ".gif";

	languageselectlow_dutchnetherlandslow_off = languageselecthigh_dutchnetherlandshigh_off;
	languageselectlow_dutchnetherlandslow_roll = languageselecthigh_dutchnetherlandshigh_roll;

	languageselecthigh_spanishhigh_off = new Image;
	languageselecthigh_spanishhigh_off.src = js_root + "images/splash_new/lselect_spanish_off" + ".gif";
	languageselecthigh_spanishhigh_roll = new Image;
	languageselecthigh_spanishhigh_roll.src = js_root + "images/splash_new/lselect_spanish_roll" + ".gif";

	languageselectlow_spanishlow_off = languageselecthigh_spanishhigh_off;
	languageselectlow_spanishlow_roll = languageselecthigh_spanishhigh_roll;

	languageselecthigh_spanishspainhigh_off = new Image;
	languageselecthigh_spanishspainhigh_off.src = js_root + "images/splash_new/lselect_spanishspa_off" + ".gif";
	languageselecthigh_spanishspainhigh_roll = new Image;
	languageselecthigh_spanishspainhigh_roll.src = js_root + "images/splash_new/lselect_spanishspa_roll" + ".gif";
	
	languageselecthigh_spanishmexicohigh_off = new Image;
	languageselecthigh_spanishmexicohigh_off.src = js_root + "images/splash_new/lselect_spanishmexico_off" + ".gif";
	languageselecthigh_spanishmexicohigh_roll = new Image;
	languageselecthigh_spanishmexicohigh_roll.src = js_root + "images/splash_new/lselect_spanishmexico_roll" + ".gif";

	languageselectlow_spanishmexicolow_off = languageselecthigh_spanishmexicohigh_off;
	languageselectlow_spanishmexicolow_roll = languageselecthigh_spanishmexicohigh_roll;

	languageselecthigh_frenchhigh_off = new Image;
	languageselecthigh_frenchhigh_off.src = js_root + "images/splash_new/lselect_french_off" + ".gif";
	languageselecthigh_frenchhigh_roll = new Image;
	languageselecthigh_frenchhigh_roll.src = js_root + "images/splash_new/lselect_french_roll" + ".gif";

	languageselectlow_frenchlow_off = languageselecthigh_frenchhigh_off;
	languageselectlow_frenchlow_roll = languageselecthigh_frenchhigh_roll;

	languageselecthigh_frenchbelgiumhigh_off = new Image;
	languageselecthigh_frenchbelgiumhigh_off.src = js_root + "images/splash_new/lselect_frenchbelgium_off" + ".gif";
	languageselecthigh_frenchbelgiumhigh_roll = new Image;
	languageselecthigh_frenchbelgiumhigh_roll.src = js_root + "images/splash_new/lselect_frenchbelgium_roll" + ".gif";

	languageselecthigh_danishhigh_off = new Image;
	languageselecthigh_danishhigh_off.src = js_root + "images/splash_new/lselect_danish_off" + ".gif";
	languageselecthigh_danishhigh_roll = new Image;
	languageselecthigh_danishhigh_roll.src = js_root + "images/splash_new/lselect_danish_roll" + ".gif";

	languageselectlow_danishlow_off = languageselecthigh_danishhigh_off;
	languageselectlow_danishlow_roll = languageselecthigh_danishhigh_roll;

	languageselecthigh_italianhigh_off = new Image;
	languageselecthigh_italianhigh_off.src = js_root + "images/splash_new/lselect_italian_off" + ".gif";
	languageselecthigh_italianhigh_roll = new Image;
	languageselecthigh_italianhigh_roll.src = js_root + "images/splash_new/lselect_italian_roll" + ".gif";

	languageselectlow_italianlow_off = languageselecthigh_italianhigh_off;
	languageselectlow_italianlow_roll = languageselecthigh_italianhigh_roll;

	languageselecthigh_greekhigh_off = new Image;
	languageselecthigh_greekhigh_off.src = js_root + "images/splash_new/lselect_greek_off" + ".gif";
	languageselecthigh_greekhigh_roll = new Image;
	languageselecthigh_greekhigh_roll.src = js_root + "images/splash_new/lselect_greek_roll" + ".gif";

	languageselectlow_greeklow_off = languageselecthigh_greekhigh_off;
	languageselectlow_greeklow_roll = languageselecthigh_greekhigh_roll;

	languageselecthigh_russianhigh_off = new Image;
	languageselecthigh_russianhigh_off.src = js_root + "images/splash_new/lselect_russian_off" + ".gif";
	languageselecthigh_russianhigh_roll = new Image;
	languageselecthigh_russianhigh_roll.src = js_root + "images/splash_new/lselect_russian_roll" + ".gif";

	languageselectlow_russianlow_off = languageselecthigh_russianhigh_off;
	languageselectlow_russianlow_roll = languageselecthigh_russianhigh_roll;

	languageselecthigh_polishhigh_off = new Image;
	languageselecthigh_polishhigh_off.src = js_root + "images/splash_new/lselect_polish_off" + ".gif";
	languageselecthigh_polishhigh_roll = new Image;
	languageselecthigh_polishhigh_roll.src = js_root + "images/splash_new/lselect_polish_roll" + ".gif";

	languageselectlow_polishlow_off = languageselecthigh_polishhigh_off;
	languageselectlow_polishlow_roll = languageselecthigh_polishhigh_roll;

	languageselecthigh_germanhigh_off = new Image;
	languageselecthigh_germanhigh_off.src = js_root + "images/splash_new/lselect_german_off" + ".gif";
	languageselecthigh_germanhigh_roll = new Image;
	languageselecthigh_germanhigh_roll.src = js_root + "images/splash_new/lselect_german_roll" + ".gif";

	languageselectlow_germanlow_off = languageselecthigh_germanhigh_off;
	languageselectlow_germanlow_roll = languageselecthigh_germanhigh_roll;

	languageselecthigh_germangermanyhigh_off = new Image;
	languageselecthigh_germangermanyhigh_off.src = js_root + "images/splash_new/lselect_germangermany_off" + ".gif";
	languageselecthigh_germangermanyhigh_roll = new Image;
	languageselecthigh_germangermanyhigh_roll.src = js_root + "images/splash_new/lselect_germangermany_roll" + ".gif";

	languageselectlow_germangermanylow_off = languageselecthigh_germangermanyhigh_off;
	languageselectlow_germangermanylow_roll = languageselecthigh_germangermanyhigh_roll;

	languageselecthigh_danishhigh_off = new Image;
	languageselecthigh_danishhigh_off.src = js_root + "images/splash_new/lselect_danish_off" + ".gif";
	languageselecthigh_danishhigh_roll = new Image;
	languageselecthigh_danishhigh_roll.src = js_root + "images/splash_new/lselect_danish_roll" + ".gif";

	languageselectlow_danishlow_off = languageselecthigh_danishhigh_off;
	languageselectlow_danishlow_roll = languageselecthigh_danishhigh_roll;

	languageselecthigh_hungarianhigh_off = new Image;
	languageselecthigh_hungarianhigh_off.src = js_root + "images/splash_new/lselect_hungarian_off" + ".gif";
	languageselecthigh_hungarianhigh_roll = new Image;
	languageselecthigh_hungarianhigh_roll.src = js_root + "images/splash_new/lselect_hungarian_roll" + ".gif";

	languageselectlow_hungarianlow_off = languageselecthigh_hungarianhigh_off;
	languageselectlow_hungarianlow_roll = languageselecthigh_hungarianhigh_roll;

	languageselecthigh_portuguesehigh_off = new Image;
	languageselecthigh_portuguesehigh_off.src = js_root + "images/splash_new/lselect_portuguese_off" + ".gif";
	languageselecthigh_portuguesehigh_roll = new Image;
	languageselecthigh_portuguesehigh_roll.src = js_root + "images/splash_new/lselect_portuguese_roll" + ".gif";

	languageselectlow_portugueselow_off = languageselecthigh_portuguesehigh_off;
	languageselectlow_portugueselow_roll = languageselecthigh_portuguesehigh_roll;

	languageselecthigh_brazilianportuguesehigh_off = new Image;
	languageselecthigh_brazilianportuguesehigh_off.src = js_root + "images/splash_new/lselect_brazilianportuguese_off" + ".gif";
	languageselecthigh_brazilianportuguesehigh_roll = new Image;
	languageselecthigh_brazilianportuguesehigh_roll.src = js_root + "images/splash_new/lselect_brazilianportuguese_roll" + ".gif";

	languageselectlow_brazilianportugueselow_off = languageselecthigh_brazilianportuguesehigh_off;
	languageselectlow_brazilianportugueselow_roll = languageselecthigh_brazilianportuguesehigh_roll;
	*/
	button_no_off = new Image;
	button_no_off.src = js_root + "images/splash_new/button_no_off" + ".gif";
	button_no_roll = new Image;
	button_no_roll.src = js_root + "images/splash_new/button_no_roll" + ".gif";

	ns4 = (document.layers)? true:false; // netscape 4?
	ie4 = (document.all)? true:false; // internet explorer 4/5?
	ns6 = (ns4|ie4)? false:true; // (Netscape 6)

	if (ie4) {
		if ((document.body.clientWidth) < 672)
		{
			page_position_left = 0;
		}
		else
		{
			page_position_left = Math.floor(((document.body.clientWidth -672)/ 2));
		}
	}
	if (ns4) {
		page_position_left = document.left_edge_spacer.x;
	}
	if (ns6) {
		if (typeof document.left_edge_spacer.x == 'undefined') {
			page_position_left = document.left_edge_spacer.offsetLeft;
		}
		else {
			page_position_left = document.left_edge_spacer.x;
		}
	}
	
	global_init(in_lcode);
	
	// Pop Ecard
	if ( ecard_guid.length != 0 )
	{
		if ( maxflashversion >= 6 )
		{
			// Flash Popup Size to Fit
			ECard = popWindow(js_root + 'connect/pickup_ecard.aspx?guid=' + ecard_guid, 'toolbar=no,scrollbars=no,width=520,height=330');
		}
		else
		{
			// Html Popup
			ECard = popWindow(js_root + 'connect/pickup_ecard.aspx?guid=' + ecard_guid, 'resizable,toolbar=no,scrollbars=yes,width=520,height=330');
		}
	}
	
	// Pop Flash Movie if so marked
	if ( open_flag )
	{
		//openFlashSite();
	}

}

