function insertFlash(filename)
{
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	var content = '';
	if(hasRightVersion)
	{  // if we've detected an acceptable version
   	content = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
	   + 'width="785" height="190"'
   	+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		+ '<param name="movie" value="/bilder/sidhuvud/' + filename + '.swf" /><param name="quality" value="high" />'
	   + '<embed src="/bilder/sidhuvud/' + filename + '.swf" quality="high" '
   	+ 'width="785" height="190" name="Promtech" align="middle"'
	   + 'play="true"'
   	+ 'loop="false"'
	   + 'quality="high"'
   	+ 'allowScriptAccess="sameDomain"'
	   + 'type="application/x-shockwave-flash"'
   	+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
	   + '<\/embed>'
   	+ '<\/object>';
	}
	else
	{  // flash is too old or we can't detect the plugin
	   content = '<img src="/bilder/sidhuvud/' + filename + '.jpg" />';
   	document.write(alternateContent);  // insert non-flash content
	}
	document.write('<div id="pagehead">' + content + '</div>');
}

function activate()
{
	theObjects = document.getElementsByTagName("object");
	for (var i = 0; i < theObjects.length; i++) {
	theObjects[i].outerHTML = theObjects[i].outerHTML;
	}
}
