function FixFlash(flashObject)
{
    if(flashObject != null)
    {
         if(flashObject.outerHTML)
         {    
            if(flashObject.data)
            {     
                flashObject.removeAttribute('data');
            }   
            var theParams = flashObject.getElementsByTagName("param");
            var theParamsLength = theParams.length;
            for (var j = 0; j < theParamsLength; j++)
            {
                  if(theParams[j].name.toLowerCase() == 'flashvars')
                  {
                      var theFlashVars = theParams[j].value;    
                        
                  }
            }
            var theOuterHTML = flashObject.outerHTML;
            var re = /<param name="FlashVars" value="">/ig;
            theOuterHTML = theOuterHTML.replace(re, "<param name='FlashVars' value='" + theFlashVars + "'>");
            flashObject.outerHTML = theOuterHTML;   
        }
    }
}