﻿ // function to display standard video player
 function setVideo(elementId, highPath, lowPath, startImagePath, endImagePath, webTrends){
    //Replace parameter values with placeholder masks for replacement in LoadPlaceHolderContent event.
    //var queryString = 'HighBandFLV=ProjAngelFood300K.flv&LowBandFLV=ProjAngelFood150K.flv&startImg=VideoWrapper.gif&startImgW=320&startImgH=240&startImgX=0&startImgY=0&startButtonX=110&startButtonY=140&endImg=VideoWrapper.gif&endImgW=320&endImgH=240&endImgX=0&endImgY=0&endButtonX=110&endButtonY=140';
    var queryString = 'paramSrc=qString&highBandFLV=' + highPath + '&lowBandFLV=' + lowPath + '&startImg=' + startImagePath + '&endImg=' + endImagePath + '&webTrendsVid=' + webTrends;
    queryString += '&trackPath=/Videos/Resources/&cuePrompt=Nothing&useCuePts=no&loaderStyle=1&loaderColor=CC0000&loaderText=Loading%20Video&vidBg=d4bf95&startBtn=yes&contrlSkin=/Videos/Resources/Skin_Pillsbury2.swf&contrlClrBase=B39464&contrlClrAccent1=836344&contrlClrAccent2=B39464&vidResize=no&bandCutoff=300&vidAutoPlayMute=yes&screenHeight=300&endclickTgt=&endclickTxt=Click';
    var hasRequiredVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    if(hasRequiredVersion) {  // if we've detected an acceptable version
        var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
        + 'width="320" height="300" id="X-Squad8" align="middle"> '
        + '<param name="allowScriptAccess" value="sameDomain" /> '
        + '<param name="movie" value="/Videos/Resources/2008VideoPlayerPillsbury.swf?'+queryString+'" /> '
        + '<param name="quality" value="high" /> '
        + '<param name="menu" value="false" /> '
        + '<param name="wmode" value="transparent" /> '
        + '<param name="bgcolor" value="#ffffff" /> '
        + '<embed src="/Videos/Resources/2008VideoPlayerPillsbury.swf?'+queryString+'" '
        + 'quality="high" '
        + 'wmode="transparent" '
        + 'bgcolor="#ffffff" '
        + 'width="320" '
        + 'height="300" '
        + 'name="X-Squad8" '
        + 'align="middle" '
        + 'allowScriptAccess="sameDomain" '
        + 'type="application/x-shockwave-flash" '
        + 'pluginspage="http://www.macromedia.com/go/getflashplayer" />'
        +  '</object>';
        document.getElementById(elementId).innerHTML = oeTags;
        //DocumentWriter(oeTags);   // embed the flash movie
    } else {  // flash is too old or we can't detect the plugin
        var alternateContent = '<a href="http://www.macromedia.com/go/getflash/" target="_blank">'
        + '<img src="/Videos/Resources/Detect.gif" border="0" width="280" height="167" vspace="30" hspace="20"><\/a>'
        + '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
        + 'width="1" height="1" id="X-Squad8" align="middle"> '
        + '<param name="allowScriptAccess" value="sameDomain" /> '
        + '<param name="movie" value="/Videos/Resources/install.swf" /> '
        + '<param name="quality" value="high" /> '
        + '<param name="menu" value="false" /> '
        + '<param name="wmode" value="transparent" /> '
        + '<param name="bgcolor" value="#ffffff" /> '
        + '<embed src="install.swf" '
        + 'quality="high" '
        + 'wmode="transparent" '
        + 'bgcolor="#ffffff" '
        + 'width="1" '
        + 'height="1" '
        + 'name="X-Squad8" '
        + 'align="middle" '
        + 'allowScriptAccess="sameDomain" '
        + 'type="application/x-shockwave-flash" '
        + 'pluginspage="http://www.macromedia.com/go/getflashplayer" />'
        +  '</object>';
        document.getElementById(elementId).innerHTML = alternateContent;
        //DocumentWriter(alternateContent);  // insert non-flash content
    }
}

// function to display product pages video player
 function setProductsVideo(elementId, highPath, lowPath, startImagePath, endImagePath, webTrends){
    //Replace parameter values with placeholder masks for replacement in LoadPlaceHolderContent event.
    //var queryString = 'HighBandFLV=ProjAngelFood300K.flv&LowBandFLV=ProjAngelFood150K.flv&startImg=VideoWrapper.gif&startImgW=320&startImgH=240&startImgX=0&startImgY=0&startButtonX=110&startButtonY=140&endImg=VideoWrapper.gif&endImgW=320&endImgH=240&endImgX=0&endImgY=0&endButtonX=110&endButtonY=140';
    var queryString = 'paramSrc=qString&highBandFLV=' + highPath + '&lowBandFLV=' + lowPath + '&startImg=' + startImagePath + '&endImg=' + endImagePath + '&webTrendsVid=' + webTrends;
    queryString += '&trackPath=/Videos/Resources/&cuePrompt=Nothing&useCuePts=no&loaderStyle=1&loaderColor=CC0000&loaderText=Loading%20Video&vidBg=d4bf95&startBtn=yes&contrlSkin=/Videos/Resources/Skin_Pillsbury2.swf&contrlClrBase=B39464&contrlClrAccent1=836344&contrlClrAccent2=B39464&vidResize=no&bandCutoff=300&vidAutoPlayMute=yes&screenHeight=300&endclickTgt=&endclickTxt=Click';
    var hasRequiredVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    if(hasRequiredVersion) {  // if we've detected an acceptable version
        var oeTags = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
        + 'width="320" height="300" id="X-Squad8" align="middle"> '
        + '<param name="allowScriptAccess" value="sameDomain" /> '
        + '<param name="movie" value="/Videos/Resources/2008VideoPlayerPillsbury.swf?'+queryString+'" /> '
        + '<param name="quality" value="high" /> '
        + '<param name="menu" value="false" /> '
        + '<param name="wmode" value="transparent" /> '
        + '<param name="bgcolor" value="#ffffff" /> '
        + '<embed src="/Videos/Resources/2008VideoPlayerPillsbury.swf?'+queryString+'" '
        + 'quality="high" '
        + 'wmode="transparent" '
        + 'bgcolor="#ffffff" '
        + 'width="320" '
        + 'height="300" '
        + 'name="X-Squad8" '
        + 'align="middle" '
        + 'allowScriptAccess="sameDomain" '
        + 'type="application/x-shockwave-flash" '
        + 'pluginspage="http://www.macromedia.com/go/getflashplayer" />'
        +  '</object>';
        document.getElementById(elementId).innerHTML = oeTags;
        //DocumentWriter(oeTags);   // embed the flash movie
    } else {  // flash is too old or we can't detect the plugin
        var alternateContent = '<a href="http://www.macromedia.com/go/getflash/" target="_blank">'
        + '<img src="/Videos/Resources/Detect.gif" border="0" width="280" height="167" vspace="30" hspace="20"><\/a>'
        + '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
        + 'width="1" height="1" id="X-Squad8" align="middle"> '
        + '<param name="allowScriptAccess" value="sameDomain" /> '
        + '<param name="movie" value="/Videos/Resources/install.swf" /> '
        + '<param name="quality" value="high" /> '
        + '<param name="menu" value="false" /> '
        + '<param name="wmode" value="transparent" /> '
        + '<param name="bgcolor" value="#ffffff" /> '
        + '<embed src="install.swf" '
        + 'quality="high" '
        + 'wmode="transparent" '
        + 'bgcolor="#ffffff" '
        + 'width="1" '
        + 'height="1" '
        + 'name="X-Squad8" '
        + 'align="middle" '
        + 'allowScriptAccess="sameDomain" '
        + 'type="application/x-shockwave-flash" '
        + 'pluginspage="http://www.macromedia.com/go/getflashplayer" />'
        +  '</object>';
        document.getElementById(elementId).innerHTML = alternateContent;
        //DocumentWriter(alternateContent);  // insert non-flash content
    }
}
