﻿function setContentHeight() {
	var cLeft = document.getElementById('content_left').offsetHeight;
	var cRight = document.getElementById('content_right').offsetHeight;

	if (cRight < cLeft) {
		document.getElementById('content_text').style.height = (cLeft-70) + 'px'; //the -88 compensates for the title, padding, and borders
	}
}

function showTheMap(root) {
	Shadowbox.open({
		content: '<div id="welcome-msg"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="576" height="315"><param name="movie" value="http://'+root+'/flash/map.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="http://'+root+'/flash/map.swf" quality="high" wmode="transparent" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"type=""application/x-shockwave-flash"" width=""576"" height=""315""></embed></object></div>',
		player: "html",
		title: "Please Select Your Location",
		height: 315,
		width: 576
	});

};

function changeLocale(localeID) {
	setCookie('currentSiteLocale', localeID, 1, '/', '', '');
}

function setCookie(name, value, expireDays, path, domain, secure) {
	
	//build the expiration value
	var today = new Date();
	today.setTime(today.getTime());
	if (expires) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	else {
		expires = 0;
	}
	var expires_date = new Date(today.getTime() + (expires));
	
	//build the actual cookie string
	var theCookie = name + "=" + escape(value)
	theCookie += ((expires) ? ";expires=" + expires_date.toGMTString() : "")
	theCookie += ((path) ? ";path=" + path : "")
	theCookie += ((domain) ? ";domain=" + domain : "")
	theCookie += ((secure) ? ";secure" : "");
	
	//set the cookie
	document.cookie = theCookie;
	
}

