if(typeof initMovie_stream=="undefined") {
	
	function uid() {
		return ID = new Date().getTime();
	}
	/*
	var uid = (
		function(){
			var id=0;
			return function(){
				return id++ ;
			};
		}
	)();
*/
	function initMovie(filename, playrightaway, width, height, InsertLogo) {
		InsertLogo = typeof(InsertLogo) != 'undefined' ? InsertLogo : '';
		var uname = uid();
		var fpConf = "config={videoFile: '"+filename+"',showPlayList: false,baseURL: '',autoPlay: " + playrightaway + ",autoBuffering: true, startingBufferLength: 5,	bufferLength: 2, loop: false, hideControls: false, initialScale: 'orig'	}";	
		//window.onload = init(flowPlayer1, fpConf);

		var FlashMessage = '<BR><BR><B>No Flash Detected</B><BR>Please download the latest version by clicking below:<br><br><a href=http://www.macromedia.com/go/getflashplayer/><img src=/media/flash_button.gif border=0 alt=Get Flash></a><BR><BR>';
		document.write('<div id="movie_'+uname+'" style="background-color: #D1D1F0; width: ' + (width+60) + 'px; height: ' + (height+60) + 'px; z-index:101;">');
		document.write('<CENTER><div id="moviescreen_'+uname+'">'+FlashMessage+'</div>');
		document.write('<font face="Verdana,Arial" color="Black"></font>');
		document.write(InsertLogo);
		document.write('</CENTER></div>');
		Roundit('movie_'+uname);
		play("FlowPlayer_"+uname,'moviescreen_'+uname, width, height, fpConf);
		
	}
	
	function initMovie_stream(path, playrightaway, width, height, InsertLogo) {
		InsertLogo = typeof(InsertLogo) != 'undefined' ? InsertLogo : '';
		
		var uname = uid();
		var fpConf = "config={streamingServer: 'lighttpd', playList: [ {url:'/public/media/streamer.php"+path+"'}],showPlayList: false,baseURL: '',autoPlay: " + playrightaway + ",autoBuffering: true, startingBufferLength: 5, menuItems: [ 1, 1, 1, 1, 1, 1, 0 ],	bufferLength: 2, useNativeFullScreen: true, loop: false, hideControls: false, initialScale: 'orig'	}";	
		//window.onload = init(flowPlayer1, fpConf);
		var FlashMessage = '<BR><BR><B>No Flash Detected</B><BR>Please download the latest version by clicking below:<br><br><a href=http://www.macromedia.com/go/getflashplayer/><img src=/media/flash_button.gif border=0 alt=Get Flash></a><BR><BR>';
		document.write('<div class="OHT_Movie" id="movie_'+uname+'" style="padding: 5px; background-color: #D1D1F0; width: ' + (width+60) + 'px; height: ' + (height+40) + 'px; z-index:101; position: static; margin-right: auto;">');
		document.write('<CENTER><div id="moviescreen_'+uname+'">'+FlashMessage+'</div>');
		document.write('<font face="Verdana,Arial" color="Black"></font>');
		document.write(InsertLogo);
		document.write('</CENTER></div>');
		//Roundit('movie_'+uname);
		window.onload=function(){
			Nifty("div#movie_"+uname,"big fixed-height");
		}
		play_stream("FlowPlayer_"+uname,'moviescreen_'+uname, width, height, fpConf);
		
	}

	function init(flowid, fpConf) {
		var flowPlayer1;
		if (document.getElementById) {
			flowPlayer1 = document.getElementById(flowid);
	    }
		flowPlayer1.setConfig(fpConf);
	}

	function clipSelected(flowPlayer1, clipIndex) {
		flowPlayer1.ToClip(clipIndex);
	}

	function play(flowid, screendiv,width, height, fpConf) {
		var so = new SWFObject("/public/media/FlowPlayer.swf", flowid, width+40, height+20, "7", "#D1D1F0", true);
		so.addParam("flashVars", fpConf);
		so.addParam("WMode", "Transparent");
		so.write(screendiv);
	}
	
	function play_stream(flowid, screendiv,width, height, fpConf) {
		var so = new SWFObject("/public/media/FlowPlayernew.swf", flowid, width+40, height+20, "7", "#D1D1F0", true);
		so.addParam("flashVars", fpConf);
		so.addParam("WMode", "Transparent");
		so.addParam("allowFullScreen", "true");
		so.write(screendiv);
	}

	function Roundit(moviediv) {
		 /*settings = {
	      tl: { radius: 5 },
	      tr: { radius: 5 },
	      bl: { radius: 5 },
	      br: { radius: 5 },
	      antiAlias: true,
	      autoPad: true
	    }

	    var divObj = document.getElementById(moviediv);
	    var cornersObj = new curvyCorners(settings, divObj);
	    cornersObj.applyCornersToAll();
	*/

	}
	
	
}

