function xhtmlFlash( swf, width, height ) 
{	
  document.writeln('<object'); 
  document.writeln('classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ');
  document.writeln('width="' + width + '" ');
  document.writeln('height="' + height + '" ');
  document.writeln('bgcolor="#000000">');
  document.writeln('<param name="movie" value="' + swf + '">');
  document.writeln('<param name="menu" value="false">');
  document.writeln('<embed ');
  document.writeln('allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" '); 
  document.writeln('width="' + width + '" bgcolor="#000000" ');
  document.writeln('height="' + height + '" ');
  document.writeln('menu="false" ');
  document.writeln('src="' + swf + '">');
  document.writeln('</embed>');
  document.writeln('</object>');
}

function externaliseLinks() { 
	if (!document.getElementsByTagName) 
	{	
		return;
	}

	var anchors = document.getElementsByTagName("a"); 
	for ( var i=0; i<anchors.length; i++ ) 
	{ 
		var anchor = anchors[i]; 
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
		{
			anchor.target = "_blank"; 
		}
	} 
} 

window.onload = externaliseLinks;


function detectFlash() {
	var contentVersion = 6;
	var FlashCanPlay;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
			if (isNaN(parseInt(words[i])))
			continue;
			var PluginVersion = words[i]; 
	    }
	
		var FlashCanPlay = PluginVersion >= contentVersion;
	
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	&& (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('on error resume next \n');
		document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}
	
	return eval(FlashCanPlay);
}




