﻿/*
swfLocation is the div id where flash is placed
swfSrc is the path from page to swf file
swfName is just a name identifier
swfH = height
swfW = width
swfVer = minimum flash version
swfBg = background color

isFlash is a boolean from the custom.js file that looks for flash=false as a back door to turn off flash
*/

function displayFlash(swfLocation, swfSrc, swfName, swfH, swfW, swfVer, swfBg) {
	var so = new SWFObject(swfSrc, swfName, swfH, swfW, swfVer, swfBg);
    so.addParam("wmode","transparent");
    //so.addParam("allowScriptAccess", "always");
    if (isFlash) {
        so.write(swfLocation);
    }
}
/*
generic write flash to any div using swfLocation
*/
function displayFlash2(swfLocation, swfSrc, swfName, swfW, swfH, swfVer, swfBg) {
	var so = new SWFObject(swfSrc, swfName, swfW, swfH, swfVer, swfBg);
    so.addParam("allowScriptAccess", "always");
    if (isFlash) {
        so.write(swfLocation);
    }
}
/*
generic write flash to div any div using swfLocation + pass variable name=value for addVariable
*/
function displayFlash3(swfLocation, swfSrc, swfName, swfW, swfH, swfVer, swfBg, swfVarName, swfVarValue) {
	var so = new SWFObject(swfSrc, swfName, swfW, swfH, swfVer, swfBg);
    so.addParam("allowScriptAccess", "always");
    so.addVariable(swfVarName, swfVarValue);
    if (isFlash) {
        so.write(swfLocation);
    }
}
