

				var startNumber;
				var currentState;
				var playingFlag=false;

				function sendEvent(typ,prm) { 
					
					thisMovie("playlist").sendEvent(typ,prm); 
					
				};

				function getUpdate(typ,pr1,pr2,pid) {
				
					if(pid != "null") {
					
						if((typ == "state")&&(pr1 != undefined)) { 
						
							currentState = pr1; 
							
							if((currentState=="0")&&( ! playingFlag)) {
											
								playingFlag = true;
								sendEvent('playitem',  startNumber); 					
							}
						}
					}
				};

				function thisMovie(movieName) {
				
					if(navigator.appName.indexOf("Microsoft") != -1) {
					
						return window[movieName];
						
					} else {
					
						return document[movieName];
					}
				};			

				function createPlayer(arg) {
				
				
					var ua = window.navigator.userAgent;
					var msie = ua.indexOf("MSIE ");
					var s2; 
					
					startNumber=arg;

						if ( msie > 0 ) {
						
							// Internet Explorer
							s2 = new SWFObject("flash/flvplayer.swf","playlist","570","800","8","#414141");
							
							// // Only explicitly set width and height for Internet Explorer
							s2.addVariable("width","570");
							s2.addVariable("height","800");
												
							s2.addVariable("displayheight","450");
						
						}
						
						else {
						
							// Not Internet Explorer
							s2 = new SWFObject("flash/flvplayer.swf","playlist","570","800","8");
							
							s2.addVariable("displayheight","450");
							
						}
						
						s2.addVariable("file","includes/playlist_model.xml");
						s2.addVariable("enablejs","true");
						s2.addVariable("javascriptid","playlist");
						s2.addVariable("logo", "qimages/copy_videos.gif" );
						s2.addParam("allowfullscreen","true");
						s2.addVariable("shuffle","false");
						s2.addVariable("thumbsinplaylist","true");				
						s2.addVariable("showdownload","true");
						s2.addVariable("backcolor","0x414141");
						s2.addVariable("frontcolor","0xf9bc26");
						s2.addVariable("lightcolor","0xffd778");
						s2.write("player2");
					
				};
