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/movie03.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 56634.00 points!', 
'http://www.fundingfactory.com/resources/widget/movie09.swf?param1=We have collected 766 cell phones', 
'http://www.fundingfactory.com/resources/widget/movie13.swf?param1=Bring in your empty printer cartridges and used cell phone to: OLM School, 1400 E. 27th St,, Merced', 
'http://www.fundingfactory.com/resources/widget/movie14.swf?param1=We have collected 9261 inkjet printer cartridges', 
'http://www.fundingfactory.com/resources/widget/movie15.swf', 
'http://www.fundingfactory.com/resources/widget/movie17.swf?param1=We have collected 7406 laser printer cartridges', 
'http://www.fundingfactory.com/resources/widget/movie18.swf', 
'http://www.fundingfactory.com/resources/widget/movie20.swf');
var myMoviesLength = new Array(8000, 10000, 15875, 7500, 15000, 7500, 2900, 4100, 3300, 7900, 3400, 10000, 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);
}