
function getDistributor () {

	var allCookies = document.cookie;
	var cookieName = "DisCookie"; //Look in the PHP include file to find the name of the distributor cookie

	var pos = allCookies.indexOf(cookieName + "=");
	var distributor = "none"; //Initialize the distributor variable to zero.

	//They haven't set a distributor
	if (pos != -1)
	{
		var start = cookieName.length + 1; //The '+1' is for the equal sign
		var end = allCookies.indexOf(";", start);
		if (end == -1)
		{
			end = allCookies.length;
		}

		distributor = allCookies.substring(start, end);
		distributor = unescape(distributor);

	}
	return distributor; //Return the value of the distributor cookie
}