var currentState;

function getUpdate(typ,pr1,pr2,pid) {
	if(pid != "null") {
		if((typ == "state")&&(pr1 != undefined)) { 
			currentState = pr1; 
			if(currentState=="3") { 
			if(clip==aantal) { document.location.href=video[1]+".php"; }
			else {document.location.href=video[clip+1]+".php"; }
			}
		}
	}
};


function createPlayer() {
	var s = new SWFObject("mediaplayer.swf","thePlayerId","360","288","7");
	s.addParam("allowscriptaccess","always")
	s.addParam("allowfullscreen","true");
	s.addVariable("displayclick","none");
	s.addVariable("overstretch","fit");
	s.addVariable("showicons","false");
	s.addVariable("autostart","true");
	s.addVariable("backcolor","0x6B613D");
	s.addVariable("frontcolor","0xFFFFFF");
	s.addVariable("file",video[clip]+".flv");
	s.addVariable("width","360");
	s.addVariable("height","288");
	s.addVariable("displayheight","268");
	s.addVariable("enablejs","true");
	s.addVariable("javascriptid","thePlayerId");
	s.write("placeholder");
}
