﻿function loadSlideshow(strPath, flashvars, numWidth, numHeight, minVersion, strAltContent, strAltImage) {
	if (document.getElementById('slideshow-container') != null) {
	    var so = new SWFObject(strPath, "swfSlideshow", numWidth, numHeight, minVersion, "#FFFFFF");
	    so.addParam("wmode", "transparent");
	    so.addParam("flashvars", flashvars);
		if (so.write("slideshow-container")) {
            // do nothing
		} else {
			loadSlideshowAlternateContent(numWidth, numHeight, strAltContent, strAltImage);
		}
	}	else {
		loadSlideshowAlternateContent(numWidth, numHeight, strAltContent, strAltImage);
	}
}

function loadSlideshowAlternateContent(numWidth, numHeight, strAltContent, strAltImage) {
	var swfBanner = document.getElementById('slideshow-container');
	var alternateContent = document.getElementById('slideshow-alternate-container');
	if(alternateContent != null)
	{
    alternateContent.style.width = numWidth;
    alternateContent.style.height = numHeight;
	}
    if (swfBanner != null && alternateContent != null) {
	    swfBanner.style.display = 'none';
	    if (alternateContent != null) {
            if (strAltImage != '')
                alternateContent.style.backgroundImage = 'url(' + strAltImage + ')';
            if (strAltContent != '')
                alternateContent.innerHTML = strAltContent;
		    alternateContent.style.display = '';
	    }
    }
}