function AddFlashObjectToElement(element, name, url, flashVersion, height, width, alternativeContent)
{
	// Add values to the randomising element for the flash ads on the front page. This routine will need to
	// be changed if there is Flash input on any of the other pages.
	var flashAdFile1,flashAdFile2,flashAdFile3;
	flashAdFile1 = "ad";
	flashAdFile2 = Math.floor(Math.random()*7);
	flashAdFile3 = ".swf";
	url = "images/"+flashAdFile1+flashAdFile2+flashAdFile3;

	if (flashDetect() >= flashVersion)
	{
	var scriptStr = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+flashVersion+",0,0,0\" width=\""+width+"\" height=\""+height+"\" id=\""+name+"\"><param name=\"movie\" value=\""+url+"\"/> <param name=\"menu\" value=\"false\"/><param name=\"WMode\" value=\"transparent\"/> <param name=\"quality\" value=\"high\"/> <param name=\"bgcolor\" value=\"#FFFFFF\"/> <embed src=\"" + url + "\" menu=\"false\" quality=\"high\" bgcolor=\"#FFFFFF\" wmode=\"transparent\" width=\""+width+"\" height=\""+height+"\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed></object>";
	element.innerHTML = scriptStr;
	}
	else
	{
	element.innerHTML = alternativeContent;
	}
}
