//=============================================================================
// Utility
// These are primary writer function that can be used to build writers
//=============================================================================
// Write a popup (doesn't actually write in the document...)
//-----------------------------------------------------------------------------
function writePopup(url, width, height, wait, cookie_name, cookie_duration, probability, scrollbars) {
  // Default parameters
  if (arguments.length < 8) scrollbars = 0;
  if (arguments.length < 7) probability = 1; // Should be betwen 0 and 1
  if (arguments.length < 6) cookie_duration = null; // In days
  if (arguments.length < 5) cookie_name = 'popup';
  if (arguments.length < 4) wait = 0;

  // If cookie is present, popup must not be displayed
  if (document.cookie.indexOf(cookie_name) != -1)
  return;

  // If random (between 0 and 1) is over probability, popup must not be displayed
  if (Math.random() >= probability)
  return;

  // Build a cookie to prevent other display
  var c = cookie_name + '=1;Path=/';
  if (cookie_duration != null) {
    var d = new Date();
    d.setTime(d.getTime() + (cookie_duration*24*60*60*1000));
    c = c + ';expires=' + d.toGMTString();
  }
  document.cookie = c; 

  // Open popup
  setTimeout('popPromo(\"' + url + '\", ' + width + ', ' + height + ', \'' + scrollbars + '\')', Math.max(wait, 1));
}

// Helpers for popup (used by writePopup)
function popPromo(url, width, height) {
  win = window.open('', 'promo', 'toolbar=no,location=no,status=0,menubar=0,scrollbars=no,resizable=no,width=' + width + ',height=' + height);
  win.resizeTo(width, height);
  win.focus();
  win.location.href = url;
}

function popPromo(url, width, height, scrollbars) {
  win = window.open('', 'promo', 'toolbar=no,location=no,status=0,menubar=0,scrollbars=' + scrollbars + ',resizable=no,width=' + width + ',height=' + height);
  win.resizeTo(width, height);
  win.focus();
  win.location.href = url;
}


function ConfirmDisconnect(f){
	if(confirm("Souhaitez-vous vous déconnecter ?") == true ) 
	{ 
		window.location.href=f; 
	} 
}	
	
function popup(adresse) { 
	window.open(adresse,'_popup','resizable=no,scrollbars=yes,toolbar=no,menubar=no,personnalbar=no,width=550,height=450');
}  


//-----------------------------------------------------------------------------
// New Window
function popLargeWindow(url, width, height) {
  win = window.open('', 'Largepromo', 'toolbar=yes,location=yes,status=1,menubar=1,scrollbars=yes,resizable=yes,width=' + width + ',height=' + height);
  win.resizeTo(width, height);
  win.focus();
  win.location.href = url;
}
//-----------------------------------------------------------------------------
// Helper for popup
function popLargePromo(url, width, height) {
  win = window.open('', 'Largepromo', 'toolbar=no,location=no,status=0,menubar=0,scrollbars=yes,resizable=yes,width=' + width + ',height=' + height);
  win.resizeTo(width, height);
  win.focus();
  win.location.href = url;
}
//-----------------------------------------------------------------------------
// popup scroll
function popLargePromoScroll(url, width, height) {
  win = window.open('', 'Largepromo', 'toolbar=no,location=no,status=0,menubar=0,scrollbars=yes,resizable=yes,width=' + width + ',height=' + height);
  win.resizeTo(width, height);
  win.focus();
  win.location.href = url;
  win.scrollBy(0, 500);
}

//-----------------------------------------------------------------------------
// create non crawlable link
function link() {
   var l = '';
   for (i = 0; i < arguments.length; i++) { 
      l = l + arguments[i].replace(/\|/g,'/');
   }
   if (l.charAt(0)=='#') l = l.substring(1,l.length);
   window.open(l);
}
// create non crawlable link width option
function link_options() {
    var l = '';
    for (i = 0; i < arguments.length; i++) {
        l = l + arguments[i].replace(/\|/g, '/');
    }
    if (l.charAt(0) == '#') l = l.substring(1, l.length);
    return l;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// create non crawlable link non pop
function selflink() {
   var l  = '';
   for (i = 0; i < arguments.length; i++) { 
      l = l + arguments[i].replace(/\|/g,'/');
   }
   if (l.charAt(0)=='#') l = l.substring(1,l.length);
   window.location.href=l;//specialescape(l);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// return url from non crawlable link
function unlink(str) {
	str = str.replace('javascript:void selflink(','');
	str = str.replace('javascript:void%20selflink(','');
	str = str.replace(')','');
	str = str.replace(/\|/g,'/');
	str = str.replace(/\'/g,'');
	str = str.replace(/\,/g,'');
   return str;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------

	var nflinks = {
	
	_base16: "0A12B34C56D78E9F",

	encode: function (str)
	{
		var retour="";
		for(var i=0;i<str.length;i++)
		{
			var cc=str.charCodeAt(i);
			var ch=cc>>4;
			var cl=cc-(ch*16);
			retour+=this._base16[ch]+this._base16[cl];
		}
		return "Javascript:selflink('"+retour+"');";
	},

	decode: function (str)
	{
		var retour="";
		for(var i=0;i<str.length;i+=2)
		{
			var ch=this._base16.indexOf(str.charAt(i));
			var cl=this._base16.indexOf(str.charAt(i+1));
			retour+=String.fromCharCode((ch*16)+cl);
		}
		return retour;
	},
	
	init: function ()
	{
		var tagsA=document.getElementsByTagName("a");
		for(var i=0;i<tagsA.length;i++)
		{
			var linka=tagsA[i].href;
			if (linka.substring(0,21).toLowerCase() == "javascript:selflink('")
			{
				var r=linka.substring(21);
				var p=r.indexOf("'");
				if (p>0) { tagsA[i].href=this.decode(r.substring(0,p)); }
			}
		}
	}	
}
nflinks.init();

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------




function poplink() {
     var l = '';
     var options = 'scrollbars,resizable, width=' + arguments[arguments.length-2] + ',height=' + arguments[arguments.length-1];
     for (i = 0; i < arguments.length - 2; i++) {
        l = l + arguments[i];
     }
   if (l.charAt(0)=='#') l = l.substring(1,l.length);
    win = window.open(specialescape(l), 'poplink', options);
  if (win != null && win != 'null' && win != 'undefined')
      win.focus();
  }
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// escape some character
function specialescape(s) {
    // Don't treat cgi-style URLs because of all the '&' and likewise problems
    if (s.indexOf('?') == -1) {
        var sDomain = "";
        var sQuery  = s;
      
        // Strip off domain if exists (else we would encode the ':')
        // There might be port numbers ("http://some.domain.com:8080")!
        if (s.indexOf("://") != -1) {
            // 1st slash after the domain = beginning of query string
            var n = s.indexOf("/", s.indexOf("://")+3);
            if (n > -1) {
                sDomain = s.substring(0, n);
                sQuery  = s.substring(n);
            }
        }
        
        // Unescape (does nothing if it wasn't escaped, but if it was, we avoid double escaping)
        sQuery = unescape(sQuery);
        
        // Escape, so we don't rely on the browser to do this (some IE versions don't!)
        sQuery = escape(sQuery);
        
        // Rejoin with eventual domain
        s = sDomain + sQuery;
    }
    return s;   
}


// Before you reuse this script you may want to have your head examined
// 
// Copyright 1999 InsideDHTML.com, LLC.  
function doBlink() {
  // Blink, Blink, Blink...
  var blink = document.getElementsByTagName("BLINK");
  if (blink.length != 0) {
	for (var i=0; i < blink.length; i++)
		blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" ;
	}
} 
function startBlink() {
  // Make sure it is IE4
  if (document.all)
    setInterval("doBlink()",500);
}
window.onload = startBlink;



	
function vider_cache(xmlhttp){
	var xmlhttp = xmlhttp;
	xmlhttp.setRequestHeader("Pragma","no-cache");
	xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
}

	
function getHTTPObject() 
{
	var xmlhttp=false;
    try
    {  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
	}catch (e)
    {try
		{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch (e){xmlhttp = false;}
    }
         
    if (!xmlhttp && typeof XMLHttpRequest != "undefined")
         {xmlhttp = new XMLHttpRequest();
         }

	return xmlhttp;	 
}


function ValidateFromIdentification(form){
    var bad_enter = new Array();
    var j         = 0;
    var y         = "";
    var missing_fields = new Array();
    var i              = 0;
    var x              = "";
	if (form.Mot_de_passe.value ==''){
		missing_fields[i] = "Mot de passe ";
        i = i + 1;
    }   
    if (form.email.value ==''){
		missing_fields[i] = "E-mail ";
        i = i + 1;
    } 
	// alert sending
	if ((i > 0) || (j >0)){
	    for (var i=0; i<missing_fields.length; i++)
		    var x = x + "\t" + missing_fields[i] + "\n";
		for (var j=0; j<bad_enter.length; j++)
		    var y = y + "\t" + bad_enter[j] + "\n";
		var message = "";
		if (x!="") { message = "Les informations suivantes sont manquantes :\n" + x; }
		if ((x!="") && (y!="")) { message = message + "\n"; }
		if (y!="") { message = message + "Les informations suivantes sont incorrectes :\n" + y; }
		message =  message + "\n\n Si vous ne vous rappelez pas de votre mot de passe \n cliquez sur le lien \"Mot de passe oublié?\""
		alert(message);
		return(false);
	}
	// for fast_app_accept
	return(true);
}


function Simplifier(s,sans_espace) {
s = s = s.replace(/Á/g, "A");
s = s.replace(/Â/g, "A");
s = s.replace(/Ã/g, "A");
s = s.replace(/Ä/g, "A");
s = s.replace(/Å/g, "A");
s = s.replace(/Æ/g, "AE");
s = s.replace(/Ç/g, "C");
s = s.replace(/È/g, "E");
s = s.replace(/É/g, "E");
s = s.replace(/Ê/g, "E");
s = s.replace(/Ë/g, "E");
s = s.replace(/Ì/g, "I");
s = s.replace(/Î/g, "I");
s = s.replace(/Ï/g, "I");
s = s.replace(/Ð/g, "D");
s = s.replace(/Ñ/g, "N");
s = s.replace(/Ò/g, "O");
s = s.replace(/Ó/g, "O");
s = s.replace(/Ô/g, "O");
s = s.replace(/Ö/g, "O");
s = s.replace(/Õ/g, "O");
s = s.replace(/Ø/g, "O");
s = s.replace(/Ù/g, "U");
s = s.replace(/Ú/g, "U");
s = s.replace(/Û/g, "U");
s = s.replace(/Ü/g, "U");
s = s.replace(/Ý/g, "Y");
s = s.replace(/Ÿ/g, "Y");
s = s.replace(/ß/g, "S");
s = s.replace(/è/g, "e");
s = s.replace(/é/g, "e");
s = s.replace(/&#231;/g, "c");
s = s.replace(/&#231;/g, "c");
s = s.replace(/&#199;/g, "C");
s = s.replace(/&#224;/g, "a");
s = s.replace(/&#225;/g, "a");
s = s.replace(/&#226;/g, "a");
s = s.replace(/&#227;/g, "a");
s = s.replace(/&#228;/g, "a");
s = s.replace(/&#229;/g, "a");
s = s.replace(/&#232;/g, "e");
s = s.replace(/&#233;/g, "e");
s = s.replace(/&#234;/g, "e");
s = s.replace(/&#235;/g, "e");
s = s.replace(/&#236;/g, "i");
s = s.replace(/&#237;/g, "i");
s = s.replace(/&#238;/g, "i");
s = s.replace(/&#239;/g, "i");
s = s.replace(/&#242;/g, "o");
s = s.replace(/&#243;/g, "o");
s = s.replace(/&#244;/g, "o");
s = s.replace(/&#245;/g, "o");
s = s.replace(/&#246;/g, "o");
s = s.replace(/&#249;/g, "u");
s = s.replace(/&#250;/g, "u");
s = s.replace(/&#251;/g, "u");
s = s.replace(/&#252;/g, "u");
s = s.replace(/&#192;/g,"A");
s = s.replace(/&#193;/g,"A");
s = s.replace(/&#194;/g,"A");
s = s.replace(/&#195;/g,"A");
s = s.replace(/&#196;/g,"A");
s = s.replace(/&#197;/g,"A");
s = s.replace(/&#200;/g,"E");
s = s.replace(/&#201;/g,"E");
s = s.replace(/&#202;/g,"E");
s = s.replace(/&#203;/g,"E");
s = s.replace(/&#204;/g,"I");
s = s.replace(/&#205;/g,"I");
s = s.replace(/&#206;/g,"I");
s = s.replace(/&#207;/g,"I");
s = s.replace(/&#210;/g,"O");
s = s.replace(/&#211;/g,"O");
s = s.replace(/&#212;/g,"O");
s = s.replace(/&#213;/g,"O");
s = s.replace(/&#214;/g,"O");
s = s.replace(/&#217;/g,"U");
s = s.replace(/&#218;/g,"U");
s = s.replace(/&#219;/g,"U");
s = s.replace(/&#220;/g,"U");
s = s.replace(/ê/g, "e");
s = s.replace(/ë/g, "e");
s = s.replace(/à/g, "a");
s = s.replace(/á/g, "a");
s = s.replace(/â/g, "a");
s = s.replace(/ã/g, "a");
s = s.replace(/ä/g, "a");
s = s.replace(/å/g, "a");
s = s.replace(/æ/g, "ae");
s = s.replace(/œ/g, "oe");
s = s.replace(/ç/g, "c");
s = s.replace(/ì/g, "i");
s = s.replace(/í/g, "i");
s = s.replace(/î/g, "i");
s = s.replace(/ï/g, "i");
s = s.replace(/ò/g, "o");
s = s.replace(/ó/g, "o");
s = s.replace(/ô/g, "o");
s = s.replace(/õ/g, "o");
s = s.replace(/ö/g, "o");
s = s.replace(/ù/g, "u");
s = s.replace(/ú/g, "u");
s = s.replace(/û/g, "u");
s = s.replace(/ü/g, "u");
s = s.replace(/ý/g, "y");
s = s.replace(/ÿ/g, "y");


 	if (sans_espace) {
		s = s.replace(/'/g, " ");
		s = s.replace(/’/g, " ");
		s = s.replace(/ /g, "-");
		s = s.replace(/[.]/g, "");
		s = s.replace(/[?]/g, "");
		s = s.replace(/[!]/g, "");
		s = s.replace(/,/g, "");
		s = s.replace(/;/g, "");
		s = s.replace(/:/g, "");
		s = s.replace(/--/g, "-");
	}


//alert(s);

return s;

}




function affiche_espace_perso(element,onglet,rubrique,page) {
	 //alert(element);
	 var xmlhttp = getHTTPObject();
  	 var element1 = document.getElementById(element);
	 if (element1) {
		 element1.innerHTML = '';
		 var D = new Date();
		 xmlhttp.open('GET', '/v2/includes/common/espace_perso.asp?onglet='+onglet+'&rubrique='+rubrique+'&page='+page+'&'+D.getTime(), true);	
		 vider_cache(xmlhttp);
		 xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
						 var reponse = xmlhttp.responseText;
			   //if (reponse.indexOf('boiteNavGauche')>=0) {
					//il y a quelque chose dans le caddie
				   element1.style.display="block";
				   element1.innerHTML = reponse;
				/*}
			   else
			   {
					element1.style.display="none";
				}*/
			}
			else
			{
			}
		}
		xmlhttp.send(null); 
	}
}



autoriseCaracteres = function (texte_saisi, champ_value, type) {	
		var longueur = texte_saisi.length;
		var expression_reg;
		var masque;
		switch (type) {
			case "chiffres":
				masque = "0-9"
				break;
			case "lettresTirets":
				masque = "a-zA-Z\-";
				break;
			case "chiffresLettres":
				masque = "a-zA-Z0-9";
				break;
			case "chiffresLettresTirets":
				masque = "a-zA-Z0-9\-";
				break;
			default:
		
		}
		
		expression_reg = new RegExp("["+masque+"]{"+longueur+"}","g");
		
		if (!expression_reg.test(texte_saisi)) {
			document.getElementById(champ_value).value=texte_saisi.replace(expression_reg.compile("([^"+masque+"])+"), "");
		}

}

function lien_tracke(lien,partenaire,emplacement,campagne,domaine) {
	var str;
	str = "http://www.cadeaux.com/track.asp?partner="+partenaire+"&emplacement="+emplacement+"&url=";
	str += lien.href;
	str += "?utm_source="+partenaire+"%26utm_medium="+emplacement+"%26utm_campaign="+campagne;
	lien.href = str
	lien.target = "_blank";
	lien.onclick = null;
}

function show_bloc_sante(id,element){
	//blocs = document.getElementsByClassName("bloc_articles");
	blocs = $(".bloc_articles");
	blocsCount = blocs.length;
	//alert("Mouahah");
	for ( var t = 0; t < blocsCount; t++){
		blocs[t].style.display = "none";
		document.getElementById("onglet-"+id).className = "onglet"
		
	}
	//blocs = document.getElementsByClassName("onglet");
	blocs = $(".onglet");
	blocsCount = blocs.length;
	for ( var t = 0; t < blocsCount; t++){
		if(blocs[t].id == "menu-"+id){
			blocs[t].className = "onglet on";
		}else{
			blocs[t].className = "onglet";
		}
	}
	document.getElementById(id).style.display = "block";
	document.getElementById("onglet-"+id).className += " on";
	
}/**
 * FlashObject v1.3d: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof com=="undefined"){var com=new Object();}
if(typeof com.deconcept=="undefined"){com.deconcept=new Object();}
if(typeof com.deconcept.util=="undefined"){com.deconcept.util=new Object();}
if(typeof com.deconcept.FlashObjectUtil=="undefined"){com.deconcept.FlashObjectUtil=new Object();}
com.deconcept.FlashObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
	vvh=_5;
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
this.useExpressInstall=_7;
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 com.deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}
};
com.deconcept.FlashObject.prototype={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;
},createParamTag:function(n,v){
var p=document.createElement("param");
p.setAttribute("name",n);
p.setAttribute("value",v);
return p;
},getVariablePairs:function(){
var _19=new Array();
var key;
var _1b=this.getVariables();
for(key in _1b){_19.push(key+"="+_1b[key]);}
return _19;
},getFlashHTML:function(){
var _1c="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");
}
_1c="<embed wmode=\"transparent\" type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_1c+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1d=this.getParams();
for(var key in _1d){_1c+=[key]+"=\""+_1d[key]+"\" ";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_1c+="flashvars=\""+_1f+"\"";}
_1c+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_1c="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_1c+="<param name=\"wmode\" value=\"transparent\" /><param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _20=this.getParams();
for(var key in _20){_1c+="<param name=\""+key+"\" value=\""+_20[key]+"\" />";}
var _22=this.getVariablePairs().join("&");
if(_22.length>0){_1c+="<param name=\"flashvars\" value=\""+_22+"\" />";
}_1c+="</object>";}
return _1c;
},write:function(_23){
if(this.useExpressInstall){
var _24=new com.deconcept.PlayerVersion([vvh,0,0]);
if(this.installedVer.versionIsValid(_24)&&!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);}
}else{this.setAttribute("doExpressInstall",false);}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _23=="string")?document.getElementById(_23):_23;
n.innerHTML=this.getFlashHTML();
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}}};
com.deconcept.FlashObjectUtil.getPlayerVersion=function(_26,_27){
var _28=new com.deconcept.PlayerVersion(0,0,0);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_28=new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{
try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_28=new com.deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_26&&_28.major>_26.major){return _28;}
if(!_26||((_26.minor!=0||_26.rev!=0)&&_28.major==_26.major)||_28.major!=6||_27){
try{
_28=new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
}catch(e){}}}
return _28;
};

com.deconcept.FlashObject2=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
	vvh=_5;
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
this.useExpressInstall=_7;
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 com.deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}
};
com.deconcept.FlashObject2.prototype={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;
},createParamTag:function(n,v){
var p=document.createElement("param");
p.setAttribute("name",n);
p.setAttribute("value",v);
return p;
},getVariablePairs:function(){
var _19=new Array();
var key;
var _1b=this.getVariables();
for(key in _1b){_19.push(key+"="+_1b[key]);}
return _19;
},getFlashHTML:function(){
var _1c="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");
}
_1c="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_1c+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1d=this.getParams();
for(var key in _1d){_1c+=[key]+"=\""+_1d[key]+"\" ";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_1c+="flashvars=\""+_1f+"\"";}
_1c+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_1c="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_1c+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _20=this.getParams();
for(var key in _20){_1c+="<param name=\""+key+"\" value=\""+_20[key]+"\" />";}
var _22=this.getVariablePairs().join("&");
if(_22.length>0){_1c+="<param name=\"flashvars\" value=\""+_22+"\" />";
}_1c+="</object>";}
return _1c;
},write:function(_23){
if(this.useExpressInstall){
var _24=new com.deconcept.PlayerVersion([vvh,0,0]);
if(this.installedVer.versionIsValid(_24)&&!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);}
}else{this.setAttribute("doExpressInstall",false);}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _23=="string")?document.getElementById(_23):_23;
n.innerHTML=this.getFlashHTML();
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}}};


com.deconcept.PlayerVersion=function(_2c){
this.major=parseInt(_2c[0])||0;
this.minor=parseInt(_2c[1])||0;
this.rev=parseInt(_2c[2])||0;
};
com.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;
};
com.deconcept.util={getRequestParameter:function(_2e){
var q=document.location.search||document.location.hash;
if(q){var _30=q.indexOf(_2e+"=");
var _31=(q.indexOf("&",_30)>-1)?q.indexOf("&",_30):q.length;
if(q.length>1&&_30>-1){
return q.substring(q.indexOf("=",_30)+1,_31);}}return "";
},removeChildren:function(n){
while(n.hasChildNodes()){
n.removeChild(n.firstChild);}}};
if(Array.prototype.push==null){
Array.prototype.push=function(_33){
this[this.length]=_33;
return this.length;};}
var getQueryParamValue=com.deconcept.util.getRequestParameter;
var FlashObject=com.deconcept.FlashObject;
var FlashObject2=com.deconcept.FlashObject2;

function VersionNavigateur(Netscape, Explorer) {
	if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') || (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
		return true;
	else
		return false;
}

function Effet_on(Image, Opacite) {
	eval(Image + ".filters.alpha.opacity=" + Opacite)
}
function Effet_off(Image, Opacite) {
	eval(Image + ".filters.alpha.opacity=" + Opacite)
}

// Images transparentes

var first_opac = 60;
var sec_opac =100;
var opac = first_opac;
var speed = 6;
var si;
var cleared = true;

function showimage(what,doshow) {

if (document.all) {
  cleared = false;
  (doshow) ? opac+=speed : opac-=speed;
  eval(what+".filters.alpha.opacity="+opac);
  if (opac <= first_opac || opac >= sec_opac) {
    clearInterval(si);
    cleared = true;
  }
}

if (document.layers) clearInterval(si);
}

function ClearInt() {
if (!cleared) clearInterval(si);
}


/*	
SCRIPT EDITE SUR L'EDITEUR JAVACSRIPT
http://www.editeurjavascript.com

Merci à lord Gunthar
http://www.topweb.cc
*/

window.onload = function() {
    domok = document.getElementById;
	
	if (domok) {
		skn = document.getElementById("topdecklink").style;
		if(navigator.appName.substring(0,3) == "Net") document.captureEvents(Event.MOUSEMOVE);
		if (navigator.appVersion.indexOf("Mac") == -1) document.onmousemove = get_mouse;
	}
}





function poplink(msg,couleur_encadrement,couleur_fond) {
	//if (navigator.appVersion.indexOf("Mac") != -1) {
	//	return true;
	//} else {
		var content ="<table border='0' cellpadding='0' cellspacing='0' bgcolor='" + couleur_encadrement + "' width='130'><tr><td><table width='100%' border='0' cellpadding='2' cellspacing='1'><tr><td bgcolor='" + couleur_fond + "' align='justify' class=popup>"+msg+"</td></tr></table></td></tr></table>";
		if (domok) {
		  	document.getElementById("topdecklink").innerHTML = content;
		  	skn.visibility = "visible";
			skn.display = "inline";
	  	}
	//}
}

function poplink2(msg,class_encadrement,class_fond) {
	//if (navigator.appVersion.indexOf("Mac") != -1) {
	//	return true;
	//} else {
		var content ="<table border='0' cellpadding='0' cellspacing='0' class='" + class_encadrement + "' width='130'><tr><td><table width='100%' border='0' cellpadding='2' cellspacing='1'><tr><td class='" + class_fond + "' align='justify' class=popup>"+msg+"</td></tr></table></td></tr></table>";
		if (domok) {
		  	document.getElementById("topdecklink").innerHTML = content;
		  	skn.visibility = "visible";
			skn.display = "inline";
	  	}
	//}
}

function get_mouse(e) {
	var x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
	var y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
	skn.left = x - 60;
	skn.top = y+20;
}

function killlink() {
	if (domok) 
	{
		skn.visibility = "hidden";
		skn.display = "none";
	}
		
}

function popup(file,tx,ty) {
 	myWindow= open(file, "newWindow", "width="+tx+",height="+ty+",menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
}

function doublequotesetting(initialstring) {
    var quotemodel = /'/g;
    var doublequotemodel = /\"/g;
    var finalstring;
    finalstring = initialstring.replace(quotemodel, "''");
    finalstring = finalstring.replace(doublequotemodel, "\"\"");
    return (finalstring);
}

function formatinputstring(initialstring, regularexpression) {
    var quotemodel = /'/g;
    var finalstring;
    finalstring = initialstring.replace(regularexpression, "_");
    // finalstring = finalstring.replace(quotemodel,"''");
    return (finalstring);
}// KDO Carroussel pour media 
KDO_Slides = function (a) { this.slideconf = a; this.initslides = function (a) { this.kdosld = { initslides: function (a) { this.conf = a; this.jetonlibre = true; this.data = new Array(this.conf.size); for (var b = 0; b < this.conf.size; b++) { this.data[b] = b } var c = new Array(this.conf.size / 2 - 1); for (var b = 0; b < this.conf.size / 2; b++) { c[b] = new Array; var d = jQuery("#" + this.conf.idiv + " .visuels .deux-blocs:eq(" + b + ")").position(); c[b][0] = d.left + "px"; c[b][1] = d.top + "px" } this.pos = c; for (var b = 0; b < this.conf.size / 2; b++) { jQuery("#" + this.conf.idiv + " .visuels .deux-blocs:eq(" + b + ")").removeClass("col" + b).css({ position: "absolute", top: c[b][1], left: c[b][0] }) } this.initcontent(false, ""); var e = this; jQuery("#" + this.conf.idiv + " .zone-visuels-produits" + this.conf.size + " .kdoslidesprev").click(function () { e.move("prev") }); jQuery("#" + this.conf.idiv + " .zone-visuels-produits" + this.conf.size + " .kdoslidesnext").click(function () { e.move("next") }); if (this.conf.startanim) this.start() }, start: function () { var a = this; if (this.conf.timerecycle > 0) { this.mytimer = window.setInterval(function () { if (a.jetonlibre) { a.move("next") } }, this.conf.timerecycle) } }, move: function (a) { if (this.jetonlibre) { this.jetonlibre = false; var b = this; b.initcontent(true, a) } }, initcontent: function (a, b) { if (!a) this.fillcontent(false, ""); else { this.fillcontent(true, b) } }, filldata: function (a) { jQuery("#" + this.conf.idiv + " .bloc-infos .nom-produit").hide().html(this.conf.data[this.data[0]].nom_produit).fadeIn(300); jQuery("#" + this.conf.idiv + " .bloc-infos .etat-produit").html(this.conf.data[this.data[0]].etat); jQuery("#" + this.conf.idiv + " .bloc-infos .url-produit").attr("href", "http://www.cadeaux.com" + this.conf.data[this.data[0]].url); vnote = ""; if (this.conf.data[this.data[0]].note1 != "") vnote = '<img src="http://media.notrefamille.com/images/environnement/notrefamille/pictos/etoile_' + Math.floor(this.conf.data[this.data[0]].note1 / 10) + '.0.gif"><br>'; jQuery("#" + this.conf.idiv + " .bloc-infos .avis:eq(0)").hide().html(vnote + this.conf.data[this.data[0]].commentaire1 + " <strong>" + this.conf.data[this.data[0]].pseudo1 + "</strong>").fadeIn(300); if (this.conf.data[this.data[0]].note2 != "") vnote = '<img src="http://media.notrefamille.com/images/environnement/notrefamille/pictos/etoile_' + Math.floor(this.conf.data[this.data[0]].note2 / 10) + '.0.gif"><br>'; jQuery("#" + this.conf.idiv + " .bloc-infos .avis:eq(1)").hide().html(vnote + this.conf.data[this.data[0]].commentaire2 + " <strong>" + this.conf.data[this.data[0]].pseudo2 + "</strong>").fadeIn(300); if (!a) { for (var b = 0; b < this.conf.size; b++) { var c = jQuery(this.getcontentproduit(b)).html(); jQuery("#" + this.conf.idiv + " .visuels .deux-blocs:eq(" + Math.floor(b / 2) + ") .slidebloc:eq(" + b % 2 + ")").html(c) } } }, getcontentproduit: function (a) { var b = ""; b = this.conf.htmlproduit; b = b.replace(/%nom_produit%/gi, this.conf.data[this.data[a]].nom_produit); b = b.replace(/%url_produit%/gi, this.conf.data[this.data[a]].url); b = b.replace(/%visuel_produit%/gi, this.conf.data[this.data[a]].visuel_produit); b = b.replace(/%etat_produit%/gi, this.conf.data[this.data[a]].etat); return b }, fillcontent: function (a, b) { this.jetonlibre = false; var c = this; if (b == "next" || b == "prev") { var d = this.pos; var e, f; var g = 0, h = 0; if (b == "prev") e = jQuery("#" + this.conf.idiv + " .visuels .deux-blocs").last(); else if (b == "next") { e = jQuery("#" + this.conf.idiv + " .visuels .deux-blocs").first(); g = this.conf.size - 2; h = this.conf.size / 2 - 1 } var i = 0; e.stop().find(".slidebloc").hide("scale", { percent: 5 }, this.conf.time, function () { if (i == 1) e.stop().hide(0, function () { jQuery(this).remove(); c.new_positions(b); c.filldata(a); var e = "<div class='deux-blocs' style='display:none;position:absolute'>" + c.getcontentproduit(g) + c.getcontentproduit(g + 1) + "</div>"; if (b == "next") jQuery(e).css({ top: d[h][1], left: d[h][0] }).appendTo("#" + c.conf.idiv + " .visuels"); else if (b == "prev") jQuery(e).css({ top: d[0][1], left: d[0][0] }).insertBefore("#" + c.conf.idiv + " .visuels .deux-blocs:eq(0)"); jQuery("#" + c.conf.idiv + " .visuels .deux-blocs").each(function (a) { jQuery(this).animate({ top: d[a][1], left: d[a][0] }, c.conf.time, function () { if (a == h) { jQuery(this).show().find(".slidebloc").show("scale", { percent: 100 }, c.conf.time) } }) }) }); i++ }); this.jetonlibre = true } else { this.new_positions(b); this.filldata(a); this.jetonlibre = true } }, new_positions: function (a) { var b = 0; var c = 0; var d = 0; var e = 0; switch (a) { case "next": b = 2; c = this.conf.data.length - 1; d = 0; e = 1; break; case "prev": b = -2; c = 0; d = this.conf.data.length - 2; e = -1; break } if (b != 0) { for (var f = 0; f < this.conf.size; f++) { var g = 0; if (e * (this.data[f] + b - c) > 0) if (f % 2 == 0) g = d; else g = d + 1; else g = this.data[f] + b; this.data[f] = g } } } }; this.kdosld.initslides(this.slideconf) }; this.startslide = function () { this.initslides(this.slideconf) } } // easing plugin
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,d,a,b,c){return jQuery.easing[jQuery.easing.def](e,d,a,b,c)},easeInQuad:function(e,a,b,c,d){return c*(a/=d)*a+b},easeOutQuad:function(e,a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOutQuad:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},easeInCubic:function(e,a,b,c,d){return c*(a/=d)*a*a+b},easeOutCubic:function(e,a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},easeInOutCubic:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},easeInQuart:function(e,a,b,c,d){return c*(a/=d)*a*a*a+b},easeOutQuart:function(e,a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},easeInOutQuart:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(e,a,b,c,d){return c*(a/=d)*a*a*a*a+b},easeOutQuint:function(e,a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},easeInOutQuint:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(e,d,b,a,c){return-a*Math.cos(d/c*(Math.PI/2))+a+b},easeOutSine:function(e,d,a,b,c){return b*Math.sin(d/c*(Math.PI/2))+a},easeInOutSine:function(e,d,a,b,c){return-b/2*(Math.cos(Math.PI*d/c)-1)+a},easeInExpo:function(e,b,a,c,d){return b==0?a:c*Math.pow(2,10*(b/d-1))+a},easeOutExpo:function(e,d,a,b,c){return d==c?a+b:b*(-Math.pow(2,-10*d/c)+1)+a},easeInOutExpo:function(e,a,b,c,d){return a==0?b:a==d?b+c:(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(e,a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b},easeOutCirc:function(e,a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},easeInOutCirc:function(e,a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(h,d,e,a,f){var g=1.70158,b=0,c=a;if(d==0)return e;if((d/=f)==1)return e+a;if(!b)b=f*.3;if(c<Math.abs(a)){c=a;var g=b/4}else var g=b/(2*Math.PI)*Math.asin(a/c);return-(c*Math.pow(2,10*(d-=1))*Math.sin((d*f-g)*2*Math.PI/b))+e},easeOutElastic:function(h,d,e,a,f){var g=1.70158,b=0,c=a;if(d==0)return e;if((d/=f)==1)return e+a;if(!b)b=f*.3;if(c<Math.abs(a)){c=a;var g=b/4}else var g=b/(2*Math.PI)*Math.asin(a/c);return c*Math.pow(2,-10*d)*Math.sin((d*f-g)*2*Math.PI/b)+a+e},easeInOutElastic:function(h,a,e,b,f){var g=1.70158,c=0,d=b;if(a==0)return e;if((a/=f/2)==2)return e+b;if(!c)c=f*.3*1.5;if(d<Math.abs(b)){d=b;var g=c/4}else var g=c/(2*Math.PI)*Math.asin(b/d);return a<1?-.5*d*Math.pow(2,10*(a-=1))*Math.sin((a*f-g)*2*Math.PI/c)+e:d*Math.pow(2,-10*(a-=1))*Math.sin((a*f-g)*2*Math.PI/c)*.5+b+e},easeInBack:function(f,b,c,d,e,a){if(a==undefined)a=1.70158;return d*(b/=e)*b*((a+1)*b-a)+c},easeOutBack:function(f,b,c,d,e,a){if(a==undefined)a=1.70158;return d*((b=b/e-1)*b*((a+1)*b+a)+1)+c},easeInOutBack:function(f,a,c,d,e,b){if(b==undefined)b=1.70158;return(a/=e/2)<1?d/2*a*a*(((b*=1.525)+1)*a-b)+c:d/2*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)+c},easeInBounce:function(e,d,c,a,b){return a-jQuery.easing.easeOutBounce(e,b-d,0,a,b)+c},easeOutBounce:function(e,a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},easeInOutBounce:function(e,c,d,b,a){return c<a/2?jQuery.easing.easeInBounce(e,c*2,0,b,a)*.5+d:jQuery.easing.easeOutBounce(e,c*2-a,0,b,a)*.5+b*.5+d}});
// url plugin
function URLEncode(a){var d="",b=0;a=a.toString();var g=/(^[a-zA-Z0-9_.]*)/;while(b<a.length){var c=g.exec(a.substr(b));if(c!=null&&c.length>1&&c[1]!=""){d+=c[1];b+=c[1].length}else{if(a[b]==" ")d+="+";else{var f=a.charCodeAt(b),e=f.toString(16);d+="%"+(e.length<2?"0":"")+e.toUpperCase()}b++}}return d}jQuery.url=function(){function b(c){for(var d="",a=0,b=0,e=0;a<c.length;){b=c.charCodeAt(a);if(b<128){d+=String.fromCharCode(b);a++}else if(b>191&&b<224){e=c.charCodeAt(a+1);d+=String.fromCharCode((b&31)<<6|e&63);a+=2}else{e=c.charCodeAt(a+1);c3=c.charCodeAt(a+2);d+=String.fromCharCode((b&15)<<12|(e&63)<<6|c3&63);a+=3}}return d}function c(e,c){var b={},d={"true":true,"false":false,"null":null};$.each(e.replace(/\+/g," ").split("&"),function(g,j){var e=j.split("=");g=a(e[0]);j=b;var i=0,f=g.split("]["),h=f.length-1;if(/\[/.test(f[0])&&/\]$/.test(f[h])){f[h]=f[h].replace(/\]$/,"");f=f.shift().split("[").concat(f);h=f.length-1}else h=0;if(e.length===2){e=a(e[1]);if(c)e=e&&!isNaN(e)?+e:e==="undefined"?undefined:d[e]!==undefined?d[e]:e;if(h)for(;i<=h;i++){g=f[i]===""?j.length:f[i];j=j[g]=i<h?j[g]||(f[i+1]&&isNaN(f[i+1])?{}:[]):e}else if($.isArray(b[g]))b[g].push(e);else b[g]=b[g]!==undefined?[b[g],e]:e}else if(g)b[g]=c?undefined:""});return b}function d(a){a=a||window.location;var e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];a=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(a);for(var b={},d=e.length;d--;)b[e[d]]=a[d]||"";if(b.query)b.params=c(b.query,true);return b}function e(a){if(a.source)return encodeURI(a.source);var b=[];if(a.protocol)if(a.protocol=="file")b.push("file:///");else a.protocol=="mailto"?b.push("mailto:"):b.push(a.protocol+"://");if(a.authority)b.push(a.authority);else{if(a.userInfo)b.push(a.userInfo+"@");else if(a.user){b.push(a.user);a.password&&b.push(":"+a.password);b.push("@")}if(a.host){b.push(a.host);a.port&&b.push(":"+a.port)}}if(a.path)b.push(a.path);else{a.directory&&b.push(a.directory);a.file&&b.push(a.file)}if(a.query)b.push("?"+a.query);else a.params&&b.push("?"+$.param(a.params));a.anchor&&b.push("#"+a.anchor);return b.join("")}function f(a){return encodeURIComponent(a)}function a(a){a=a||window.location.toString();return b(unescape(a.replace(/\+/g," ")))}return{encode:f,decode:a,parse:d,build:e}}();
// sort plugin
jQuery.fn.sort=function(){var a=[].sort;return function(c,b){b=b||function(){return this};var d=this.map(function(){var d=b.call(this),a=d.parentNode,c=a.insertBefore(document.createTextNode(""),d.nextSibling);return function(){if(a===this)throw new Error("You can't sort elements if any one is a descendant of another.");a.insertBefore(this,c);a.removeChild(c)}});return a.call(this,c).each(function(a){d[a].call(b.call(this))})}}();
//jNice plugin
(function(a){a.fn.jNice=function(){var d=this,g=a.browser.safari;a(document).mousedown(f);return this.each(function(){a("select",this).each(function(a){c(this,a)});a(this).bind("reset",function(){var a=function(){e(this)};window.setTimeout(a,2)});a(".jNiceHidden").css({opacity:0})})};var e=function(b){var c;a(".jNiceSelectWrapper select",b).each(function(){c=this.selectedIndex<0?0:this.selectedIndex;a("ul",a(this).parent()).each(function(){a("a:eq("+c+")",this).click()})});a("a.jNiceCheckbox, a.jNiceRadio",b).removeClass("jNiceChecked");a("input:checkbox, input:radio",b).each(function(){this.checked&&a("a",a(this).parent()).addClass("jNiceChecked")})},h=function(){var c=a(this).addClass("jNiceHidden").wrap('<span class="jRadioWrapper jNiceWrapper"></span>'),d=c.parent(),b=a('<span class="jNiceRadio"></span>');d.prepend(b);b.click(function(){var b=a(this).addClass("jNiceChecked").siblings("input").attr("checked",true);a('input:radio[name="'+b.attr("name")+'"]').not(b).each(function(){a(this).attr("checked",false).siblings(".jNiceRadio").removeClass("jNiceChecked")});return false});c.click(function(){if(this.checked){var b=a(this).siblings(".jNiceRadio").addClass("jNiceChecked").end();a('input:radio[name="'+b.attr("name")+'"]').not(b).each(function(){a(this).attr("checked",false).siblings(".jNiceRadio").removeClass("jNiceChecked")})}}).focus(function(){b.addClass("jNiceFocus")}).blur(function(){b.removeClass("jNiceFocus")});this.checked&&b.addClass("jNiceChecked")},i=function(){var c=a(this).addClass("jNiceHidden").wrap('<span class="jNiceWrapper"></span>'),d=c.parent().append('<span class="jNiceCheckbox"></span>'),b=d.find(".jNiceCheckbox").click(function(){var b=a(this),c=b.siblings("input")[0];if(c.checked===true){c.checked=false;b.removeClass("jNiceChecked")}else{c.checked=true;b.addClass("jNiceChecked")}return false});c.click(function(){if(this.checked)b.addClass("jNiceChecked");else b.removeClass("jNiceChecked")}).focus(function(){b.addClass("jNiceFocus")}).blur(function(){b.removeClass("jNiceFocus")});this.checked&&a(".jNiceCheckbox",d).addClass("jNiceChecked")},j=function(){var b=a(this).addClass("jNiceInput").wrap('<div class="jNiceInputWrapper"><div class="jNiceInputInner"></div></div>'),c=b.parents(".jNiceInputWrapper");b.focus(function(){c.addClass("jNiceInputWrapper_hover")}).blur(function(){c.removeClass("jNiceInputWrapper_hover")})},k=function(){var b=a(this).attr("value");a(this).replaceWith('<button id="'+this.id+'" name="'+this.name+'" type="'+this.type+'" class="'+this.className+'" value="'+b+'"><span><span>'+b+"</span></span>")},b=function(){a(".jNiceSelectWrapper ul:visible").hide()},f=function(c){a(c.target).parents(".jNiceSelectWrapper").length===0&&b()},c=function(g,f){var c=a(g);f=f||c.css("zIndex")*1;f=f?f:0;c.wrap(a('<div class="jNiceWrapper"></div>').css({zIndex:100-f}));var h=c.width();c.addClass("jNiceHidden").after('<div class="jNiceSelectWrapper"><div><span class="jNiceSelectText"></span><span class="jNiceSelectOpen"></span></div><ul></ul></div>');var e=a(g).siblings(".jNiceSelectWrapper").css({width:h+"px"});a(".jNiceSelectText, .jNiceSelectWrapper ul",e).width(h-a(".jNiceSelectOpen",e).width());a.browser.msie&&jQuery.browser.version<7&&c.after(a('<iframe src="javascript:\'\';" marginwidth="0" marginheight="0" align="bottom" scrolling="no" tabIndex="-1" frameborder="0"></iframe>').css({height:c.height()+4+"px",width:c.width()+"px"}));d(g);a("div",e).click(function(){var c=a(this).siblings("ul");c.css("display")=="none"&&b();c.slideToggle();var d=a("a.selected",c).offset().top-c.offset().top;c.css({scrollTop:d});return false});c.keydown(function(d){var b=this.selectedIndex;switch(d.keyCode){case 40:if(b<this.options.length-1)b+=1;break;case 38:if(b>0)b-=1;break;default:return}a("ul a",e).removeClass("selected").eq(b).addClass("selected");a("span:eq(0)",e).html(a("option:eq("+b+")",c).attr("selected","selected").text());return false}).focus(function(){e.addClass("jNiceFocus")}).blur(function(){e.removeClass("jNiceFocus")})},d=function(e){var b=a(e),d=b.siblings(".jNiceSelectWrapper"),c=d.find("ul").find("li").remove().end().hide();a("option",b).each(function(a){c.append('<li><a href="#" index="'+a+'">'+this.text+"</a></li>")});c.find("a").click(function(){a("a.selected",d).removeClass("selected");a(this).addClass("selected");var e=b[0];if(b[0].selectedIndex!=a(this).attr("index")){b[0].selectedIndex=a(this).attr("index");b[0].value=e[a(this).attr("index")].value;b.val(e[a(this).attr("index")].value);b.trigger("change")}b[0].selectedIndex=a(this).attr("index");a("span:eq(0)",d).html(a(this).html());c.hide();return false});a("a:eq("+b[0].selectedIndex+")",c).click()},g=function(b){var c=a(b).siblings(".jNiceSelectWrapper").css("zIndex");a(b).css({zIndex:c}).removeClass("jNiceHidden");a(b).siblings(".jNiceSelectWrapper").remove()};a.jNice={SelectAdd:function(a,b){c(a,b)},SelectRemove:function(a){g(a)},SelectUpdate:function(a){d(a)}};!(a.browser.msie&&jQuery.browser.version<7)&&a(function(){a("form.jNice,#rkdotriform").jNice()})})(jQuery);
// ajax plugin ??
function sack(file){this.AjaxFailedAlert="Your browser does not support the enhanced functionality of this website, and therefore you will have an experience that differs from the intended one.\n";this.requestFile=file;this.method="POST";this.URLString="";this.encodeURIString=true;this.execute=false;this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){this.xmlhttp=null}}if(!this.xmlhttp&&typeof XMLHttpRequest!="undefined")this.xmlhttp=new XMLHttpRequest;if(!this.xmlhttp)this.failed=true};this.setVar=function(a,b){if(this.URLString.length<3)this.URLString=a+"="+b;else this.URLString+="&"+a+"="+b};this.encVar=function(a,b){return encodeURIComponent(a)+"="+encodeURIComponent(b)};this.encodeURLString=function(a){varArray=a.split("&");for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(urlVars[0].indexOf("amp;")!=-1)urlVars[0]=urlVars[0].substring(4);varArray[i]=this.encVar(urlVars[0],urlVars[1])}return varArray.join("&")};this.runResponse=function(){eval(this.response)};this.runAJAX=function(b){this.responseStatus=new Array(2);if(this.failed&&this.AjaxFailedAlert)alert(this.AjaxFailedAlert);else{if(b)if(this.URLString.length)this.URLString=this.URLString+"&"+b;else this.URLString=b;if(this.encodeURIString){var c=+new Date;this.URLString=this.encodeURLString(this.URLString);this.setVar("rndval",c)}if(this.element)this.elementObj=document.getElementById(this.element);if(this.xmlhttp){var a=this;if(this.method=="GET"){var d=this.requestFile+"?"+this.URLString;this.xmlhttp.open(this.method,d,true)}else this.xmlhttp.open(this.method,this.requestFile,true);if(this.method=="POST")try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}this.xmlhttp.send(this.URLString);this.xmlhttp.onreadystatechange=function(){switch(a.xmlhttp.readyState){case 1:a.onLoading();break;case 2:a.onLoaded();break;case 3:a.onInteractive();break;case 4:a.response=a.xmlhttp.responseText;a.responseXML=a.xmlhttp.responseXML;a.responseStatus[0]=a.xmlhttp.status;a.responseStatus[1]=a.xmlhttp.statusText;a.onCompletion();a.execute&&a.runResponse();if(a.elementObj){var b=a.elementObj.nodeName;b.toLowerCase();if(b=="input"||b=="select"||b=="option"||b=="textarea")a.elementObj.value=a.response;else a.elementObj.innerHTML=a.response}a.URLString=""}}}}};this.createAJAX()}
// controls check lib pour KDO
function affiche_caddie(c){var a=getHTTPObject(),b=document.getElementById(c);b.innerHTML="";var d=new Date;a.open("GET","/v2/includes/common/caddie.asp?"+d.getTime(),true);vider_cache(a);a.onreadystatechange=function(){if(a.readyState==4&&a.status==200){var c=a.responseText;if(c.indexOf("boiteNavGauche")>=0){b.style.display="block";b.innerHTML=c}else b.style.display="none"}};a.send(null)}function createCookie(e,d,c){var b="";if(c){var a=new Date;a.setTime(a.getTime()+c*864e5);b="; expires="+a.toGMTString()}document.cookie=e+"="+d+b+"; path=/"}function readCookie(e){for(var c=e+"=",d=document.cookie.split(";"),b=0;b<d.length;b++){var a=d[b];while(a.charAt(0)==" ")a=a.substring(1,a.length);if(a.indexOf(c)==0)return a.substring(c.length,a.length)}return null}function eraseCookie(a){createCookie(a,"",-1)}function affiche_tab(b){for(var c="",a=0,a=0;a<b.length;a++)c+=b[a][0]+" : "+b[a][1]+"\n";return c}(function(a){a.fn.SortTab=function(b){var f={filtre_sort:"span.fcontent",inverse:true,spanup:"<span class='up'>&nbsp;(asc)</span>",spandown:"<span class='down'>&nbsp;(desc)</span>",SelectorSpanSort:"span.up, span.down",classActive:"active",SelectorParent:"table",SelectorColumns:"td",SelectorSort:"th.sort"};b=a.extend(f,b);var c=true;c=b.inverse;var g=a(this).find(b.SelectorSort);g.click(function(){return d(this)});function d(d){var f=a(d),g=f.index();f.closest(b.SelectorParent).find(b.SelectorColumns).filter(function(){return jQuery(this).index()===g}).sort(e,function(){return this.parentNode});jQuery(d).parent().find(b.SelectorSort).removeClass(b.classActive).find(b.SelectorSpanSort).remove();jQuery(d).addClass(b.classActive);if(c)jQuery(d).append(b.spanup);else jQuery(d).append(b.spandown);c=!c}function e(a,d){x=jQuery(a).find(b.filtre_sort).text();y=jQuery(d).find(b.filtre_sort).text();if(!isNaN(x)&&x!=null&&!isNaN(y)&&y!=null)if(!isNaN(parseInt(x,10))&&!isNaN(parseInt(y,10))){x=parseInt(x,10);y=parseInt(y,10);v=c?x==y?0:x>y?1:-1:x==y?0:x<y?1:-1;return v}v=c?isNaN(x)||isNaN(y)?x>y:+x>+y:isNaN(x)||isNaN(y)?x<y:+x<+y;return v}return this}})(jQuery);function do_afficher_div(d,c,b){var a="#"+d.replace(/,/g,", #");if(c==null)if(jQuery(a).hasClass("nonvisible"))c=true;else c=false;if(c){jQuery(a).hasClass("nonvisible")&&jQuery(a).removeClass("nonvisible");jQuery(a).hasClass("visible")&&jQuery(a).removeClass("visible");if(b>0)jQuery(a).fadeIn(b,function(){jQuery(this).addClass("visible")});else jQuery(a).addClass("visible")}else{jQuery(a).hasClass("visible")&&jQuery(a).removeClass("visible");jQuery(a).hasClass("nonvisible")&&jQuery(a).removeClass("nonvisible");if(b>0)jQuery(a).fadeOut(b,function(){jQuery(this).addClass("nonvisible")});else jQuery(a).addClass("nonvisible")}return null}function Addlog(a,b){jQuery("#"+a).append("<br><span>"+b+"<span>")}function OuvrirPopUp(a,c,b){if(typeof fpopup=="undefined")fpopup=window.open(a,c,b);else try{fpopup.location=a;fpopup.focus()}catch(d){fpopup=window.open(a,c,b)}}function wait(a){d=new Date;for(;;){n=new Date;diff=n-d;if(diff>a)break}}jQuery(document).ready(function(){jQuery("#dvgotop").click(function(){var a="html,body";if(jQuery.browser.msie&&jQuery.browser.version<=7)a="html";jQuery(a).animate({scrollTop:"1px"},"slow",function(){document.documentElement.scrollTop=1});return true});jQuery(window).scroll(function(){if(isScrolledIntoView("#rkdoresultatsfiches",200)){var a=jQuery(window).width(),b=jQuery(window).scrollTop()+jQuery(window).height()-73;if(jQuery(".kdocolonnegaucheaccueil").offset()!=null)a=jQuery(".kdocolonnegaucheaccueil").offset().left+jQuery(".kdocolonnegaucheaccueil").width()+12;else if(jQuery(".kdounecolonnegauche").offset()!=null)a=jQuery(".kdounecolonnegauche").offset().left+jQuery(".kdounecolonnegauche").width()+12;else if(jQuery(".kdocolonnegauche").offset()!=null)a=jQuery(".kdocolonnegauche").offset().left+jQuery(".kdocolonnegauche").width()+12;if(a+73>jQuery(window).width())a-=73;else a+=10;jQuery("#dvgotop").stop().css({left:a+"px",top:b+"px"});do_afficher_div("dvgotop",true,0)}else do_afficher_div("dvgotop",false,0)})});function isScrolledIntoView(b,a){var c=jQuery(window).scrollTop();if(jQuery(b).attr("id")!=undefined&&jQuery(b).offset()!=null)a=jQuery(b).offset().top;return c+""==null||a+""==null?false:a<=c}function isnull(a,b){return a==null||a==undefined||a+""==""?b:a}function GetUrlJS(b){var a="javascript:void selflink(";if(b=="")return a=a+");";var c="";c=b;if(b.substring(0,0)!="/")c="/"+b;var d=c.replace(/[/]/g,"|"),e=d.length/2;for(i=1;i<=e*2;i=i+2){a=a+"'"+d.substring(i,i+2).replace(/\'/,"'")+"'";if(i<e*2-1)a=a+","}a=a+");";return a}function pause(b){var c=new Date,a=null;do a=new Date;while(a-c<b)}function nbwith(a,b){return a>1?b:""}function matchfiltreproduit(b,c){var d=0;nbelmp=0;var a=0;if(b.indexOf("1")<0)return true;for(a=0;a<b.length;a++){if(b.substr(a,1)=="1")d++;if(b.substr(a,1)=="1"&&c.substr(a,1)=="1")nbelmp++}return nbelmp>0?true:false}function replaceindx(b,d,c){var a="",e=b.length-1;if(c==0){a+=d;a+=b.substring(1)}else if(c==e){a+=b.substr(0,e);a+=d}else{a+=b.substr(0,c);a+=d;a+=b.substring(c+1)}return a}function tri_nombres(c,d){var a=c[1],b=d[1];return a==b?0:a<b?-1:1}function kdo_tri(a,b){a=parseInt(jQuery(a).text(),10);b=parseInt(jQuery(b).text(),10);return a==b?0:a<b?-1:1}function GetNoteImage(h,b,d,g,e,f){if(b+""=="")return"";else{if(b>50)b=50;if(b<0)b=0;var c=" avis clients";if(d+""==""||d+""=="0")c="";else if(d==1)c="et 1 avis client";else c="et "+d+" avis clients";var a="";if(h==0)a=e;else a=f;a=a.replace(/%note_produit%/g,(b/10+"").replace(/\./g,","));a=a.replace(/%nbavis_produit%/g,c);a=a.replace(/%urljs_produit%/g,g);if(b-Math.floor(b/10)*10>=5)a=a.replace(/%note_arrondie%/g,Math.floor(b/10)+".5");else a=a.replace(/%note_arrondie%/g,Math.floor(b/10)+".0");return a}}function kdoget(a){return jQuery("#"+a)}function kdoischecked(a){return kdoget(a).attr("checked")=="checked"}function kdosetchecked(a,b){if(b)kdoget(a).attr("checked","checked");else kdoget(a).attr("checked","");return kdoget(a)}function kdogetval(a){return kdoget(a).val()}function kdosetval(b,a){return kdoget(b).val(a)}function kdosethtml(b,a){return kdoget(b).html(a)}function kdogethtml(a){return kdoget(a).html()}function kdosetdiv(b,a){do_afficher_div(b,a,0)}function kdosettext(b,a){return kdoget(b).text(a)}function kdogettext(a){return kdoget(a).text()}function kdochkinputsempty(f,c){for(var a=true,e=f+"\n",b=0,b=0;b<c.length;b++){var d=kdochkinputtest(c[b].id,true,"");a=a&&d;if(!d)e+="\n"+c[b].lblalert}!a&&alert(e);return a}function kdochkinputempty(a,b){return kdochkinput(a,true,"",b)}function kdochkinput(b,c,d,a){if(!kdochkinputtest(b,c,d,a)){alert(a);return false}return true}function kdochkinputtest(a,b,c){return kdogetval(a)==c&&b||kdogetval(a)!=c&&!b?false:true}var kdoflvprevisu={divid:"kdofp_previsu",flashid:"previsu",width:330,height:264,bgcolor:"#fff",border:"1px solid #B0B0B0",bgflv:"#efefef",version:"8",debug:false,flashparams:[{key:"wmode",val:"opaque"}],flashpath:"/images/boutique/previsualisation_flash/produit-%flv_produit%.swf",flashvars:[]};function kdoprintflv(){for(var b="Flash Params :\n",c=new FlashObject(kdoflvprevisu.flashpath,kdoflvprevisu.flashid,kdoflvprevisu.width,kdoflvprevisu.height,kdoflvprevisu.version,kdoflvprevisu.bgflv),a=0;a<kdoflvprevisu.flashparams.length;a++){c.addParam(kdoflvprevisu.flashparams[a].key,kdoflvprevisu.flashparams[a].val);b+=kdoflvprevisu.flashparams[a].key+" : "+kdoflvprevisu.flashparams[a].val+"\n"}b+="Flash Vars :\n";for(var a=0;a<kdoflvprevisu.flashvars.length;a++){c.addVariable(kdoflvprevisu.flashvars[a].key,kdoflvprevisu.flashvars[a].val);b+=kdoflvprevisu.flashvars[a].key+" : "+kdoflvprevisu.flashvars[a].val+"\n"}kdoflvprevisu.debug&&alert(b);c.write(kdoflvprevisu.divid)}jQuery(document).ready(function(){var a="";jQuery(".valfocus").focus(function(){a=jQuery(this).val();jQuery(this).val("")}).blur(function(){jQuery(this).val()==""&&jQuery(this).val(a)})});


