loadJS("http://www.fundingfactory.com/resources/widget/JScript.js");
loadJS("http://www.fundingfactory.com/resources/widget/AC_RunActiveContent.js");

document.write("<a href='http://www.fundingfactory.com' alt='Funding Factory: the fundraiser for raising funds by recycling inkjet cartridges, laser cartridges, and cell phones'></a><div id='movies'></div>");

var myMovies = new Array('http://www.fundingfactory.com/resources/widget/movie01.swf?param1=We are recycling empty printer cartridges and used cell phones&param2=Help us in our recycling efforts', 'http://www.fundingfactory.com/resources/widget/movie02.swf', 
'http://www.fundingfactory.com/resources/widget/movie04.swf', 
'http://www.fundingfactory.com/resources/widget/movie05.swf', 
'http://www.fundingfactory.com/resources/widget/movie07.swf?param1=We have earned a total of 272.00 points!', 
'http://www.fundingfactory.com/resources/widget/movie10.swf?param1=We have collected 0 cartridges and cell phones since we started with the FundingFactory recycling program.', 
'http://www.fundingfactory.com/resources/widget/movie15.swf', 
'http://www.fundingfactory.com/resources/widget/movie20.swf');
var myMoviesLength = new Array(8000, 10000, 7500, 15000, 7500, 5000, 7900, 4600);
var j = 0;

setTimeout('runMovies()', 500);

function runMovies() {
    var i = 0;
    var running_length = 1;
    
    while (i < myMovies.length) {
        setTimeout('loadMovie("' + myMovies[i] + '");', running_length);
        running_length += myMoviesLength[i];
        i++;
    }
    
    if (j == 0)
    {
		j++;
	    setTimeout("runMovies();", running_length);
	}
}

function loadMovie(movie) {
    FlashReplace.replace('movies', movie, 'movie1', 198, 240);
}

function loadJS(filename) {
	var fileref = document.createElement('script');
	fileref.setAttribute("type", "text/javascript");
	fileref.setAttribute("src", filename);
	document.getElementsByTagName("head")[0].appendChild(fileref);
}