/** 
* return a reference to a flash movie
*/
function getFlashMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}


/**
* add to my street
* - open dialog
*/
function flash_addToMyStreet(param){
	// do an async call to the mystreet processor
	//alert("add to my street...");
}

/**
* play safe dialog
*/
function flash_openPlaySafeDialog(param){
	GB_showCenter("PlaySafe", "../../../../html_street/playsafe_dialog.html", 300, 350);
}

/**
* Share dialog
*/
function flash_openShareDialog(param){
	GB_showCenter("Share", "../../../../html_street/share_dialog.html", 300, 350);
}

/**
* download video dialog/functionality
*/
function flash_downloadAsset(param){
	alert("download..." + param);
}

/**
* create your own playlist (playlist landing page)
*/
function flash_createPlaylist(muppets,subject,mediatype){
	alert("this is the flash_createPlaylist method.\n\nYou selected\nmuppets: "+muppets+"\nsubject: "+subject+"\nmedia type: "+mediatype);	
}

/**
* handle urchin stats calls from flash
* @param context - the player which called this method (PlaylistPlayer,GamePlayer,VideoPlayer + other variants)
* @param eventType - the event which occured
	"start" indicates asset has begun playback 
	"finish" means asset has completed playback normally. 
	"abort" indicates asset was terminated early)
* @param assetId - ID of affected asset (from XML)
* @param assetUrl - directLink URL (from XML)
* @param assetDuration - duration of playback in milliseconds (zero for a "start" event)
*/
function flash_urchinStats(context, eventType, assetId, assetType, assetUrl, assetDuration){
	/*if(!statsWindow) {
		statsWindow = window.open('','stats','');
		statsWindow.document.write("<h2>Stats calls - debug log</h2>");
	}
	statsWindow.document.write("STATS : <b>context=</b>"+context+" <b>eventType=</b>"+eventType+" <b>assetType=</b>"+assetType+" <b>id=</b>"+assetId+" <b>assetUrl=</b>"+assetUrl+" <b>duration=</b>"+assetDuration);
	statsWindow.document.write("<br>");*/
		
	// call urchin here:
	//urchinTracker(assetUrl);
}

