function createLocationCookies() {
	var usercurrencyid = getCookie("usercurrencyid");

	var pageURL = window.location.pathname;
	var pageName = pageURL.substring(pageURL.lastIndexOf('/') + 1);

	if(usercurrencyid == null || !isInteger(usercurrencyid)) {
		var url = 'create-location-cookie.aspx';
		makeRequest(url);
	}
}

function createLocationCookies2() {
	var usercurrencyid = getCookie("usercurrencyid");

	if(usercurrencyid == null) {
		var url = 'create-location-cookie.aspx';
		makeRequest(url);
	}
}

function isInteger(s) {
	return (s.toString().search(/^-?[0-9]+$/) == 0);
}

function makeRequest(url) {
	var httpRequest;

    if (window.XMLHttpRequest) { // Mozilla, Safari, ...
        httpRequest = new XMLHttpRequest();
        if (httpRequest.overrideMimeType) {
            httpRequest.overrideMimeType('text/xml');
            // See note below about this line
		}
	} 
    else if (window.ActiveXObject) { // IE
        try {
            httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
        } 
        catch (e) {
            try {
                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} 
            catch (e) {}
        }
    }
	if (!httpRequest) {
        alert('Giving up :( Cannot create an XMLHTTP instance');
        return false;
	}

	//httpRequest.onreadystatechange = function() { alertContents(httpRequest); };
    httpRequest.open('GET', url, true);
    httpRequest.send(null);
}