var playList;
var volume;
var fullscreen;
var autoStart;
var filePath;
var file;
var barOn;

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


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

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

function getFullScreen()
{
//window.alert(args);
//alert(fullscreen+" full screeen");
return fullscreen;
}

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

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

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






function flvplayer(_fullScreen, _volume, _autoStart, _file, _wmode, _bgcol, _width, _height, _playList, _barOn){ // 

//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');
	playList = _playList;
	
	barOn  = _barOn;
	//alert('5');
	var bgcol = _bgcol;
	//alert('6');
	var width = _width;
//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 = ''; // 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;
	//	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_v4',
				'quality', 'best',
				'width', width,
				'height', height,
				'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
				'scale', 'showall',
				'wmode', wmode,
				'devicefont', 'false',
				'id', 'filmedPlayer_v4',
				'bgcolor',  bgcol,
				'name', 'filmedPlayer_v4',
				'menu', 'true',
				'FlashVars','playList=filePath&volume=volume&fullscreen=fullscreen&list=playList',
				'allowFullScreen', 'true',
				'allowScriptAccess','always',
				'movie', 'http://www.filmeducation.org/swf/filmedPlayer_v4',
				'salign', 'true'
				); //end AC code
		};
	
		
		
}
