self.onerror = function () { return true; }

// Store the screen dimensions.
var aw = screen.availWidth;
var ah = screen.availHeight;

// Declare references for the popup window.
var crLocatorWindow;

// Opens the in-store promotions detail page page.
function locator (lg) {
	// check if the popup is already opened.
	if (crLocatorWindow && !crLocatorWindow.closed) {
		crLocatorWindow.focus();
		return;
	}
	var w = 417;
	var h = 450;
	var x = 0;
	var y = 0;
	if (screen) {
		x = Math.round((aw - w) / 2);
		y = Math.round((ah - h) / 2);
	}
	var url = "http://www.lcbo.com/promo/cocktail_remix/tasting_locator/" + lg + "/local.html";
	var params = "width="+w+",height="+h+",top="+y+",left="+x+",";
		params += "menubar=no,resizable=no,location=no,scrollbars=yes";
	var crLocatorWindow = window.open(url, "cr_locator", params);
	crLocatorWindow.focus();
}