
/*************************************************************************************
* Global library Heineken Internet
* Check crsc.heineken.com/scripts/lib_global.js for latest version
* Version: 1.0
* Date: March 21, 2007
**************************************************************************************/

function thisMovie(movieName) {
	// IE and Netscape refer to the movie object differently.
	// This function returns the appropriate syntax depending on the browser.
	if (navigator.appName.indexOf ("Microsoft") !=-1) {
	  return window[movieName]
	}else {
	  return document[movieName]
	}
}
				
	
function play(movid,tagname){
  sendGoogleAnalyticsTrack("flash", "ads/country"+tagname);
  thisMovie("video_player_ads").playmovie(movid);
}


/**
*  this function will load a flash video file into the flash videoplayer.
*  flv files need to be configured in the videoplayers config xml file.
*  
* @uses  thisMovie, sendGoogleAnalytics
*
* @param playerid 	string 	[videoplayer's id in DOM]
* @param movid 		int 	[config array's  index of flash videofile]
* @param tagname 	string 	[tagname to be passed to google analytics]
* @param ccode 		string 	[country isocode, if undefined default value is "global"] 
*/
function playMov(playerid,movid,tagname,country){
  if(typeof(country)== 'undefined')country ="global";
  sendGoogleAnalyticsTrack("flash", "ads/"+country+"/"+tagname);
  //alert("ads/"+country+"/"+tagname);
  //alert("pid="+playerid+"\nmid="+movid);
  thisMovie(playerid).playmovie(movid);	
}
