



function ebAd_335665()
{
	this.fYahooFloatingAd = ("2" == "5");
	this.fVideoStrip = ("10" == "20");
	
	
	this.fPushdown = ("0" == "1");
	this.nUponShow = 1;
	
	this.nFreqTimes = 6;
	this.nFreqPeriod =  4;

	this.strDefaultImage = ebResourcePath + "Site-508/Type-0/4231D066-C3EA-45A1-A903-F9B398372DE9.gif";
	this.strDefaultFlash = ebResourcePath + "Site-508/Type-2/8CFB346E-2DC4-4D6B-973D-A7811F41930B.swf";
	this.nDefaultFlashWeight = 5755;
	this.nDefaultFlashWidth = 468;
	this.nDefaultFlashHeight = 60;
	
// Full-page skin URL

	this.strFSSkinURL = ebResourcePath + "Site-0/Type-2/D9ED902E-0884-44E1-86AD-7C6C39430EAE.swf";
	this.nFSSkinWidth = 1024;
	this.nFSSkinHeight = 728;

this.nFSMute = 3;
this.fEnableFS = 0;
			
		
	this.flFlashVer = "8";
	this.fShowSinglePanel = 1;
	this.fPreLoadPanels = 0;
	
	//	Hide dropDowns and Iframes
	this.fHideDropDowns = ("1" == "1");
	this.fHideIframes = ("1" == "1");
	this.fHideFlash = ("1" == "1");
	this.fHhideApplet = ("1" == "1");

	if ("1" == "0")					// All Browsers
		this.nHideIframeIn = 0xffffffff;
	else										//	IE5 (original and AOL) and NN6.x
		this.nHideIframeIn = 0x1 | 0x40 | 0x8 | 0x10 | 0x20;
	
	this.fAutoSetDHTML = 0;
	
	//if not exist (old ads), set to true.
	this.fManipulateRelativeElements = ("0" != "0");
	
	//flag indicates if this banner should be cross frames.
	var browser = new ebCBrowserCheck();
	var isIE5 = ((browser.getEbBrowser() == 1)||(browser.getEbBrowser() == 64));
	
	this.fPanelsClickable = ("1" == "1");
	this.fShouldLoadPosition = ("0" == "1");
	
// Additional assets

this.arrAdditionalRes = new Array(); // backward compatibility - can be removed after upload to REL
this.additionalAssets = new Object();
			

	initPanels(this);
	
	function initPanels(objRef)
	{
		
		
		//this array is used for converting the wmode value from the admin(0,1,2)
		//to the actual value.
		var arrWmodeVals = new Array("transparent","opaque","window");
		
		// copy the panels array to the client
		var arr = new Array();
		
				arr[0] = new Array();
		
				arr[0][0] = "reveal_expand";
		
				arr[0][1] = "Site-508/Type-2/04CA1F89-0CD0-4449-9F99-123E5D266C99.swf";
		
				arr[0][2] = "468";
		
				arr[0][3] = "350";
		
				arr[0][4] = "1";
		
				arr[0][5] = "0";
		
				arr[0][6] = "0";
		
				arr[0][7] = "1";
		
				arr[0][8] = "0";
		
				arr[0][9] = "552647";
		
				arr[0][10] = "133997";
		
				arr[0][11] = "1";
		
				arr[0][12] = "1324868";
		
				arr[0][13] = "0";
		
				arr[0][14] = "3";
		
				arr[0][15] = "1";
		
				arr[0][16] = "0";
		
				arr[0][17] = "";
		
				arr[0][18] = "50";
		
				arr[0][19] = "100";
		
				arr[0][20] = "0";
		
				arr[0][21] = "0";
		
				arr[0][22] = "0";
		
		
		// Order of values is the pannels buffer from the server is as follows:
		//	0 - Panel Name
		//	1 - Flash Url
		//	2 - Panel width
		//	3 - Panel height
		//	4 - Positioning Type (currently only relative to banner is supported)
		//	5 - Xpos
		//	6 - Ypos
		//	7 - Corner To Align (1:Top-Left 2:Top-Right 3:Bottom-Left 4:Bottom-Right)
		//	8 - Enable Scroll Bars (not supported yet).
		//	11 - transparent.
		//	12 - Pnael's weight (resource size).
		//	13 - AutoExpand
		//	14 - RetractOffAd
		//  15-19 - Streaming settings
		//  20 - Push Down
		//  22 - Video Strip
		
		objRef.panels = new Object();
		
		// happens when loading the ad file in full page (for the interactions only)
		if (typeof(ebCPanel) == "undefined")
			return;
			
		for (var i=0; i< arr.length; i++)
		{
			var strName = arr[i][0];
			var lowerName = strName.toLowerCase();
			var panel = new ebCPanel(strName);
			panel.src = ebResourcePath + arr[i][1];
			panel.nWidth = arr[i][2];
			panel.nHeight = arr[i][3];

			//position type:
			//	check if absolute position
			if("0" == "1")
			{
				panel.nPosType = 0;			//absolute - percentage
				
				panel.nXPos = 100;
				panel.nYPos = 0;
			}
			else
			{
				panel.nPosType = 1;					//arr[i][4]; (relative)
			
				panel.nXPos = arr[i][5];
				panel.nYPos = arr[i][6];
			}
			
			panel.nCorner = arr[i][7];
			panel.fScroll = false;				//arr[i][8];
			panel.strAdditionalRes = objRef.strAdditionalRes;
			
			//set the pannels wMode
			var fTransparent;
			if(typeof(arr[i][11]) == "undefined")	//backward compatability
				fTransparent = true;							//if there is no wMode attribute
			else									//we treat it as "transparent"
				fTransparent = (arr[i][11] == "1");
	
			if(fTransparent)
				panel.strWmode = "transparent";
			else
				panel.strWmode = "window";
			panel.fAutoExpand = (arr[i][13] == 1);
			panel.fRetractOffAd = (arr[i][14] == 1);
			panel.fRetractOffThisPanel = ((arr[i][14] == 2) && !isIE5);
			
			if((arr[i][14] < 3) && isIE5)
				panel.fRetractOffAd = true;
				
			panel.nWeight = arr[i][12];
			
			//streaming parameters
			panel.streaming = null;
			if(arr[i][15] == "1")
			{
				panel.streaming = new Object();
				panel.streaming.fAutoBuffer = (arr[i][16] == "1");
				panel.streaming.nMovieDuration = arr[i][17];
				panel.streaming.nHighBWBuffer = arr[i][18];
				panel.streaming.nLowBWBuffer = arr[i][19];
			}
			panel.fPushDown = (arr[i][20] == "1");
			
			panel.fVideoStrip = (arr[i][22] == "1");
			
			panel.nDuration = -1;
			
			objRef.panels[lowerName] = panel;
		}
	}
	
	



	//	Update Remote Servers
	this.playRS = new ebCRemoteServers();
	
	//	Update Interactions
	this.interactions = new Object();
	
	//set the Default Interaction - "_eyeblaster"
	setDefaultInteraction(this);
	setInteractions(this);
	
	//		TODO ...
	//if (linkFlag.toLowerCase() == "true")
	//	gebInteractionBuffer[0].jumpURL = "http://www.mini.co.uk ";
	//else
	//gebInteractionBuffer[0].jumpURL = "";

	function setDefaultInteraction(objRef)
	{
		objRef.interactions["_eyeblaster"] = new ebCInteraction("_eyeblaster");
		var inter = objRef.interactions["_eyeblaster"];
	
		inter.fCloseFlag = 1;
		inter.strJumpUrl = "http://www.mini.co.uk ";
		if (inter.strJumpUrl != "")
			objRef.fLink = true;
		else
			objRef.fLink = false;
		inter.strTarget = "_blank";
		inter.RS.strNUrl = "";
		inter.RS.strAUrl = "http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk";
		inter.fCountAsClick = 1;
		inter.jumpWin.strPosX = "";
		inter.jumpWin.strPosY = "";
		inter.jumpWin.strWidth = "";
		inter.jumpWin.strHeight = "";
		inter.jumpWin.strAddressBar = "0";
		inter.jumpWin.strMenuBar = "0";
	}
	


	//function setInteractions
	//	this function build all the interactions that came from the admin as objects
	//	in the interactions object.
	//	the interactions data that come from the admin is set in array in the folowing order:
	///////////////////////////
	//	0 : InteractionName
	//	1 : CloseFlag
	//	2 : JumpURL
	//	3 : JumpWinPosX
	//	4 : JumpWinPosY
	//	5 : JumpWinWidth
	//	6 : JumpWinHeight
	//	7 : JumpWinAddressBar
	//	8 : JumpWinMenuBar
	//	9 : NetworkTrackingURL
	// 10 :	AgencyTrackingURL
	// 11 : JumpTarget
	// 12 : CountAsClick
	// 13 : nType
	/////////////////////////////
	function setInteractions(objRef)
	{
		
		buildIntList(objRef,"boost_accInt",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"boost_click",0,"http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk","","","","","","","","","1",1,0,1);
		
		
		buildIntList(objRef,"boost_soundOff",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"boost_soundOn",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"customise_click",0,"http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk","","","","","","","","","1",1,0,1);
		
		
		buildIntList(objRef,"customise_skyInt",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"customise_soundOff",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"customise_soundOn",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"eb25Per_Played",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"eb50Per_Played",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"eb75Per_Played",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebFSEnd",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebFSStart",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebFSVideoAssetDuration",0,"","","","","","","","","","",0,1,0);
		
		
		buildIntList(objRef,"ebFSVideoMute",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebFSVideoPause",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebFSVideoPlayDuration",0,"","","","","","","","","","",0,1,0);
		
		
		buildIntList(objRef,"ebVideoAssetDuration",0,"","","","","","","","","","",0,1,0);
		
		
		buildIntList(objRef,"ebVideoDuration",0,"","","","","","","","","","",0,1,0);
		
		
		buildIntList(objRef,"ebVideoFullPlay",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebVideoMute",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebVideoPause",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebVideoPlayDuration",0,"","","","","","","","","","",0,1,0);
		
		
		buildIntList(objRef,"ebVideoReplay",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebVideoStarted",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"ebVideoUnmute",0,"","","","","","","","","","",0,0,1);
		
		
		buildIntList(objRef,"ebVideoUnmuted",0,"","","","","","","","","","",0,0,0);
		
		
		buildIntList(objRef,"mirror_click",0,"http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk","","","","","","","","","1",1,0,1);
		
		
		buildIntList(objRef,"mirror_skyInt",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"reveal_bannerInt",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"reveal_click",0,"http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk","","","","","","","","","1",1,0,1);
		
		
		buildIntList(objRef,"reveal_close",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"reveal_soundOff",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"reveal_soundOn",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"tear_click",0,"http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk","","","","","","","","","1",1,0,1);
		
		
		buildIntList(objRef,"tear_soundOff",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"tear_soundOn",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"tug_banClick",0,"http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk","","","","","","","","","1",1,0,1);
		
		
		buildIntList(objRef,"tug_ropeInt",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"tug_skyClick",0,"http://ad.doubleclick.net/clk;58300392;14883441;g?http://www.mini.co.uk","","","","","","","","","1",1,0,1);
		
		
		buildIntList(objRef,"tug_soundOff",0,"","","","","","","","","","1",0,0,1);
		
		
		buildIntList(objRef,"tug_soundOn",0,"","","","","","","","","","1",0,0,1);
		
		
	}
	
	function buildIntList(objRef,name,fClose,jumpURL,XPos,YPos,width,height,fAddress,fMenu,NUrl,AUrl,target,fClick,type,nInitiated)
	{
		//create a new interaction object and set all its properties.
			
		//inter[0] -> interaction name.
		objRef.interactions[name] = new ebCInteraction(name,type);
		var tempInter = objRef.interactions[name];
			
		tempInter.fCloseFlag = fClose;
		tempInter.strJumpUrl = jumpURL;

		tempInter.jumpWin.strPosX = XPos;
		tempInter.jumpWin.strPosY = YPos;
		tempInter.jumpWin.strWidth = width;
		tempInter.jumpWin.strHeight = height;
		tempInter.jumpWin.strAddressBar = fAddress;
		tempInter.jumpWin.strMenuBar = fMenu;
			
		tempInter.RS.strNUrl = NUrl;
		tempInter.RS.strAUrl = AUrl;
			
		var target = parseInt(target);
		switch (target)
		{
			case 0 :
				tempInter.strTarget = "_self";		// same window
				break;
			case 1 :
				tempInter.strTarget = "_blank";		// New window
				break;
			case 2 :
				tempInter.strTarget = "_top";		// Break the frameset
				break;
			default :
				tempInter.strTarget = "_blank";
		}

		tempInter.fCountAsClick = fClick;
		tempInter.nInitiated = nInitiated;		//0 - auto initiated;1 - user initiated
		//tempInter.print();		
	}
		
	
	

}

//	Mark this ad as loaded
if(typeof(gnEbAd_335665WasLoaded) == "undefined")
	gnEbAd_335665WasLoaded = 1;
else
	gnEbAd_335665WasLoaded++;


if (typeof(ebScriptLoaded) != "undefined")
	ebScriptLoaded("ebAd_335665");
if (typeof(ebDoOnBannerScriptLoad) != "undefined")
	ebDoOnBannerScriptLoad();
