// Gets value of "sourceid" cookie and displays on screen.
function displayExtension()
{
	var allCookies = document.cookie;
	var position = allCookies.indexOf("sourceid=");
	if(position != -1)
	{
		//"sourceid=" has 9  characters
		var start = position + 9; // start of cookie value
		var end = allCookies.indexOf(";",start); // end of cookie value
		if(end == -1) end = allCookies.length; // if last cookie in list (no ";" at end)
		var value = allCookies.substring(start,end); //extract the value
		document.write(value);
	}
	else //no "sourceid" cookie was set
	{
		document.write("W99"); //default extension should be displayed
	}
}