//================================================================================
//	© 2007 PantherPanache, LLC.  All rights reserved. http://www.panachetech.com
//--------------------------------------------------------------------------------

function toggleScale(cx, cy)
{
	var pan_player = document.getElementById("PanVideoPlayer");
	pan_player.height="100%";
	pan_player.width="100%";
	
	var pan_player_div = document.getElementById("PanVideoPlayerDiv");
	pan_player_div.style.width = cx+"px";
	pan_player_div.style.height = (cy+30)+"px";
}

//--------------------------------------------------------------------------------
//* Panache Video Player Configuration *//--------------------------------------------------------------------------------




/* [Data Type: Number]
*  The numeric identifier of the partner as provided by Panache. This
*  identifier can be obtained by logging into the Panache Web Administrator
*  website. The Partner ID is located on the left side of the Web
*  Administrator screen above the ‘Log-Out’ button.*/
var partner_id = 53;

/* [Data Type: String]
*  Optional. Custom data to be sent with all tracking calls made to the
*  Panache Backend. This data will be recorded in Extended Data Logs and
*  accessible via FTP. If no additional tracking data is required, pass an
*  empty string (“”). A typical use of this parameter is to pass webpage
*  related data, such as a web-session ID, so that Panache metrics and webserver
*  metrics can be correlated.*/
var partner_data = "";


/* [Data Type: String]
*  The unique identifier of the video in a URL syntax. This identifier must
*  be the same identifier used in the Panache Web Administrator when
*  adding the Media Map. For “Episodes”, the value is generally the
*  absolute URL to the video asset. For “Templates”, this parameter is used
*  to determine whether or not the specified video has special Media Map (an
*  exclusion) versus the general Template. */
video_key = "";

/* [Data Type: Boolean]
*  A Boolean value indicating whether or not Media Map elements will be
*  hidden by default. A value of “true” will hide all Media Map elements
*  until the user opts-in by pausing or clicking the video. This setting will
*  not affect Media Map elements that have been marked “Forced onscreen”.
*  This mode is reserved for sophisticated interactive experiences
*  and is generally not used (set to “false”).*/
var opt_in_interactive = false;

/* [Data Type: Boolean]
*  A Boolean value indicating whether or not a click anywhere on the screen
*  opts-in for interactivity. This is only applicable when opt_in_interactive
*  is set to “true”. This mode is reserved for sophisticated interactive
*  experiences and is generally not used (set to “false”).*/
var click_for_interactive = opt_in_interactive;

/* [Data Type: Boolean]
*  A Boolean value determining the opt-in behavior. This is only applicable
*  when opt_in_interactive is set to “true”. A value of “true” will cause the
*  video to seek to the nearest Media Map element when the user opts-in. A
*  value of “false” will cause the main video to pause at the current position
*  when the user opts-in. This mode is reserved for sophisticated interactive
*  experiences and is generally not used (set to “false”).*/
var seek_to_interactive = false;

/* [Data Type: Number]
*  A numeric value indicating the amount of time (in seconds) an interactive
*  notification icon will remain visible for a given Media Map element. This
*  is only applicable when both opt_in_interactive and seek_to_interactive
*  are set to “true”. This mode is reserved for sophisticated interactive
*  experiences and is generally not used (set to “0”).*/
var notification_duration = 0;


/* [Data Type: String]
*  A string value containing the Template Set name of the desired Media
*  Map. This identifier must be the same identifier used in the Panache Web
*  Administrator when adding the Media Map. If this value is empty, the
*  Universal Media Acceptor assumes that a non-templated Media Map (an
*  “Episode”) is being requested and will use only the video_key parameter
*  when requesting the Media Map from the Panache Back-end.*/
var template_set_name = "Sandbox" ;

/* [Data Type: String]
*  A comma-separated list of values. These values will be used to match a
*  templated Media Map within the specified Template Set; the Media Map
*  with the highest amount of key matches will be returned. If no match is
*  found, the default Media Map for the Template Set will be returned.
*  Additionally, these data-key values can be accessed by all elements in the
*  Media Map, providing them with values to coordinate with 3rd-party
*  systems. The list may contain any number of keywords, and may be
*  blank. This is only applicable when both template_set is not blank (“”).*/
var data_keys = "";

/* [Data Type: Number]
*  seconds. This information can be obtained via the video’s metadata.
*  Note: Although this parameter is optional, providing this value will
*  optimize Media Map element preloading.*/
var media_length = 10;


/* [Data Type: Number]
*  Optional. A numeric value indicating the width of the video in pixels.
*  Note: Although this parameter is optional, providing this value will
*  optimize Media Map element preloading.
*/
var size_x = "";

/* [Data Type: Number]
*  Optional. A numeric value indicating the height of the video in pixels.
*  Note: Although this parameter is optional, providing this value will
*  optimize Media Map element preloading.
*/
var size_y = "";

/* [Data Type: Number]
*  The numeric Panache identifier of the partner who owns the Media Map.
*  This is only applicable when requesting Media Maps outside of your
*  partner account. In order for this type request to succeed, an affiliation be
*  established between the partner requesting the Media Map and the partner
*  providing the Media Map. This can be accomplished in the Panache Web
*  Administrator website.
*/
var partner_affiliate_id = 0;

/* [Data Type: Number]
*  Optional. A numeric value indicating the x-origin of the video in pixels 
*  relative to the current MovieClip. 
*/
var video_x = "";

/* [Data Type: Number]
*  Optional. A numeric value indicating the y-origin of the video in pixels 
*  relative to the current MovieClip. 
*/
var video_y = "";

function GetPanacheConfig(){
	var isSmil= function (url) { 
		return url.substr(url.lastIndexOf(".")) == ".smil";
	}
	var qs= "" ;
	qs += "video_key=" + video_key;
	qs += "&partner_id=" +  partner_id
	qs += "&partner_data=" +  partner_data;		
	qs += "&template_set_name=" +  template_set_name;
	qs += "&data_keys=" +  data_keys;
	qs += "&media_length=" + media_length;
	qs += "&size_x=" + size_x;
	qs += "&size_y=" + size_y;
	qs += "&opt_in_interactive=" + Number(opt_in_interactive) ;
	qs += "&click_for_interactive=" + Number(click_for_interactive);
	qs += "&seek_to_interactive=" + Number(seek_to_interactive);
	qs += "&notification_duration=" +  Number(notification_duration) ;
	qs += "&partner_affiliate_id=" +  partner_affiliate_id ;
	qs += "&video_x=" +  video_x ;
	qs += "&video_y=" +  video_y ;
	return qs ;
}
//================================================================================
