// this function is caught by the JavascriptView object of the player.
function sendEvent(typ,prm) { thisMovie("playerID").sendEvent(typ,prm); };


// These functions are caught by the feeder object of the player.
function loadFile(obj) { thisMovie("playerID").loadFile(obj); };

function addItem(obj,idx) { thisMovie("playerID").addItem(obj,idx); };

function removeItem(idx) { thisMovie("playerID").removeItem(idx); };

function getLength(swf) { return(thisMovie(swf).getLength()); };


// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};


// This creates the player after the page has finished loading (onload).
function createPlayer() {
	var s1 = new SWFObject("site/imagerotator.swf","playerID","780","444","8");
	s1.addParam("allowscriptaccess","always");

	s1.addVariable("file","site/photos.xml");
	s1.addVariable("shownavigation","false");
	s1.addVariable('transition','fade');
	s1.addVariable("shuffle","false");
	s1.addVariable("linktarget","_self");
	s1.addVariable("screencolor","0x000000");

	s1.addVariable("enablejs","true");
	s1.addVariable("javascriptid","playerID");

	s1.addVariable("width","780");
	s1.addVariable("height","444");

	s1.write("content");
};