/**
* XML Flash Slideshow v3: Slideshow embed script
*
* This software is (c) 2006 DWUser.com
* http://www.dwuser.com/ 
*/
function LoadSlideShow(fileLoc, xmlDoc, container, height, width) {
    // <![CDATA[
    $(document).ready(
        function() {
            XMLFlashSlideshow
            ({
                id: container,
                swf: fileLoc,
                w: width,
                h: height,
                redirect: '',
                usePreloader: 'true',
                xml: xmlDoc,
                preventCache: 'true',
                disableMultipleXML: 'false',
                initXML: '%3C?xml%20version=%221.0%22%20encoding=%22utf-8%22?%3E%3Cslideshow%20version=%223%22%3E%0A%20%20%3Cstyles%3E%0A%20%20%20%20%3CPreloader%20label=%22Loading%20%7BN%7D%2525%22%20iconColor=%22#666666%22%20iconAlpha=%2270%22%20iconWidth=%2250%22/%3E%0A%20%20%20%20%3CPreloaderLabel%20font=%22Verdana%22%20size=%2210%22%20color=%22#666666%22%20bold=%22false%22/%3E%0A%20%20%20%20%3CBackground%20backgroundColor=%22#E4E4E4%22%20backgroundAlpha=%22100%22%20bevelColor=%22#FFFFFF%22%20bevelStrength=%2270%22%20borderWidth=%220%22%20borderColor=%22#FF6600%22/%3E%0A%20%20%20%20%3CLoaderAnimation%20type=%22circle%22%20color=%22#FFFFFF%22%20alphaBackground=%2220%22%20alphaInner=%2240%22%20frameWidth=%222%22%20width=%2250%22%20height=%2250%22/%3E%0A%20%20%20%20%3CDataLoader%20useAnimation=%22true%22%20useLabel=%22true%22%20labelPlacement=%22bottom%22%20fadeOutDuration=%22400%22%20textFormat=%22loader_text%22/%3E%0A%20%20%3C/styles%3E%0A%20%20%3Clocalization%3E%0A%20%20%20%20%3Ctext%20orig=%22Loading%20Data...%22%20local=%22Loading%20Data...%22/%3E%0A%20%20%3C/localization%3E%0A%20%20%3Cfonts%3E%0A%20%20%20%20%3Cfont%20id=%22loader_text%22%20name=%22Pixelade%22%20embed=%22true%22%20size=%2213%22%20color=%22#666666%22%20bold=%22false%22%20selectable=%22false%22%20align=%22left%22/%3E%0A%20%20%3C/fonts%3E%0A%3C/slideshow%3E'
            });
        }
    );
    // ]]>
}
XMLFlashSlideshow = function(p) {
    if (p.id == undefined)
        return;
    var ContainerMarkup = "<a href=\"http://www.adobe.com/go/getflashplayer/\" target=\"_blank\">You need to upgrade or install the Flash Player to view this content.<br />Click here to be redirected to the download page.</a>";
    try {
        if ($.flash != undefined && $.flash.available) {
            ContainerMarkup = $.flash.create({
                swf: p.swf,
                params: {
                    menu: "false",
                    wmode: "transparent"
                },
                flashvars: {
                    wmode: 'transparent',
                    usePreloader: p.usePreloader,
                    xml: encodeURI(p.xml),
                    preventCache: p.preventCache,
                    disableMultipleXML: p.disableMultipleXML,
                    initXML: p.initXML
                },
                width: p.w,
                height: p.h
            });
        }
    } catch (e) {
        //nothing
    } finally {
        $("#" + p.id).html(ContainerMarkup);
    }
}
