var strUrl = String(window.location);
var lng = "fr";
var regEx = /ballooncanada/gi;

//if(regEx.test(strUrl)) lng = "fr";
if(regEx.test(strUrl)) lng = "en";

// retreive the flash var in the url
function retreivesUrlVars()
{
	var numCharPos = strUrl.indexOf("#", 0);
	var questCharPos = strUrl.indexOf("?", 0);	
	if(numCharPos > 0) urlVars = strUrl.substr(numCharPos +1) + "&";
	else if(questCharPos > 0) urlVars = strUrl.substr(questCharPos +1) + "&";
	else urlVars = "lng=" + lng + "&";
	
	//	Returns the variables as it must be push into Flash*/
	return urlVars;
	return "lng=fr"
}



function openPopup(url)
{
	var nx = (screen.width / 2) - (600 / 2);
	var ny = (screen.height / 2) - (650 / 2);

	var w = window.open(url,'win','width=' + 600 + ',height=' + 650 + ',left=' + nx + ',top=' + ny + ',resizable=yes,scrollbars=yes');
}

