

var flowPlayer1;
function init() {
	if (document.getElementById) {
		flowPlayer1 = document.getElementById("FlowPlayer");
    }
	setFlowPlayerConfig();
}

// wait for the page to fully load before initializing
window.onload = init;


function setFlowPlayerConfig() {
	flowPlayer1.setConfig(fpConf);
}

var fpConf = {
  	videoFile: filename,
	showPlayList: false,
	baseURL: '',
	autoPlay: playrightaway,
	autoBuffering: true,
	startingBufferLength: 5,
	bufferLength: 2,
	loop: false,
	hideControls: false,
	initialScale: 'orig'
}

function clipSelected(clipIndex) {
	flowPlayer1.ToClip(clipIndex);
}

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 style="background-color: #D1D1F0; width: ' + (width+60) + 'px; height: ' + (height+60) + 'px; z-index:101;">');
document.write('<CENTER><div id=moviescreen>'+FlashMessage+'</div>');
document.write('<font face="Verdana,Arial" color="Black">     </font>');
document.write('</CENTER></div>');
Roundit();
play();

function play() {
	var so = new SWFObject("/public/media/FlowPlayer.swf", "FlowPlayer", width+40, height+20, "7", "#D1D1F0", true);
	so.addParam("flashVars", "config={configInject: true}");
	so.write("moviescreen");


}

function Roundit() {
	 settings = {
      tl: { radius: 5 },
      tr: { radius: 5 },
      bl: { radius: 5 },
      br: { radius: 5 },
      antiAlias: true,
      autoPad: true
    }

    var divObj = document.getElementById("movie");

    var cornersObj = new curvyCorners(settings, divObj);
    cornersObj.applyCornersToAll();

}



