﻿/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
these are generic functions that pass data to
the swfobject library to write flash modules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
generic write flash to div id=flashcontent
*/
function displayFlash(swfSrc, swfName, swfW, swfH, swfVer, swfBg) {
	var so = new SWFObject("media/" + swfSrc, swfName, swfW, swfH, swfVer, swfBg);
    so.addParam("allowScriptAccess", "always");
    if (isFlash) {
        so.write("flashcontent");
    }
}
/*
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);
    }
}
