// JavaScript - Flash Page Header

function displayHeader(strHeader, strFontColor, strFont, intFontSize, strBGColor, intHeight, intWidth, strLocation) {
		
		// This script will test up to the following version.
		flash_versions = 20;
		
		// Initialize variables and arrays
		var flash = new Object();
		flash.installed=false;
		flash.version='0.0';
		
		// Dig through Netscape-compatible plug-ins first.
		if (navigator.plugins && navigator.plugins.length) {
			for (x=0; x < navigator.plugins.length; x++) {
				if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
					flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
					flash.installed = true;
					break;
				}
			}
		}
		
		// Then, dig through ActiveX-style plug-ins afterwords
		else if (window.ActiveXObject) {
			for (x = 2; x <= flash_versions; x++) {
				try {
					oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
					if(oFlash) {
						flash.installed = true;
						flash.version = x + '.0';
					}
				}
				catch(e) {}
			}
		}
		
		// Create sniffing variables in the following style: flash.ver[x]
		flash.ver = Array();
		for(i = 4; i <= flash_versions; i++) {
			eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");
		}
		
		if (flash.ver[7] || flash.ver[8]) {
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n');
			document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"\n');
			document.write('width="' + intWidth + '"\n');
			document.write('height="' + intHeight + '"\n');
			document.write('id="pageHeader"\n');
			document.write('align="middle">\n');
			document.write('		<param name="allowScriptAccess" value="sameDomain" />\n');
			document.write('		<param name="movie" value="' + strLocation + 'pageHeader.swf?strHeader=' + strHeader + '&strFontColor=' + strFontColor + '&strFont=' + strFont + '&intFontSize=' + intFontSize + '&intHeight=' + intHeight + '&intWidth=' + intWidth + '"/>\n');
			document.write('		<param name="menu" value="false" />\n');
			document.write('		<param name="quality" value="high" />\n');
			document.write('		<param name="wmode" value="transparent" />\n');
			document.write('		<param name="scale" value="noscale" />\n');
			document.write('		<param name="salign" value="lt" />\n');
			document.write('		<param name="bgcolor" value="' + strBGColor + '" />\n');
			document.write('		<embed 	src="' + strLocation + 'pageHeader.swf?strHeader=' + strHeader + '&strFontColor=' + strFontColor + '&strFont=' + strFont + '&intFontSize=' + intFontSize + '&intHeight=' + intHeight + '&intWidth=' + intWidth + '"\n');
			document.write('				menu="false"\n');
			document.write('				quality="high"\n');
			document.write('				wmode="transparent"\n');
			document.write('				scale="noscale"\n');
			document.write('				salign="lt"\n');
			document.write('				bgcolor="' + strBGColor + '"\n');
			document.write('				width="' + intWidth + '"\n');
			document.write('				height="' + intHeight + '"\n');
			document.write('				name="pageHeader"\n');
			document.write('				align="middle"\n');
			document.write('				allowScriptAccess="sameDomain"\n');
			document.write('				type="application/x-shockwave-flash"\n');
			document.write('				pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
			document.write('</object>');
		} else {
			document.write(strHeader);
		}
}

function displayMod(strHeader, strImage, strColor, intHeight, intWidth, strLocation, strLink) {

    // This script will test up to the following version.
    flash_versions = 20;

    // Initialize variables and arrays
    var flash = new Object();
    flash.installed = false;
    flash.version = '0.0';

    // Dig through Netscape-compatible plug-ins first.
    if (navigator.plugins && navigator.plugins.length) {
        for (x = 0; x < navigator.plugins.length; x++) {
            if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
                flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
                flash.installed = true;
                break;
            }
        }
    }

    // Then, dig through ActiveX-style plug-ins afterwords
    else if (window.ActiveXObject) {
        for (x = 2; x <= flash_versions; x++) {
            try {
                oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
                if (oFlash) {
                    flash.installed = true;
                    flash.version = x + '.0';
                }
            }
            catch (e) { }
        }
    }

    // Create sniffing variables in the following style: flash.ver[x]
    flash.ver = Array();
    for (i = 4; i <= flash_versions; i++) {
        eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");
    }

    if (flash.ver[7] || flash.ver[8]) {
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n');
        document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"\n');
        document.write('width="' + intWidth + '"\n');
        document.write('height="' + intHeight + '"\n');
        document.write('id="pageHeader"\n');
        document.write('align="middle">\n');
        document.write('		<param name="allowScriptAccess" value="sameDomain" />\n');
        document.write('		<param name="movie" value="' + strLocation + 'HomePageMod.swf?strHeader=' + strHeader + '&strImage=' + strImage + '&strColor=' + strColor + '&intHeight=' + intHeight + '&intWidth=' + intWidth + '&strLink=' + strLink + '"/>\n');
        document.write('		<param name="menu" value="false" />\n');
        document.write('		<param name="quality" value="high" />\n');
        document.write('		<param name="wmode" value="transparent" />\n');
        document.write('		<param name="scale" value="noscale" />\n');
        document.write('		<param name="salign" value="lt" />\n');
        document.write('		<param name="bgcolor" value="0xffffff" />\n');
        document.write('		<embed 	src="' + strLocation + 'HomePageMod.swf?strHeader=' + strHeader + '&strImage=' + strImage + '&strColor=' + strColor + '&intHeight=' + intHeight + '&intWidth=' + intWidth + '&strLink=' + strLink + '"\n');
        document.write('				menu="false"\n');
        document.write('				quality="high"\n');
        document.write('				wmode="transparent"\n');
        document.write('				scale="noscale"\n');
        document.write('				salign="lt"\n');
        document.write('				bgcolor="0xffffff"\n');
        document.write('				width="' + intWidth + '"\n');
        document.write('				height="' + intHeight + '"\n');
        document.write('				name="pageMod"\n');
        document.write('				align="middle"\n');
        document.write('				allowScriptAccess="sameDomain"\n');
        document.write('				type="application/x-shockwave-flash"\n');
        document.write('				pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
        document.write('</object>');
    } else {
        document.write(strHeader);
    }
}