function LInternationalUpdater(iDomainRoot, iIsHome)
{
	this.mInvokedOnHomePage = iIsHome;
	this.mDomainRoot = iDomainRoot;
}

LInternationalUpdater.prototype.storeIntl = function (iCOUID, iLang, iCurrency)
{
	var url = this.mDomainRoot + '/account/callbacks/update_intl_pref.php';
	var params = {'fCOUID' : iCOUID, 'fLang' : iLang, 'fCurrency' : iCurrency};

	try {
		var req = MochiKit.Async.getXMLHttpRequest();
		req.open("POST", url, true);
		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		req.setRequestHeader('Accept', 'application/json');
		var d = MochiKit.Async.sendXMLHttpRequest(req, queryString(params));
		d.addCallback(bind(this.updatePage, this));
	} catch (ex) {
		params.fRedirect = window.location;
		window.location = url + '?' + queryString(params);
	}
}

LInternationalUpdater.prototype.updatePage = function (transport) {
	response = evalJSON(transport.responseText);

	if (response.ok == 1) {
		if ( this.mInvokedOnHomePage ) {
			window.location = this.mDomainRoot;
		} else {
			window.location.reload(true);
		}
	} else {
		$('fIntlUpdate').innerHTML = response.message;
	}
}
