function NumberFormat(nStr){
	nStr += '';
	x = nStr.split(',');
	x1 = x[0];
	x2 = x.length > 1 ? ',' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ' ' + '$2');
	}
	var r = x1 + "" + x2;
	return r.replace(".", ",");
}

/* Add product to wishlist */
function addToWishlist(formulaire, salelist) {
	if (!salelist) salelist=0;
//	try {
		var the_form 				= jQuery("#"+formulaire);
		produit_id 	= the_form.attr("prodID");
		color_selected_id = the_form.attr("colorID");
		type_vente = jQuery("#"+formulaire+" input[name='type_vente']").val() ;
		//var the_form = document.forms[formulaire]; 
		var quantite_souhaitee = 1;
		if (salelist == 1)
		{
			quantite_souhaitee = jQuery("#"+formulaire+" input[name='quantite_souhaitee']").val() ;
			if ( quantite_souhaitee > 2)
			 {  
			 opaceIt($('popupWishlistError'), 1);
			 return;
			 }
		}
		jQuery("#"+formulaire+" input[name='salelist']").val(salelist);
		jQuery.get(
				BBVars.pagesURL	+ "ajax/addToWishlist.cfm?is_xml=true&frmaction=add_whishlist"
								+ "&produit_id=" + produit_id
								+ "&attribut_detail_id=" + color_selected_id
								+ "&type_vente=" + type_vente
								+ "&option_id="			+BBVars.currentOptionID
								+"&code_ean="			+BBVars.currentProdEAN,
				function(data) {BBTool_openMsgBox(data, true);}
			)
		
	/*}
	catch (e) {
		jQuery("#"+formulaire+" input[name='frmaction']").val('add_whishlist');
		jQuery("#"+formulaire).submit();
	} */
}

/*-------------------- MENUS --------------------*/
function initMenu() {
	jQuery("#menuList li.mainCat ul").css({
			opacity:	0,
			display:	"none"
		});
	jQuery("#menuList li.mainCat")
			.bind("mouseenter", function(e) {
				jQuery("ul", this)
						.css("display","block")
						.stop()
						.animate({opacity:1}, "fast")
				e.preventDefault();
			}).bind("mouseleave", function(e) {
				jQuery("ul", this).stop().animate({opacity:0}, "fast", function() { jQuery(this).css("display", "none");})
				e.preventDefault();
			})
}

function dspSCat( catID ) {

	var sMenu = jQuery("#left_menu_list ul").eq(catID);
	var sLink = sMenu.prev();
	var images = jQuery("img", sLink);
	
	if(images.length>0) {
		if(images.eq(1).css("opacity")==0) {
			images.eq(1).animate({opacity: 1});
			images.eq(0).animate({opacity: 0});
		} else {
			images.eq(1).animate({opacity: 0});
			images.eq(0).animate({opacity: 1});
		}
	} else sLink.toggleClass("selected");
	
	(sMenu.css("display")=="none") 
			? sMenu.css("display","block")
			: sMenu.css("display","none");

	//jQuery("a", sMenu).attr("style","border: 1px solid red;");

}

/*--------------------------------------------------*/

function initQuickBuy() {

	jQuery("#products_list li").each( function() {
	
		jQuery("div.prodImg", this).bind("mouseenter", function(e) {
			jQuery(".add2cart_link", this)
					.stop()
					.css({ opcaity: 0, display: "block"})
					.animate({opacity: 1}, "fast");
			e.preventDefault();
		}).bind("mouseleave", function(e) {
			jQuery(".add2cart_link", this)
					.stop()
					.animate({opacity: 0}, "fast", function() {jQuery(this).css("display", "none"); });
			e.preventDefault();
		});
	
	});

}

function initQuickBuyCross() {

	jQuery(".cross_prod_layer li").each( function() {
	
		jQuery("div.crossImg_layer", this).bind("mouseenter", function(e) {
			jQuery(".add2cart_link", this)
					.stop()
					.css({ opacity: 0, display: "block"})
					.animate({opacity: 1}, "fast");
			e.preventDefault();
		}).bind("mouseleave", function(e) {
			jQuery(".add2cart_link", this)
					.stop()
					.animate({opacity: 0}, "fast", function() {jQuery(this).css("display", "none"); });
			e.preventDefault();
		});
	
	});

}

function initGallery() {

	jQuery("#BBGallery_list img").batchImageLoad({
		loadingCompleteCallback: MagicMagnify_findMagnifiers()
	});
		
}


function getFiche( prodID, catID, colorID, isCross ) {

	jQuery.get(BBVars.pagesURL 		+ "fiche.cfm?isAjax=true"
			+"&produit_id="			+ prodID
			+"&cat_id="				+ catID
			+"&coul_att_detailID="	+ colorID
			,function(data) {BBTool_openMsgBox(data, true);}
		);
}

function getFicheCross( prodID, catID, colorID, isCross ) {

	jQuery.get(BBVars.pagesURL 		+ "fiche.cfm?isAjax=true"
			+"&produit_id="			+ prodID
			+"&cat_id="				+ catID
			+"&coul_att_detailID="	+ colorID
			+"&attDspType=0"
			,function(data) {BBTool_openMsgBox(data, true);}
		);
}

function popMailing() {
	jQuery.get(BBVars.pagesURL + "mailing.cfm",
		function(data) {BBTool_openMsgBox(data, true);}
		);
}

function popMire() {
	jQuery.get(BBVars.pagesURL + "ajax/mire_popup.cfm",
		function(data) {BBTool_openMsgBox(data, true);}
		);
}

/*-------------------- GIFT POPUP --------------------*/
function popGift() {
	jQuery.get(BBVars.pagesURL + "ajax/gift.cfm",
		function(data) {BBTool_openMsgBox(data, true);}
		);
}

function gift_img (nb) {
	jQuery("#picto_list li").each(function(i) {
		if(nb==i) {
			jQuery(this).removeClass();
			jQuery(this).fadeTo("fast",1,function(){
				jQuery("#gift_layer_"+jQuery(this).attr("tabId")).css("display","block").fadeTo("slow",1,function(){if(BBVars.isMsIE) this.style.removeAttribute("filter");}).css("opacity","1");
				//jQuery("#card_layer_"+jQuery(this).attr("tabId")).style.removeAttribute('filter');
			});
		} else {
			jQuery(this).removeClass();
			jQuery(this).fadeTo("fast",0.33,function(){
				jQuery("#gift_layer_"+jQuery(this).attr("tabId")).css("display","none").fadeTo("normal",0,function(){if(BBVars.isMsIE) this.style.removeAttribute("filter");});
			});
		}
	});
	
}
/*--------------------------------------------------------------------*/

/*-------------------- LEFT MENU --------------------*/
function popup_left_col(id) { 
	var element = document.getElementById(id);
	var state = element.style.display;
	if (state == "block") element.style.display = "none";
	else element.style.display = "block";
}
/*---------------------------------------------------*/

/*-------------------- TRI PAR ATTRIBUT (UNIVERS) --------------------*/
function initFilterOver(menuID) {
	var menu = jQuery("#sizef_layer ul").attr("id");
	
	jQuery("#sizef_layer").bind("mouseenter", function(e) {
		e.preventDefault();
		jQuery("#" + menu).stop().css({opacity: 0, display: "block"}).animate({opacity: 1}, function() {
					if(BBVars.isMsIE)
						this.style.removeAttribute("filter");
				});
	
	}).bind("mouseleave", function(e) {
		jQuery("#" + menu).stop().animate({opacity: 0}, function() { jQuery(this).css("display", "none"); });
		
	});
	

/*
	var menu = document.getElementById(menuID + '_layer').getElementsByTagName("ul")[0];
	if(!menu.style.display || menu.style.display == "none") menu.style.display = "block";
	else menu.style.display = "none";
*/
}

function sortList(type, value){
	if(type =='price') {
		document.product_form.price_origine.value = value;
	} else if(type == 'number') {
		document.product_form.maxrows.value = parseInt(document.product_form.maxrows.value) + 12*value; 
	}
	else if(type == 'tri') {
		document.product_form.tri.value = value; 
	}
	document.product_form.submit();
}
/*---------------------------------------------------*/


function pictoHover(linkObj) {

	var label = jQuery('pictos_label');
	var label_layer = jQuery('pictos_label_layer');
	
	if(linkObj) {
		label.innerHTML = linkObj.title;
		label_layer.style.visibility = "visible";
	} else label_layer.style.visibility = "hidden";

}

var tmp_colorLabel = "";

function colorHover(label,DetID,attrib_id,sel_coul_id) {
	//alert(attrib_id);
	//alert(DetID);
	var label_layer = jQuery('color_label2');
	/*for(var i=0; i<Details.length; i++){
		var Detail = Details[i];
		if(DetID != Detail.DetailID)
			jQuery('OAttribut_a' +attrib_id + '_d' + Detail.DetailID ).style.display='none';
		else jQuery('OAttribut_a' +attrib_id + '_d' + Detail.DetailID ).style.display='block';
	}*/
	if(attrib_id){
		if(tab_coul){
		for(var i=0; i<tab_coul.length; i++){
			(tab_coul[i] == DetID)?	jQuery('OAttribut_a' +attrib_id + '_d' + tab_coul[i] ).style.display='block':jQuery('OAttribut_a' +attrib_id + '_d' + tab_coul[i] ).style.display='none';
			}
		}
	}
	if(label && label != "") {
		tmp_colorLabel = label_layer.innerHTML;
		label_layer.innerHTML = label;
	} else label_layer.innerHTML = tmp_colorLabel;

}

function setShippingMode() {

	if(document.forms['frmModeLivraison'].elements['mode_livraison'].length!=undefined) {
		for (i=0; i<document.forms['frmModeLivraison'].elements['mode_livraison'].length; i++) {
			if (document.forms['frmModeLivraison'].elements['mode_livraison'][i].checked == true) {
				shippingMode = document.forms['frmModeLivraison'].elements['mode_livraison'][i].value;
			}
		}
	} else {
		shippingMode = document.forms['frmModeLivraison'].elements['mode_livraison'].value;
	}
	
	document.forms["frmFacturation"].elements['mode_livraison1'].value	= shippingMode;
	document.forms["frmTravail"].elements['mode_livraison2'].value		= shippingMode;
	document.forms["frmUneAdresse"].elements['mode_livraison3'].value	= shippingMode;

}

function BBChangeColor(colorSelected,listColor,item,photo,row){
	
	MagicMagnify_stopMagnifiers();
	jQuery("#cross_layer a").unbind("click");
	jQuery("#cross_layer ul[dsp=true]").attr("dsp","false");
	
	var lstColor=listColor.split(',');
	jQuery.each(lstColor,function(index, color){
		if(colorSelected != parseInt(color)){
			jQuery("#lienColor" + color).removeClass();
			jQuery("#lienColor" + color).addClass("colorGrey");
			jQuery("#liTaille" + color).hide();
			if(typeof jQuery("#cross_prod_layer" + color) != "undefined")
				jQuery("#cross_prod_layer" + color).hide();
			
	  	}
	  	else{
	  		//var row = eval(jQuery("#taille"+color).options[jQuery("#taille"+color).selectedIndex].value);
	  		// avec un select 
			BBVars.currentColorID = color;
	  		if(typeof photo != "undefined")
	  			jQuery("#imgQuickBuy").attr("src",photo);
	  		if(typeof row == "undefined")
	  			var row = jQuery("#taille"+color).val();

	  		BBCart('setAttrib', item + row, setAttrib_callBack,1);
	  		
	  		jQuery("#lienColor" + color).removeClass();
			jQuery("#lienColor" + color).addClass("colorSelect");
			jQuery("#liTaille" + color).show();
			
			if(typeof jQuery("#cross_prod_layer" + color) != "undefined")
				jQuery("#cross_prod_layer" + color).show().attr("dsp","true");
			jQuery.get(
				BBVars.pagesURL 	+"ajax/photo.cfm"
				+"?produit_id="			+BBVars.currentProdID
				+"&coul_att_detailID="		+color,
				function(data) {initCrossSelling(); BBTool_openMsgBox(data, true);}
			);
			//BBCart('setAttrib', 'item#BBAttrib_prodID#_' + this.options[this.selectedIndex].value', setAttrib_callBack,1);
	  	}
	});

}
function showPanier(visible){
	if(visible){
		jQuery("#toCartBtn").show();
		jQuery("#toReminderBtn").hide();
	}else {
		jQuery("#toCartBtn").hide();
		jQuery("#toReminderBtn").show();
	}
	
}


/*--------------------------------- CALLBACKS ---------------------------------*/


function checkClient_callback(data) {}
function checkClient() {
	jQuery.get(
		BBVars.pagesURL + "ajax/login.cfm?formAction=checkClient",
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function login_callback(data) {setTimeout("BBTool_closeMsgBox()",2000);}
function BBLogin() {
	jQuery.get(
		BBVars.pagesURL + "ajax/login.cfm?formAction=prompt",
		function(data) {BBTool_openMsgBox(data, true)}
	);
}
function BBStock() {
	jQuery.get(
		BBVars.pagesURL + "ajax/retour_en_stock.cfm?formAction=prompt&code_ean="+ BBVars.currentProdEAN,
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function sendPwd_callback(data) {setTimeout("BBTool_closeMsgBox()",2000);}
function sendPwd() {
	jQuery.get(
		BBVars.pagesURL + "ajax/login.cfm?formAction=promptPwd",
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function sizeGuid() {
	jQuery.get(
		BBVars.pagesURL + "ajax/guide_tailles.cfm",
		function(data) {BBTool_openMsgBox(data, true)}
	);
}

function sizeGuidCallback() {
	var options = {
		header:			'.sizeTab_title', 
		autoheight:		false
	}
	jQuery(".tab_content").accordion(options);
	jQuery("#BBTool_msgBoxBody").css("height","auto");
	tab_sizeGuid(0);
}

function QuickBuyCallback(getOptions,product_formID) {
	BBCart(getOptions,product_formID);
	BBTool_toolTip();
}

/*--------------------------------- INIT FUNCTIONS ---------------------------------*/

jQuery.noConflict()(function() {
	
	if(BBVars.currentPageName!="paiement") {
		checkClient();
		BBCart("check");
		BBTool_flash();
	}
	
	initMenu();
	initQuickBuy();
	initBanner();
	
	var BBTool_pageSizes 			= BBTool_getPageSize();
	var BBTool_pageScroll 			= BBTool_getPageScroll();
	
		BBVars.pageWidth 			= BBTool_pageSizes[0];
		BBVars.pageHeight 			= BBTool_pageSizes[1];
		BBVars.windowWidth 			= BBTool_pageSizes[2];
		BBVars.windowHeight 		= BBTool_pageSizes[3];
		BBVars.pageScrollX 			= BBTool_pageScroll[0];
		BBVars.pageScrollY 			= BBTool_pageScroll[1];
		
		BBVars.dataSendContentID	= (jQuery(".dataSend").length>0) ? jQuery(".dataSend").attr("id") : "";
		
	if(BBVars.currentPageName=="compte_perso") {
	
		jQuery("#password1").val('');
	
	} else if(BBVars.currentPageName=="fiche") {
		var options = {
			showEffect:		'fadein',
			hideEffect:		'fadeout',
			fadeinSpeed:	'medium',
			fadeoutSpeed:	'medium',
			preloadText:	'Chargement'
		}
		
		jQuery('.expand').click(function(){
			var href= jQuery(this).attr('href');
			var elclass = href.match('#([a-zA-Z]+)([0-9]+)');
			
			if(elclass[1] == 'html'){
				jQuery('.html'+elclass[2]+'div').show();
				jQuery('.js'+elclass[2]+'div').hide();
			}else{
				jQuery('.html'+elclass[2]+'div').hide();
				jQuery('.js'+elclass[2]+'div').show();
			}
			jQuery(this).addClass('alert').siblings('a').removeClass('alert');
			return false;
		});
		
		if(BBVars.currentProdID!=0) BBCart("getOptions");
		initCrossSelling();
		BBTool_toolTip();
		//MagicMagnify_findMagnifiers();
		initQuickBuyCross();
		
	} else if(BBVars.currentPageName=="livraison") {
		BBVars.tmpHTML = jQuery("#adrFact_layer").html();
		//if(BBVars.adrType==1) jQuery("#same").attr("checked", true);
		//else jQuery("#diff").attr("checked", true);
		chooseAddress();
		
	} else if(BBVars.currentPageName=="univers") {
		initFilterOver();
	} else if(BBVars.currentPageName=="collections") {
		var flowPlayer = $f("edenPlayer", {src: BBVars.pageURL + "ximg/flash/flowplayer-3.2.7.swf", wmode: 'opaque'}, {
			clip: {
				autoPlay: true,
				autoBuffering: true
			},
			play: {
				opacity: 0,
				label: null,
				replayLabel: 'Play again'
			},
			plugins: {controls: null}
		}).controls("eden", {duration: 25}).playlist("li.backstage_videosList", {loop: true});
	
	}
});

/*----------------------------------------------------------------------------------*/

function initBanner() {

	var banners = jQuery("#BBBanner .banner");
	
	if(banners.length>1) {
		banners.css({opacity: 0, display: "none"}).attr("rel","false");
		var firstBanner = banners.eq(0);
		firstBanner.css("display","block").attr("dsp","true").animate({opacity: 1}, function() { setInterval("showBanner()",4000); });
	}

}

function showBanner() {

	jQuery("#BBBanner .banner[dsp='true']").animate({opacity:0}, function() {
		jQuery(this).css("display","none").attr("dsp","false");
		var nextLayer = (jQuery(this).next().hasClass("banner")) ? jQuery(this).next() : jQuery("#BBBanner .banner").eq(0);
		nextLayer.css("display","block").attr("dsp","true").animate({opacity: 1}, function() {});
	});

}

/*------------------- LAYER ADRESSE FACTURATION (LIVRAISON) -----------------------*/
function chooseAddress() {

	if(eval(jQuery("input[name='adrFact']:checked").val())) {
		jQuery("#adrFact_layer").html(BBVars.tmpHTML).slideDown();
	} else {
		jQuery("#adrFact_layer").slideUp(function() {jQuery(this).html("");});
	}
}
/*---------------------------------------------------------------------------------*/

var selectHover = false;
var selectOpened = false;

function openSelect() {

	if(jQuery("#silBlock_list").attr("display") != "block") {
		jQuery("#silBlock_list").css("display","block");
		selectOpened = true;
	}
	

}

function closeSelect() {
	jQuery("#silBlock_list").css("display","none");
	selectOpened = false;
}

function showZoom(dsp) {
	if(dsp) jQuery("#silZoomLayer").fadeIn().css("display","block");
	else jQuery("#silZoomLayer").fadeOut().css("display","none");
}

function tab_sizeGuid (nb) {
	jQuery("#tab_list_ul li").each(function(i) {
		if(nb==i) {
			jQuery(this).removeClass();
			jQuery(this).addClass("li_actif");
			jQuery(this).fadeTo("fast",1,function(){
				jQuery("#tab_layer_"+jQuery(this).attr("tabId")).css("display","block").fadeTo("fast",1,function(){if(BBVars.isMsIE) this.style.removeAttribute("filter");}).css("opcaity", "1");
			});
		} else {
			jQuery(this).removeClass();
			jQuery(this).addClass("li_none");
			jQuery(this).fadeTo("fast",0.33,function(){
				jQuery("#tab_layer_"+jQuery(this).attr("tabId")).css("display","none").fadeTo("fast",0,function(){if(BBVars.isMsIE) this.style.removeAttribute("filter");});
			});
		}
	});
	
}

function initCrossSelling() {

	var scrollable = false;
	if(jQuery("#cross_layer ul[dsp=true] li").length>1) scrollable = true;

	jQuery("#crossArrow_top a").bind("click", function(e) {
		e.preventDefault();
		if(scrollable && jQuery(":animated").length==0) {
			var currentList = jQuery("#cross_contain ul[dsp=true]");
			var allItems = jQuery("li", currentList);
			var newElem = allItems.eq(allItems.length-1);
			var firstItem = allItems.eq(0);
			newElem.clone(true).insertBefore(firstItem).css({marginTop: "-210px"})
					.animate({ marginTop: "+=210" }, function() { allItems.eq(allItems.length-1).remove(); });
		}
	});
	
	jQuery("#crossArrow_down a").bind("click", function(e) {
		e.preventDefault();
		if(scrollable && jQuery(":animated").length==0) {
			var currentList = jQuery("#cross_contain ul[dsp=true]");
			var allItems = jQuery("li", currentList);
			var newElem = allItems.eq(0);
			var lastItem = allItems.eq(allItems.length-1);
			newElem.clone(true).insertAfter(lastItem);
			newElem.animate({ marginTop: "-=210" }, function() {
				jQuery(this).remove();
			});
		}
	});
	
	jQuery("#cross_contain ul[dsp=true]")
			.css({opacity: 0, display: "block"})
			.animate({opacity: 1}, function() {
				if(BBVars.isMsIE)
					this.style.removeAttribute("filter");
			});

}


/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
