function SetCFCookie (name, value)
	{
	var name = name.toUpperCase();
	var path = "/";
	var now = new Date();
	now.setTime(now.getTime() + 1000 * 60 * 60 * 24 * 365);
	document.cookie = name + "=" + escape (value) +"; path=" + path + "; expires=" + now + ";";
	};
	
function GetCFCookie(name)
	{ 
	var cname = name.toUpperCase() + "="; //the cookie name is given an equal signs after it and assigned as cname
	var dc = document.cookie; //the main document.cookie code that will follow is assigned to dc
	var bl = "";
	if (dc.length > 0)
		{ //here the length of the cookie is checked, if it is above 0 the function continues and if not then it returns null
		begin = dc.indexOf(cname); //here the indexOf() method is used to find the location of the cookie's name and it is assigned to begin
		if (begin != -1)
			{ //if the cookie's name is not found in dc then begin is given a value of -1
			begin += cname.length; //if the name is found begin is increased by the length of the cname
			end = dc.indexOf(";", begin); //the indexOf() method now searches for a semicolon to be given to the variable end
			if (end == -1) end = dc.length; 
			return unescape(dc.substring(begin, end)); //here is where is made sure that the value of the cookie is extracted and returned using the substring() method on dc
			} 
		}
	return bl; 
	};
function popup(href,width,height,scroll,Name)
	{
	Name = window.open(href,Name,'resizable=no,toolbar=no,left=200,top=200,status=yes,location=no,height=' + height + ',width=' + width + ',scrollbars=' + scroll);
	};
