//JS File

function replaceFirstFLV(elementName, pluginsPath, filepath, linkPath,fullscreen,width,height,autostart,repeat,iurl,showdownload,showdigit,shownavigation,alignment,float1,firstTime)
{
    var needChange = true;
    var div1E = document.getElementById("single");
    if (firstTime != "true" && div1E)
    {
        var flashVarsValue = div1E.getAttribute("flashvars");
        if (flashVarsValue != null && flashVarsValue.length > 0)
        {
            var arrayString = flashVarsValue.split("&file=");
            if (arrayString.length >= 2)
            {
                var newValue = arrayString[0];
                newValue = newValue + '&file=' + filepath + '&repeat=';
                
                var restString = arrayString[1];
                var newArray = restString.split("&repeat=");
                if (newArray.length >=2)
                {
                    var restString1 = newArray[1];
                    var newArray1 = restString1.split("&link=");
                    if (newArray1.length >= 2)
                    {
                        newValue = newValue + newArray1[0] + '&link=' + linkPath;
                        var restString2 = newArray1[1];
                        var newArray2 = restString2.split("&showdigits=");
                        if (newArray2.length >= 2)
                        {
                            newValue = newValue + '&showdigits=' + newArray2[1];
                            div1E.setAttribute('flashvars', newValue);
                            var innerHTML = div1E.parentNode.parentNode.innerHTML;
                            document.getElementById(elementName).innerHTML = innerHTML;                            
                            needChange = false;                            
                        }
                    }
                }
            }
        }
    }
    if (needChange)
    {
    
        var inHTML ='<div id="Div1" style="'+alignment+float1+'"><embed type="application/x-shockwave-flash" src="' + pluginsPath + '" style="" id="single" name="single" quality="high" allowfullscreen='+fullscreen+' flashvars="width='+width+'&amp;height='+height+'&amp;autostart='+autostart+'&amp;file=' + filepath + '&amp;repeat='+repeat+'&amp;image='+iurl+';showdownload='+showdownload+'&amp;link=' + linkPath + '&amp;showdigits='+showdigit+'&amp;shownavigation='+shownavigation+'" width="'+width+'" height="'+height+'"></div>';
        document.getElementById(elementName).innerHTML = inHTML;
    }
}