var MM_contentVersion = 6;
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 MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_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('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}


function newwindow(w,h,webaddress) {
var viewimageWin = window.open(webaddress,'New_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+w+',height='+h);
//viewimageWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
}


function insertflash(version, name, width, height, bgcolor, quality, menu, section, flashvars){
	flashvars = flashvars!=null ? flashvars : '';

if ( MM_FlashCanPlay ) {
	var swf = '';
		swf += '<object';
		swf += ' width="'+width+'"';
		swf += ' height="'+height+'"';
		swf += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
		swf += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+',0,0,0">';
		swf += '<param name="movie" value="'+name+'">';
		swf += '<param name="FlashVars" value="'+flashvars+'">'
		swf += '<param name="wmode" value="transparent">';
		swf += '<param name="bgcolor" value="'+bgcolor+'">';
		swf += '<param name="quality" value="'+quality+'">';
		swf += '<param name="menu" value="'+menu+'">';
			swf += '<embed src="'+name+'"';
			swf += ' Flashvars="'+flashvars+'"';
			swf += ' width="'+width+'"';
			swf += ' height="'+height+'"';
			swf += ' wmode="transparent"';
			swf += ' bgcolor="'+bgcolor+'"';
			swf += ' quality="'+quality+'"';
			swf += ' menu="'+menu+'"';
			swf += ' type="application/x-shockwave-flash"';
			swf += ' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
			swf += '<\/embed>';
		swf += '<\/object>';
		document.write(swf);
} else {
	var alternative = '';
	
	switch (section) {
			case "home": 		alternative += '<img src="/images/sponsorbar.gif" width="420" height="76" alt="flash animation" />'; break;
         } // end switch
         
	document.write(alternative);
			
}
}


