var counter = 1;

function insertSWF(elem, filename, w, h, p) {
	// check the supplied element exists
	if (getElement(elem)) {
		// dynamic variable to hold UFO object
		window['FO' + counter] = { movie:"/Assets/Animations/" + filename + ".swf", width: w, height: h, majorversion: "8", build: "0", menu: "false" };
		
		// now create the UFO based on the dynamic variable object
		UFO.create(window['FO' + counter], elem);
		
		if (p !== '') {
			getElement(elem).style.paddingLeft = (p + 'px');
		}
	}
	
	counter++;
}