var MM_contentVersion = 8;
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');
}

var flash = '<embed src="_flash/chartermain_1.1.swf" menu="false" quality="best" bgcolor="#000000" width="100%" height="100%" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
var flash_test = '<embed src="_flash/chartermain_1.1_tester.swf" menu="false" quality="best" bgcolor="#000000" width="100%" height="100%" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
var no_flash = '<div id="content_wrapper"><div id="content"><img src="_images/chartermain.jpg" alt="Chartermmain" height="60" width="500" />We\'re sorry, but our site requires version 8 of the Adobe Flash plug in. Please <a href="http://www.adobe.com/go/gntray_dl_getflashplayer" title="Download Flash 8 for free">download it</a> for free.<br /><br />If you need to reach us, give us a call at 615 399 3262 or <a href="mailto:info@chartermain.com" title="Send us an email">send us an email</a>.';
function writeFlash(div, tester) {
	var d = document;
	var e = d.getElementById(div);
	if (MM_FlashCanPlay) {
		if (!tester) {
			e.innerHTML = flash;
		} else {
			e.innerHTML = flash_test;
		}
	} else {
		e.innerHTML = no_flash;
	}
}