//v1.0
// 	Name: JStoFlashInterface.js
// 	Desc: Exteranl JavaScript Interface for communitcating to Flash Player
// 			primarily for loading videos and images into FRI header
//	Author: Jeff Boothe
// 	Date: Jan 10, 2009


/*
*	getFlashObject()
*	@movieName: reference to the 'id' of the Flash Movie
*	returns: object reference to the Flash Movie
*/
function getFlashObject(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}
/* 	playMedia()
*	@url: url is file path from root of site
*	@type: either 'boxed' (16x9 area video or image), or 'walkabout' (displayed in Walkabout area)
*	@params: w:483|h:273|x:250|y:86|autoPlay:false|photo:media/imageMedia/media_img_name.jpg|captions:vid16x9_name_of_movie
*	NOTE: Delimit each param with pipe | and separate name and value with a colon :
*		Exclude any param not used. All params listed above are defaults except for photo & captions. 
*		photo: param is the photo that is displayed as the 'stop image' for the video - full file path from site root required
*		captions: are supported - include only the file name and EXCLUDE directory prefix and .xml suffix
*		autoPlay: true or false to play movie on load or not
*		w, h, x, y: are size and placement parameters
*/
function playMedia(url, type, params) {  	 	
	getFlashObject("headerFRI").callFlash(url, type, params);  	
}
