var playList;
var volume;
var fullscreen;
var autoStart;
var filePath;
var file;
var barOn;
var widescreen;
var color;
var font;
var fontSize;
var barheight;
var rowcount;
var vidprompt;
//var fontcol;

function getBars()
{
//window.alert(args);
//alert("bars"+barOn);
return barOn;
}


function openHelp() {
posterWindow = window.open('test.html', 'clipWin', 'width=640,height=480,color=#000000');

posterWindow.focus();
}



function getPlayList()
{
//alert(playList+" play list");//
return playList;
}

function getVol()
{
//window.alert(args);
//alert(volume+" volume");
return volume;
}

function getFullScreen()
{
//window.alert(args);

return fullscreen;
}

function getWidescreen()
{
//window.alert(args);
//alert(widescreen+" widescreen");
return widescreen;
}

function getColor()
{
//window.alert(args);
//alert(color+" colors");
return color;
}

function getFontColor()
{
//window.alert(args);
//alert(fontcol+" fontcolors");
return fontcol;
}

function getFontSize()
{
//window.alert(args);
//alert(fontcol+" fontcolors");
return fontSize;
}

function getFont()
{
//window.alert(args);
//alert(font+" font");
return font;
}




function getAutoStart()
{
//window.alert(args);
//alert(autoStart+" autoStart");
return autoStart;
}

function getPath()
{
//window.alert(args);

//alert(filePath+" filePath");
return filePath; 
}

function getBarHeight()
{
//alert(barheight);

//alert(filePath+" filePath");
return barheight; 
}

function getRowCount()
{
//alert(rowcount);

//alert(filePath+" filePath");
return rowcount; 
}

function getVidPrompt()
{
//alert(vidprompt);

//alert(filePath+" filePath");
return vidprompt; 
}







function flvplayer(_fullScreen, _volume, _autoStart, _file, _wmode, _bgcol, _width, _height, _playList, _barOn, _font, _color, _fontcol, _widescreen,_fontsize, _barheight, _rowcount, _vidprompt,_asspectFlag){ // 
<!-- 'fullScreen', 'volume','autostart','xml file', 'window mode', 'background colour','width','height','playlist?','top bar on','list font','bar color','font color','widescreen' -->


//alert("correct");

/*document.write(_fullScreen);
document.write(_volume);
document.write(_autoStart);
document.write(_file);
document.write(_wmode);
document.write(_bgcol);
document.write(_width);
document.write(_height);
document.write(_playList);
*/
//alert('1');
	autoStart = _autoStart;
	
	var bgcol = _bgcol; // background of player on the page
//alert('2');	
	var file = _file; // either an xml file ffor playlist version or a single flv file
//	alert('3');
	var wmode = _wmode;
	//alert('4');
	
	 widescreen = _widescreen;
	//alert('4');
	
	rowcount =  _rowcount;
	
	vidprompt =  _vidprompt;
	
	 color = _color;
	
	 font = _font;
	 
	 fontcol = _fontcol;
	 
	 fontSize = _fontsize;
	 
	 barheight = _barheight;
	
	playList = _playList;
	
	barOn  = _barOn;
	//alert('5');
	var bgcol = _bgcol;
	//alert('6');
	var width = _width;
	
	var asspectFlag = _widescreen;
	
	if(asspectFlag == '1' || asspectFlag == null){
		
		var height = (width*.56)+25;  // 60 is the bars * 2 // 16:9
		
	} else {
		var height = (width*.74)+25; // 4:3
	}
	
	if (playList == '1')  {
	
//	height = height + 33;
	
	}
	
	
//alert('7');	
//	var height = _height;
//	alert('8');
	 volume = _volume; // display volume controls
	//alert('9');
	 fullscreen = _fullScreen; // do we want full screen button
//	alert('10');
	var fileType = 'flv'; // default
//	alert('11');
	filePath = file; // this becomes the path required, either a single flv name (without extention) or the path to an xml file
	//alert('12');
	var fileLength = file.length;
	
	fileType = file.substr(fileLength-3,fileLength); // get the file extention
	
//	alert(fileType);
	//
	if(fileType == 'xml'){
		//filePath =  'http://www.filmeducation.org/xml/'+file;
		//filePath =  'xml/'+file;
	//	alert(filePath+" is the file path is an  xml");
		
	} else if(fileType == 'flv'){
	//	alert(filePath+" is the file path is an  flv");
		filePath = file.substr(0,fileLength-4);
		}
   
	
	if (AC_FL_RunContent == 0) {
	
	
		

		} else {
			
			
		
			AC_FL_RunContent(
				'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
				'src', 'http://www.filmeducation.org/swf/filmedPlayer_v6',
				'quality', 'best',
				'width', width,
				'height', height,
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'scale', 'showall',
				'wmode', wmode,
				'devicefont', 'false',
				'id', 'filmedPlayer_v6',
				'bgcolor',  bgcol,
				'name', 'filmedPlayer_v6',
				'menu', 'true',
				'tabEnabled', 'true',
				'FlashVars','playList=filePath&volume=volume&fullscreen=fullscreen&list=playList',
				'allowFullScreen', 'true',
				'allowScriptAccess','always',
				'movie', 'http://www.filmeducation.org/swf/filmedPlayer_v6',
				'salign', 'true'
				); //end AC code
		};
	
		
		
}
