//This document is used to handle embeding of FLASH objects into the welcome page
//This is done dynamically to fix issues caused by updates to IE

function new_embedObject(objectPath,height,width, szBackgroundColor, szCssClass)
{

document.write ('<OBJECT id="ShockwaveFlash1" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
document.write (' height="' + height +'" width="' + width + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>');
document.write (' <PARAM NAME="_cx" VALUE="12700"><PARAM NAME="_cy" VALUE="8361"><PARAM NAME="FlashVars" VALUE="">');
document.write (' <PARAM NAME="Movie" VALUE="' + objectPath + '">');
document.write (' <PARAM NAME="Src" VALUE="' + objectPath + '">');
document.write (' <PARAM NAME="WMode" VALUE="opaque"><PARAM NAME="Play" VALUE="-1"><PARAM NAME="Loop" VALUE="-1">');
document.write (' <PARAM NAME="Quality" VALUE="High"><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE="">');
document.write (' <PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0">');
document.write (' <PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE="' + szBackgroundColor + '">');
document.write (' <PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1">');
document.write (' <PARAM NAME="Profile" VALUE="0"><PARAM NAME="ProfileAddress" VALUE=""><PARAM NAME="ProfilePort" VALUE="0">');
document.write (' <embed class="' + szCssClass + '" src="' + objectPath + '" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer"');
document.write (' type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed></OBJECT>');
}

function setOrderFlag(szOrderFlag)
{
    var szIds=szOrderFlag.split(",");
    if(szIds.length>0)
    {
        for(var i=szIds.length-1;i>=0;i--)
        {
             var obj=document.getElementById(szIds[i]);
             if(obj!=null)
             {
                if(obj.parentNode.firstChild!=null)
                {
                    obj.parentNode.insertBefore(obj,obj.parentNode.firstChild);
                }
                else
                {
                    obj.parentNode.appendChild(obj);
                }
                
             }
        }  
    }   
} 