	var imgID = 1;
	var imgSet = 'band';
	var bandtext = 'The Fray continue their UK domination with the stunning new single &quot;All At Once&quot;, released digitally on September 24th. The new single follows a triumphant 2007 which saw the smash hit &quot;How To Save A Life&quot; remain in the Top 10 for 9 consecutive weeks. Be sure to check the boys out life at their upcoming UK tour.';
	var citytext = 'Vast and vibrant, London is bound to excite. Enjoy the sites of the South Bank, the culture of the west end and the eclectic music offerings of Camden Town.';
	function preload() {
		imga1 = new Image();
		imga1.src = 'images/rotatorband1.png';
		imga2 = new Image();
		imga2.src = 'images/rotatorband2.png';
		imga3 = new Image();
		imga3.src = 'images/rotatorband3.png';
		imga4 = new Image();
		imga4.src = 'images/rotatorband4.png';
		imga5 = new Image();
		imga5.src = 'images/rotatorband5.png';
		imga6 = new Image();
		imga6.src = 'images/rotatorband6.png';
		imgb1 = new Image();
		imgb1.src = 'images/polaroidband1.jpg';
		imgb2 = new Image();
		imgb2.src = 'images/polaroidband2.jpg';
		imgb3 = new Image();
		imgb3.src = 'images/polaroidband3.jpg';
		imgb4 = new Image();
		imgb4.src = 'images/polaroidband4.jpg';
		imgb5 = new Image();
		imgb5.src = 'images/polaroidband5.jpg';
		imgb6 = new Image();
		imgb6.src = 'images/polaroidband6.jpg';
		imgc1 = new Image();
		imgc1.src = 'images/rotatorcity1.png';
		imgc2 = new Image();
		imgc2.src = 'images/rotatorcity2.png';
		imgc3 = new Image();
		imgc3.src = 'images/rotatorcity3.png';
		imgc4 = new Image();
		imgc4.src = 'images/rotatorcity4.png';
		imgc5 = new Image();
		imgc5.src = 'images/rotatorcity5.png';
		imgc6 = new Image();
		imgc6.src = 'images/rotatorcity6.png';
		imgd1 = new Image();
		imgd1.src = 'images/polaroidcity1.jpg';
		imgd2 = new Image();
		imgd2.src = 'images/polaroidcity2.jpg';
		imgd3 = new Image();
		imgd3.src = 'images/polaroidcity3.jpg';
		imgd4 = new Image();
		imgd4.src = 'images/polaroidcity4.jpg';
		imgd5 = new Image();
		imgd5.src = 'images/polaroidcity5.jpg';
		imgd6 = new Image();
		imgd6.src = 'images/polaroidcity6.jpg';
	}
	function imagenext() {
		imgID++;
		if( imgID == 7 )
			imgID = 1;
		redraw();
	}
	function imageprev() {
		imgID--;
		if( imgID == 0 )
			imgID = 6;
		redraw();
	}
	function imageset( set ) {
		imgSet = set;
		document.getElementById("ilinka").src = 'images/ilink' + imgSet + 'a.gif';		
		document.getElementById("ilinkb").src = 'images/ilink' + imgSet + 'b.gif';	
		if( set == 'city' )
			document.getElementById("polaroid-text").innerHTML = citytext;
		else
			document.getElementById("polaroid-text").innerHTML = bandtext;
		redraw();
	}
	function redraw() {
		document.getElementById("rotatorImg").src = 'images/rotator' + imgSet + imgID + '.png';
		document.getElementById("polaroidImg").src = 'images/polaroid' + imgSet + imgID + '.jpg';
	}
	function soundoff() {
		
	}
	function soundon() {
		sendEvent("volume",100);
	}
	function playpause() {
		
	}
		// some variables to save
	var currentPosition;
	var currentVolume;
	var currentItem;

	// these functions are caught by the JavascriptView object of the player.
	function sendEvent(typ,prm) { thisMovie("mpl").sendEvent(typ,prm); };
	function getUpdate(typ,pr1,pr2,pid) {
		if(typ == "time") { currentPosition = pr1; }
		else if(typ == "volume") { currentVolume = pr1; }
		else if(typ == "item") { currentItem = pr1; setTimeout("getItemData(currentItem)",100); }
		var id = document.getElementById(typ);
		id.innerHTML = typ+ ": "+Math.round(pr1);
		pr2 == undefined ? null: id.innerHTML += ", "+Math.round(pr2);

	};

	// These functions are caught by the feeder object of the player.
	function loadFile(obj) { thisMovie("mpl").loadFile(obj); };
	function addItem(obj,idx) { thisMovie("mpl").addItem(obj,idx); }
	function removeItem(idx) { thisMovie("mpl").removeItem(idx); }
	function getItemData(idx) {
		var obj = thisMovie("mpl").itemData(idx);
	};

	// 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];
		}
	};
