	function setCookie (name, value, expires, path, domain, secure) { 
		if (expires == null) {
			expires = new Date();
			expires.setTime(expires.getTime() +  (60 * 60 * 1000));
		}
		if (path == null) {
			path = "/";
		}
		document.cookie = name + "=" + escape (value) + 
			"; expires=" + expires.toGMTString() + 
			"; path=" + path + 
			((domain == null) ? "" : ("; domain=" + domain)) + 
			((secure == null) ? "" : "; secure");
	}
	
function getCookie(Name) {
	return unescape(getCookieValue(Name, document.cookie));
}

function getCookieValue(cookieName, input) {
	var reg = new RegExp(cookieName + "=([^;]*)");
	var result = reg.exec(input);
	if (result) {
		return result[1];
	} else {
		return null;
	}
}

function getRelativeLocation(fullUrl) {	
    var match = fullUrl.match(/http[s]?:\/\/[a-zA-Z0-9:\.]*/)[0];
    var startIndex =  match.length;
    var relLoc = fullUrl.substr(startIndex);
    return relLoc;
}

