if(typeof(window.originalParseInt)=="undefined"){window.originalParseInt=window.parseInt;window.parseInt=function(string,posix){if(typeof(posix)=='undefined'){posix=10;}
return originalParseInt(string,posix);};}
function CF_bind(o,m){var args=new Array();for(var i=2;i<arguments.length;++i){args.push(arguments[i]);}
return function(){var tmp=args.slice(0,args.length);for(var i=0;i<arguments.length;++i){tmp.push(arguments[i]);}
return m.apply(o,tmp);}}
function get(id){return document.getElementById(id);}
function CF_hide(e){if(e.style){e.style.visibility='hidden';e.style.position='relative';e.style.zIndex='-1';}}
function getElementsByClassName(searchClass,node,tag){if(!document.all){if(node){return node.getElementsByClassName(searchClass);}else{return document.getElementsByClassName(searchClass);}}else{var classElements=new Array();if(node==null)
node=document;if(tag==null)
tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");var i,j;for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++;}}
return classElements;}}
function str_pad(input,pad_length,pad_string,pad_type){var half='',pad_to_go;var str_pad_repeater=function(s,len){var collect='',i;while(collect.length<len)collect+=s;collect=collect.substr(0,len);return collect;};if(pad_type!='STR_PAD_LEFT'&&pad_type!='STR_PAD_RIGHT'&&pad_type!='STR_PAD_BOTH'){pad_type='STR_PAD_RIGHT';}
if((pad_to_go=pad_length-input.length)>0){if(pad_type=='STR_PAD_LEFT'){input=str_pad_repeater(pad_string,pad_to_go)+input;}
else if(pad_type=='STR_PAD_RIGHT'){input=input+str_pad_repeater(pad_string,pad_to_go);}
else if(pad_type=='STR_PAD_BOTH'){half=str_pad_repeater(pad_string,Math.ceil(pad_to_go/2));input=half+input+half;input=input.substr(0,pad_length);}}
return input;}
function color2hex(Stringval){if(Stringval.substring(0,1)=="#"){return Stringval.substring(1,7);}else{Stringval=Stringval.replace(/rgb/,'rgb2hex');Result=eval(Stringval);return Result;}}
function rgb2hex(r,g,b){var n=(r<<16)+(g<<8)+b;var iValColor=dechex(n);var sChaineColor='';for(iCharChaineColor=iValColor.length;iCharChaineColor<6;iCharChaineColor++){sChaineColor='0'+sChaineColor;}
return sChaineColor+iValColor;}
function dechex(dec){var hexa='0123456789ABCDEF',hex='';while(dec>15){tmp=dec-(Math.floor(dec/16))*16;hex=hexa.charAt(tmp)+hex;dec=Math.floor(dec/16);}
hex=hexa.charAt(dec)+hex;return(hex);}
function CF_HTMLEncode(wText){if(typeof(wText)!="string"){wText=wText.toString();}
wText=wText.replace(/&/g,"&amp;");wText=wText.replace(/"/g,"&#034;");wText=wText.replace(/</g,"&lt;");wText=wText.replace(/>/g,"&gt;");wText=wText.replace(/\(/g,"&#40;");wText=wText.replace(/\)/g,"&#41;");wText=wText.replace(/\//g,"&frasl;");wText=wText.replace(/\\/g,"&#92;");wText=wText.replace(/'/g,"&#146;");return wText;}
function CF_HTMLDecode(wText){if(typeof(wText)!="string"){wText=wText.toString();}
wText=wText.replace(/&amp;/g,"&");wText=wText.replace(/&#034;/g,'"');wText=wText.replace(/&#039;/g,'\'');wText=wText.replace(/&lt;/g,"<");wText=wText.replace(/&gt;/g,">");wText=wText.replace(/&quot;/g,'"');wText=wText.replace(/&#146;/g,"'");return wText;}
function addListener(element,type,expression,useCapture){useCapture=useCapture||false;if(window.addEventListener){element.addEventListener(type,expression,useCapture);return true;}else if(window.attachEvent){element.attachEvent('on'+type,expression);return true;}else return false;}
function toggle(el){if(el.style.display=='none'){el.style.display=''}else{el.style.display='none'}}
function toggleClassName(el,class_value){if(el.oldClassName){el.className=el.oldClassName;el.oldClassName=null;}else{el.oldClassName=el.className;el.className=class_value;}}
function setOpacity(el,value){el.style.opacity=value;el.style.filter='alpha(opacity='+value*100+')';}
function CF_ajax(url,opts){this.XMLHttpFactories=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];if(typeof CF_hash_check=='undefined'){CF_hash_check='';}
this.parameters=opts.parameters;this.parameters+='&hash_check='+CF_hash_check;this.method=opts.method.toUpperCase();this.postDataMode=(this.method=="POST")?true:false;this.url=(this.postDataMode)?url:url+'?'+this.parameters;var CF_current_host=window.location.hostname;if(this.url.indexOf(CF_current_host)==-1){this.url='http://'+CF_current_host+'/proxy.php?xdp_path='+encodeURIComponent(this.url);}
this.callbackFunction=opts.onComplete;this.sendRequest();}
CF_ajax.prototype.sendRequest=function(){var req=this.createXMLHTTPObject();var callback=this.callbackFunction;if(!req)return;req.open(this.method,this.url,true);req.setRequestHeader('User-Agent','XMLHTTP/1.0');if(this.postDataMode)
req.setRequestHeader('Content-type','application/x-www-form-urlencoded');req.onreadystatechange=function(){if(req.readyState!=4)return;if(req.status!=200&&req.status!=304){return;}
if(callback)
callback(req);}
if(req.readyState==4)return;req.send(this.parameters);}
CF_ajax.prototype.createXMLHTTPObject=function(){var xmlhttp=false;for(var i=0;i<this.XMLHttpFactories.length;i++){try{xmlhttp=this.XMLHttpFactories[i]();}
catch(e){continue;}
break;}
return xmlhttp;}
function hasClassName(element,className){var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)"+className+"(\\s|$)").test(elementClassName)));};function addClassName(element,className){if(!hasClassName(element,className))
element.className+=(element.className?' ':'')+className;return element;};function removeClassName(element,className){element.className=element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)"),' ');return element;};function duration2time(duration){var min='00',sec='00';if(duration<60){sec=duration;}else{var sec=duration%60;var min=(duration-sec)/60;sec=(sec<10)?'0'+sec:sec;min=(min<10)?'0'+min:min;}
return min+':'+sec;}
function CF_info_bottom(text,id,timeout,position){var div=get(id);if(!div){div=document.createElement('div');div.id=id;document.body.appendChild(div);}
div.innerHTML=text;div.setAttribute('style','-moz-border-radius:10px;-webkit-border-radius:5px;-webkit-box-shadow:0 0 5px rgba(0,0,0,0.5)');div.style.display='block';div.style.padding='20px';div.style.backgroundColor='#477E47';div.style.color='#FFFFFF';div.style.fontWeight='bold';div.style.width='250px';div.style.textAlign='center';div.style.border='1px solid #FFFFFF';div.style.zIndex='10000';if(!position||position=='bottom'){if(typeof(window.innerHeight)=='number'){var width=window.innerWidth-320;var height=window.innerHeight-70;div.style.position='fixed';div.style.top=height+'px';div.style.left=width+'px';}else{var width=document.documentElement.scrollLeft+document.documentElement.clientWidth-320;var height=document.documentElement.scrollTop+document.documentElement.clientHeight-70;div.style.position='absolute';div.style.top=height+'px';div.style.left=width+'px';}}else if(position=='center'){var doc=document;var popup=get_current_popup();var offsetTop=0;if(popup){doc=parent.document;offsetTop=parseInt(popup.popup.style.top.replace('px',''));}
var height=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop)
+doc.documentElement.clientHeight/2-25;height=height-offsetTop;if(height<0)height=0;div.style.position='absolute';div.style.top=height+'px';div.style.left='50%';div.style.marginLeft='-150px';doc=null;popup=null;}
this.div=div;this.timeout=timeout;div=null;timeout=null;}
CF_info_bottom.prototype.remove=function(callback){setTimeout(CF_bind(this,this.remove_callback,callback),this.timeout);}
CF_info_bottom.prototype.remove_callback=function(callback){this.div.style.display='none';if(callback){callback();}}
function CF_memorize_center(form_elm){new CF_info_bottom('Mémorisation des changements','memorize',600,'center');setTimeout(function(){form_elm.submit();},500);return false;}
function CF_fake_popup(width,callback){if(!width)width='620';this.width=width;this.callback=callback;var parent_body=document.body;var doc=document;try{if(parent&&parent.CF_fake_popup_instance){this.zindex=parent.CF_fake_popup_instance.get_zindex()+2;this.previous_CF_fake_popup_instance=parent.CF_fake_popup_instance;parent_body=parent.document.body;doc=parent.document;}else if(parent&&!parent.CF_fake_popup_instance){this.zindex=1000;this.previous_CF_fake_popup_instance=null;parent_body=parent.document.body;doc=parent.document;}else if(window.CF_fake_popup_instance){this.zindex=window.CF_fake_popup_instance.get_zindex()+2;this.previous_CF_fake_popup_instance=window.CF_fake_popup_instance;}else{this.zindex=1000;this.previous_CF_fake_popup_instance=null;}}catch(e){this.zindex=1000;this.previous_CF_fake_popup_instance=null;}
this.set_current_popup(this);var hide=doc.createElement('div');parent_body.appendChild(hide);if(document.all||navigator.userAgent.match(/firefox\/2/i)){hide.style.position='absolute';}else{hide.style.position='fixed';}
hide.style.left='0px';hide.style.top='0px';hide.style.width='100%';hide.style.height='100%';hide.style.filter='alpha(opacity=40)';hide.style.opacity='.40';hide.style.backgroundColor='#000';hide.style.display='block';hide.style.zIndex=this.zindex;if(parent_body&&parent_body.clientHeight){hide.style.width=parent_body.clientWidth;hide.style.height=parent_body.clientHeight;}
var popup=doc.createElement('div');parent_body.appendChild(popup);popup.style.position='absolute';popup.style.left='50%';popup.style.top='50px';popup.style.width=width+'px';popup.style.marginLeft='-'+(width/2)+'px';popup.style.textAlign='right';popup.style.zIndex=this.zindex+1;popup.className='popup_overlay';var offset=0;if(doc.body&&doc.body.clientHeight){offset=doc.body.scrollTop;}
if(doc.documentElement&&doc.documentElement.clientHeight){offset=Math.max(offset,doc.documentElement.scrollTop);}
popup.style.top=(offset+30)+'px';var body_shadow=doc.createElement('div');popup.appendChild(body_shadow);body_shadow.className='popup_body_shadow';body_shadow.style.backgroundImage='url('+'http://be.imdoc.fr'+'/design/popup/popup_shadow.png)';body_shadow.style.backgroundPosition='center bottom';body_shadow.style.backgroundRepeat='no-repeat';body_shadow.style.paddingBottom='13px';body_shadow.style.overflow='hidden';var body=doc.createElement('div');body_shadow.appendChild(body);body.className='popup_body';body.style.position='relative';body.style.padding='8px';body.style.backgroundColor='#FFFFFF';var img=doc.createElement('div');body.appendChild(img);img.style.position='absolute';img.style.right='3px';img.style.top='3px';if(document.all)img.style.right='15px';img.className='popup_close';img.style.cursor='pointer';img.style.backgroundImage='url('+'http://be.imdoc.fr'+'/be/icons/bt-fermer.gif)';img.style.backgroundRepeat='no-repeat';img.style.width='13px';img.style.height='13px';img.onclick=CF_bind(this,remove_current_popup,false);var title=doc.createElement('div');body.appendChild(title);title.className='FirstTittle';title.style.height='15px';title_h3=doc.createElement('h3');title.appendChild(title_h3);this.hide=hide;this.popup=popup;this.body=body;this.img=img;this.title=title_h3;this.attached=null;parent_body=null;doc=null;title=null;img=null;body=null;popup=null;hide=null;}
CF_fake_popup.prototype.set_current_popup=function(popup){window.CF_fake_popup_instance=popup;if(this.previous_CF_fake_popup_instance){this.previous_CF_fake_popup_instance.set_current_popup(popup);}}
CF_fake_popup.prototype.get_zindex=function(){return this.zindex;}
CF_fake_popup.prototype.attach_url=function(url){if(url&&!this.attached){try{var doc=(parent)?parent.document:document;}catch(e){var doc=document;}
var CF_current_host=window.location.hostname;if(url.indexOf(CF_current_host)==-1){url='http://'+CF_current_host+'/proxy.php?xdp_path='+encodeURIComponent(url);}
this.set_title('Chargement en cours...');var iframe=doc.createElement('iframe');iframe.style.width='100%';iframe.style.border='0';iframe.setAttribute('frameBorder','0');iframe.src=url;this.attached=iframe;this.body.appendChild(iframe);this.wait();if(iframe.attachEvent)iframe.attachEvent('onload',CF_bind(this,this.display));else if(iframe.addEventListener)iframe.addEventListener('load',CF_bind(this,this.display),false);else iframe.onload=CF_bind(this,this.display);doc=null;iframe=null;}}
CF_fake_popup.prototype.attach_blank_iframe=function(name){if(!this.attached){try{var doc=(parent)?parent.document:document;}catch(e){var doc=document;}
this.set_title('Chargement en cours...');var iframe=null;var iframes=doc.getElementsByTagName('iframe');for(var i=0;i<iframes.length;i++){if(iframes[i].name==name){iframe=iframes[i];break;}}
if(!iframe){if(document.all){iframe=doc.createElement('<iframe name="'+name+'">');}else{iframe=doc.createElement('iframe');iframe.name=name;}}
iframe.style.width='100%';iframe.style.border='0';iframe.setAttribute('frameBorder','0');this.body.appendChild(iframe);this.attached=iframe;this.wait();iframe.onload=CF_bind(this,this.display);if((iframe.onload)&&(document.all)){this.display();}
iframe=null;iframes=null;}}
CF_fake_popup.prototype.set_title=function(title,icon){if(typeof(icon)!='undefined'&&icon){title='<img src="'+icon+'" alt="" /> '+title;}
this.title.innerHTML=title;}
CF_fake_popup.prototype.remove=function(validation){this.hide.parentNode.removeChild(this.hide);this.popup.style.display='none';this.set_current_popup(this.previous_CF_fake_popup_instance);if(this.callback&&validation){this.callback(validation);}
return false;}
CF_fake_popup.prototype.wait=function(){try{var doc=(parent)?parent.document:document;}catch(e){var doc=document;}
this.attached.style.display='none';this.wait_div=doc.createElement('div');this.wait_div.style.display='block';this.wait_div.style.textAlign='center';this.wait_div.style.height='200px';this.wait_div.style.backgroundColor='#FFFFFF';var img=doc.createElement('img');img.src='http://be.imdoc.fr'+'/design/wysiwyg/wait.gif';img.style.marginTop='80px';img.alt='wait';this.wait_div.appendChild(img);img=null;this.body.appendChild(this.wait_div);}
CF_fake_popup.prototype.display=function(){if(this.attached){this.wait_div.style.visibility='hidden';this.wait_div.style.overflow='hidden';this.attached.style.display='block';if(this.attached.contentWindow){try{var doc_iframe=this.attached.contentWindow.document||this.attached.contentDocument;if(doc_iframe.body||doc_iframe.documentElement);if(doc_iframe&&doc_iframe.title){var icon='';var links_tags=doc_iframe.getElementsByTagName('link');for(var i=0;i<links_tags.length;i++){if(links_tags[i].rel=='icon'&&links_tags[i].href){icon=links_tags[i].href;break;}}
this.set_title(doc_iframe.title,icon);}
this.attached.style.overflow='hidden';}catch(e){var title=this.attached.src;if(title.match('https://')){title='<a href="'+title+'" target="_blank"><img src="'+'http://be.imdoc.fr'+'/design/secure.gif" alt="" /></a> '+title;}
this.set_title(title);this.attached.style.overflow='auto';}}
if(this.wait_div.style.display!='none'){this.attached.style.height='1px';if(document.all){this.progress=100;}else{this.progress=-100;}
if(this.interval)clearInterval(this.interval);this.interval=setInterval(CF_bind(this,this.display_popup_progress),15);}else{if(document.all){this.progress=100;}else{this.progress=0;}
if(this.interval)clearInterval(this.interval);this.interval=setInterval(CF_bind(this,this.update_popup_progress),15);}}}
CF_fake_popup.prototype.display_popup_progress=function(){try{var doc_iframe=this.attached.contentWindow.document||this.attached.contentDocument;if(doc_iframe.body||doc_iframe.documentElement);}catch(e){var doc_iframe=null;}
if(this.progress<0){var total_height=200.0;this.wait_div.style.height=(total_height*Math.abs(this.progress)/100)+'px';}else if(this.progress<=100){this.wait_div.style.display='none';if(doc_iframe&&document.all&&doc_iframe.body){this.iframe_real_height=doc_iframe.body.offsetHeight;}else if(doc_iframe&&!document.all){this.iframe_real_height=doc_iframe.documentElement.offsetHeight;}else{this.iframe_real_height=500;}
this.attached.style.height=(this.iframe_real_height*this.progress/100)+10+'px';}else{if(this.interval)clearInterval(this.interval);}
this.progress=this.progress+10;}
CF_fake_popup.prototype.update_popup_progress=function(){if(!this.attached){return;}
try{var doc_iframe=this.attached.contentWindow.document||this.attached.contentDocument;if(doc_iframe.body||doc_iframe.documentElement);}catch(e){var doc_iframe=null;}
if(this.progress<=100){var real_height=500;if(doc_iframe&&document.all&&doc_iframe.body){real_height=doc_iframe.body.offsetHeight;}else if(doc_iframe&&!document.all){real_height=doc_iframe.documentElement.offsetHeight;}
var src=this.iframe_real_height*(100-this.progress)/100;var dst=real_height*this.progress/100;this.attached.style.height=(src+dst)+10+'px';}else{if(doc_iframe&&document.all&&doc_iframe.body){this.iframe_real_height=doc_iframe.body.offsetHeight;}else if(doc_iframe&&!document.all){this.iframe_real_height=doc_iframe.documentElement.offsetHeight;}else{this.iframe_real_height=500;}
if(this.interval)clearInterval(this.interval);}
this.progress=this.progress+10;}
function refresh_window(validate){if(validate){window.location.href=window.location.href.split('#')[0];}}
function reload_window(validate){if(validate){window.location.reload();}}
function refresh_toolbar(){window.toolbar.attachUpdateNotification(true);}
function get_current_popup(){try{if(document.getElementById('parent_not_allowed'))return false;if(parent&&parent.CF_fake_popup_instance){return parent.CF_fake_popup_instance;}else if(window.CF_fake_popup_instance){return window.CF_fake_popup_instance;}else{return false;}}catch(e){if(window.CF_fake_popup_instance){return window.CF_fake_popup_instance;}else{return false;}}}
function resize_current_popup(){var p=get_current_popup();if(p){p.display();}}
function set_current_popup_callback(callback){var p=get_current_popup();if(p){p.callback=callback;}}
var redirect_url='';function redirect_window(){window.location.href=redirect_url;}
function remove_current_popup(validation){if(validation==undefined){validation=false;}
var p=get_current_popup();if(p){p.remove(validation);}
return false;}
function remove_all_current_popup(){var p=get_current_popup();var next=null;while(p){next=p.previous_CF_fake_popup_instance;p.remove();p=next;}
return false;}
function CF_popup(e,width,callback){if(e.href){if(!width)width='620';if(!callback)callback=refresh_window;var p=new CF_fake_popup(width,callback);p.attach_url(e.href);return false;}else{return true;}}
function CF_popup_windows(href,width,height,title){window.open(href,title,'toolbar=no, directories=no, menubar=no, help=no,status=no,scrollbars=no,resizable=no, width='+width+', height='+height);return false;}
function CF_popup_form(form,width,callback){if(!width)width='620';if(!callback)callback=refresh_window;var p=new CF_fake_popup(width,callback);p.attach_blank_iframe(form.target);return true;}
function check_is_int(e){if(e.value!=parseInt(e.value)){alert('Merci d\'entrer un chiffre entier');e.value=parseInt(e.value);}}
function check_is_float(e){if(e.value!=parseFloat(e.value)){alert('Merci d\'entrer un nombre décimal');e.value=parseFloat(e.value);}}
function CF_digg(id_media,e){if(typeof ignore_click_event!='undefined'&&ignore_click_event){return false;}
var ext='';if(CF_viewer){if(get('digg_'+id_media)){ext='_'+id_media;}
get('digg'+ext).style.display='none';get('digged'+ext).style.display='block';var strong=get('digged'+ext).getElementsByTagName('strong')[0];var strong_digg=get('digg'+ext).getElementsByTagName('strong')[0];var val=parseInt(strong_digg.innerHTML);strong.innerHTML=strong_digg.innerHTML.replace(val,1+val);var opts={method:"get",parameters:'id_media='+id_media
+'&rd='+Math.random(),onComplete:null};new CF_ajax('http://www.be.com'+'/widget/update_digg.php',opts);}else{var div=get('CF_live_info');if(!div){div=document.createElement('div');div.id='CF_live_info';div.innerHTML='Vous devez vous connecter ou devenir membre pour voter. Merci !';div.style.position='absolute';div.style.backgroundColor='#FFD';div.style.color='#000';div.style.border='1px solid #000';div.style.textAlign='left';div.style.padding='5px';div.style.zIndex='1';div.style.fontSize='12px';document.body.appendChild(div);}
div.style.display=div.style.display=='block'?'none':'block';var x;var y;if(e&&e.pageX){x=e.pageX;y=e.pageY;}else{x=window.event.clientX+document.documentElement.scrollLeft;y=window.event.clientY+document.documentElement.scrollTop;}
div.style.top=(y+20)+'px';div.style.left=(x)+'px';div=null;setTimeout(function(){get('CF_live_info').style.display='none';},3000);}
return false;}
function CF_vote(id_media,e){if(typeof ignore_click_event!='undefined'&&ignore_click_event){return false;}
var ext='';if(get('digg_'+id_media)){ext='_'+id_media;}
get('digg'+ext).style.display='none';get('digged'+ext).style.display='block';var strong=get('digged'+ext).getElementsByTagName('strong')[0];var strong_digg=get('digg'+ext).getElementsByTagName('strong')[0];var val=parseInt(strong_digg.innerHTML);strong.innerHTML=strong_digg.innerHTML.replace(val,1+val);var opts={method:"get",parameters:'id_media='+id_media
+'&rd='+Math.random()
+'&vote=1',onComplete:null};new CF_ajax('http://www.be.com'+'/widget/update_digg.php',opts);return false;}
function edit_status(){if(!get('user_status_header_data')){var main=get('user_status_header');var form=document.createElement('form');var input=document.createElement('input');if(hasClassName(main,'user_status_header_default')){removeClassName(main,'user_status_header_default');main.innerHTML='';}
input.id='user_status_header_data';input.value=CF_HTMLDecode(main.innerHTML);main.innerHTML='';form.appendChild(input);main.appendChild(form);form.onsubmit=edit_status_validate;get('user_status_header_link').style.display='none';if(get('share_on_social_network')){get('share_on_social_network').style.display='block';}
get('user_status_header_validate').style.display='block';input.focus();main=null;form=null;input=null;}
return false;}
function edit_status_validate(){var main=get('user_status_header');var value=get('user_status_header_data').value;var facebook_checked=false;if(get('share_on_facebook')!=undefined){facebook_checked=get('share_on_facebook').checked;}
var twitter_checked=false;if(get('share_on_twitter')!=undefined){twitter_checked=get('share_on_twitter').checked;}
get('user_status_header').innerHTML=CF_HTMLEncode(value);get('user_status_header_link').style.display='block';if(get('share_on_social_network')){get('share_on_social_network').style.display='none';}
get('user_status_header_validate').style.display='none';if(value==''){addClassName(main,'user_status_header_default');main.innerHTML='Quoi de neuf ?';}
var opts={method:'get',parameters:'id_user='+CF_profil_id
+'&status='+encodeURIComponent(value)
+'&fb_checked='+facebook_checked
+'&tw_checked='+twitter_checked
+'&rd='+Math.random(),onComplete:null};new CF_ajax('http://www.be.com'+'/widget/toolbar/update_user_status.php',opts);return false;}
function CF_move_mouse(e){e=e||window.event;var elm=e.target;if(!elm){elm=e.srcElement;}
if(elm&&elm.title){elm.title2js=elm.title;try{elm.title='';}catch(e){return;}}
var div=window.CF_title2js_div;if(elm&&elm.title2js){if(div==null){div=document.createElement('div');div.id='title2js';div.style.position='absolute';div.style.backgroundColor='#FFD';div.style.color='#000';div.style.border='1px solid #000';div.style.textAlign='left';div.style.padding='2px';div.style.zIndex='10';div.style.fontSize='11px';document.body.appendChild(div);window.CF_title2js_div=div;}
var x=e.pageX;var y=e.pageY;if(!x){x=e.clientX+document.documentElement.scrollLeft;y=e.clientY+document.documentElement.scrollTop;}
div.innerHTML=elm.title2js;div.style.display='block';var x_tot=document.documentElement.clientWidth+document.documentElement.scrollLeft;var y_tot=document.documentElement.clientHeight+document.documentElement.scrollTop;var width=div.offsetWidth;var height=div.offsetHeight;if(x+width>x_tot&&y+height>y_tot){x=x-width-10;y=y-height-10;}else if(x+width>x_tot){x=x_tot-width-10;}else if(y+height>y_tot){y=y_tot-height-10;}
div.style.top=(y+20)+'px';div.style.left=(x)+'px';}else if(div){div.style.display='none';}
elm=null;div=null;}
function CF_click_link(e){var url=this.href;var opts={method:'get',onComplete:function(ajax){var html=ajax.responseText;var sub1=html.split('<body')[1].split('>');sub1.shift();var sub2=sub1.join('>')
var body=sub2.split('</body>')[0];body.replace(/<script.+?toolbar\.js.+?<\/script>/,'');body.replace(/<script.+?utils\.js.+?<\/script>/,'');var toolbar=get('element_div');toolbar.parentNode.removeChild(toolbar);document.body.innerHTML=body;document.body.appendChild(toolbar);var links=document.getElementsByTagName('a');var len=links.length;for(var i=0;i<len;i++){var link=links[i];if(!link.onclick){link.onclick=CF_click_link;}}}};new CF_ajax(url,opts);return false;}
function CF_load(){if(window.location.href.match('CF_popup=')){var popup=window.location.href.split('CF_popup=')[1].split('&')[0];var options_start=window.location.href.indexOf('CF_popup=')+'CF_popup='.length+popup.length+1;var options=window.location.href.substring(options_start);var is_group_popup=null;if(window.location.href.match('CF_group_popup=')){is_group_popup=window.location.href.split('CF_group_popup=')[1].split('&')[0];}
if(typeof(options)=='undefined'){options='';}else{options=encodeURIComponent(options);}
var more_parameters='';if(typeof(is_group_popup)!='undefined'&&is_group_popup==1){var id_group=null;if(window.location.href.match('id_group=')){id_group=window.location.href.split('id_group=')[1].split('&')[0];}
if(typeof(id_group)!='undefined'){more_parameters='&id_group='+id_group;}}
var opts={method:'get',parameters:'&popup='+popup
+'&options='+options
+more_parameters
+'&rd='+Math.random(),onComplete:function(ajax){var url=eval('('+ajax.responseText+')');if(url){var fake_popup=new CF_fake_popup(816,function(){window.location.href=window.location.href.replace('CF_popup=','')});fake_popup.attach_url(url);}}};if(typeof(is_group_popup)!='undefined'&&is_group_popup==1){new CF_ajax('http://www.be.com/groupes'+'/widget/get_url_popup.php',opts);}else{new CF_ajax('http://www.be.com'+'/widget/get_url_popup.php',opts);}}
CF_decryptlink();}
function on_dom_ready(fn){if(window.attachEvent&&!window.addEventListener){var d=window.document,done=false,init=function(){if(!done){done=true;fn();}};(function(){try{d.documentElement.doScroll('left');}catch(e){setTimeout(arguments.callee,50);return;}
init();})();d.onreadystatechange=function(){if(d.readyState=='complete'){d.onreadystatechange=null;init();};}}else if(window.addEventListener){window.addEventListener('DOMContentLoaded',fn,false);}}
on_dom_ready(CF_load);function montrer_spoiler(value){var actual=document.getElementById(value).style.visibility;if(actual=='visible')document.getElementById(value).style.visibility='hidden';else document.getElementById(value).style.visibility='visible';}
function tooltip_show(e,id){var tooltip=document.getElementById(id);tooltip.parentNode.style.zIndex=1;tooltip.style.display='block';}
function tooltip_hide(id){var tooltip=document.getElementById(id);tooltip.parentNode.style.zIndex=0;tooltip.style.display='none';}
function dump(arr,level){var dumped_text="";if(!level)level=0;var level_padding="";for(var j=0;j<level+1;j++)level_padding+="    ";if(typeof(arr)=='object'){for(var item in arr){var value=arr[item];if(typeof(value)=='object'){dumped_text+=level_padding+"'"+item+"' ...\n";dumped_text+=dump(value,level+1);}else{dumped_text+=level_padding+"'"+item+"' => \""+value+"\"\n";}}}else{dumped_text="===>"+arr+"<===("+typeof(arr)+")";}
return dumped_text;}
function CF_content_selector(parent_select_element_id,select_element_class,id_suffix,id_selection_tools_more){this.parent_select_element_id=parent_select_element_id;this.select_element_class=select_element_class;this.id_suffix=id_suffix;this.id_selection_tools_more=id_selection_tools_more;this.parent_select_element=get(parent_select_element_id);if(this.parent_select_element==null){return;}
this.select_elements=getElementsByClassName(select_element_class,this.parent_select_element);this.nb_element_selected=0;this.nb_editable_selected=0;this.nb_removed_selected=0;ignore_click_event=false;this.list_id_selection='';for(var i=0;i<this.select_elements.length;++i){addListener(this.select_elements[i],'click',CF_bind(this,this.selector,this.select_elements[i]))}
var select_content_links=this.parent_select_element.getElementsByTagName('a');for(i=0;i<select_content_links.length;i++){var select_content_link=select_content_links[i];select_content_link.temp_onclick=select_content_link.onclick;select_content_link.onclick=CF_bind(select_content_link,function(ev){if(!ev){var e=window.event;e.cancelBubble=true;}else{ev.stopPropagation();}
if(this.temp_onclick){this.temp_onclick();return false;}
if(ignore_click_event){return false;}});}}
CF_content_selector.prototype.selector=function(element){if(ignore_click_event){return false;}
if(hasClassName(element,'selected')){removeClassName(element,'selected');this.nb_element_selected--;if(hasClassName(element,'editable')){this.nb_editable_selected--;}
if(hasClassName(element,'removed')){this.nb_removed_selected--;}}else if(!hasClassName(element,'noselect')){addClassName(element,'selected');this.nb_element_selected++;if(hasClassName(element,'editable')){this.nb_editable_selected++;}
if(hasClassName(element,'removed')){this.nb_removed_selected++;}}
this.update_selection_tools_display();}
CF_content_selector.prototype.select_all=function(){this.nb_element_selected=0;this.nb_editable_selected=0;this.nb_removed_selected=0;for(var i=0;i<this.select_elements.length;++i){if(!hasClassName(this.select_elements[i],'selected')&&!hasClassName(this.select_elements[i],'noselect')){addClassName(this.select_elements[i],'selected');this.nb_element_selected++;if(hasClassName(this.select_elements[i],'editable')){this.nb_editable_selected++;}
if(hasClassName(this.select_elements[i],'removed')){this.nb_removed_selected++;}}else if(hasClassName(this.select_elements[i],'selected')){this.nb_element_selected++;if(hasClassName(this.select_elements[i],'editable')){this.nb_editable_selected++;}
if(hasClassName(this.select_elements[i],'removed')){this.nb_removed_selected++;}}}
this.nb_element_selected=this.select_elements.length;this.update_selection_tools_display();}
CF_content_selector.prototype.unselect_all=function(){for(var i=0;i<this.select_elements.length;++i){if(hasClassName(this.select_elements[i],'selected')){removeClassName(this.select_elements[i],'selected');}}
this.nb_element_selected=0;this.nb_editable_selected=0;this.nb_removed_selected=0;this.update_selection_tools_display();}
CF_content_selector.prototype.get_nb_element_selected=function(){return nb_element_selected;}
CF_content_selector.prototype.update_selection_tools_display=function(){if(this.nb_element_selected==1){removeClassName(get(this.id_selection_tools_more),'selection_tools_more_shows');removeClassName(get(this.id_selection_tools_more),'selection_tools_more_hide');addClassName(get(this.id_selection_tools_more),'selection_tools_more_show');}else if(this.nb_element_selected>1){removeClassName(get(this.id_selection_tools_more),'selection_tools_more_show');addClassName(get(this.id_selection_tools_more),'selection_tools_more_shows');}else{removeClassName(get(this.id_selection_tools_more),'selection_tools_more_shows');removeClassName(get(this.id_selection_tools_more),'selection_tools_more_show');addClassName(get(this.id_selection_tools_more),'selection_tools_more_hide');}
var removeLinks=getElementsByClassName("remove",get(this.id_selection_tools_more));var restoreLinks=getElementsByClassName("restore",get(this.id_selection_tools_more));if(this.nb_removed_selected>0){if(this.nb_element_selected==this.nb_removed_selected){for(var i=0;i<removeLinks.length;++i){if(hasClassName(removeLinks[i],'single')){removeClassName(removeLinks[i],'single');addClassName(removeLinks[i],'single_hidden');}else if(hasClassName(removeLinks[i],'plural')){removeClassName(removeLinks[i],'plural');addClassName(removeLinks[i],'plural_hidden');}}
for(var i=0;i<restoreLinks.length;++i){if(hasClassName(restoreLinks[i],'single_hidden')){removeClassName(restoreLinks[i],'single_hidden');addClassName(restoreLinks[i],'single');}else if(hasClassName(restoreLinks[i],'plural_hidden')){removeClassName(restoreLinks[i],'plural_hidden');addClassName(restoreLinks[i],'plural');}}}else{for(var i=0;i<removeLinks.length;++i){if(hasClassName(removeLinks[i],'single_hidden')){removeClassName(removeLinks[i],'single_hidden');addClassName(removeLinks[i],'single');}else if(hasClassName(removeLinks[i],'plural_hidden')){removeClassName(removeLinks[i],'plural_hidden');addClassName(removeLinks[i],'plural');}}
for(var i=0;i<restoreLinks.length;++i){if(hasClassName(restoreLinks[i],'single_hidden')){removeClassName(restoreLinks[i],'single_hidden');addClassName(restoreLinks[i],'single');}else if(hasClassName(restoreLinks[i],'plural_hidden')){removeClassName(restoreLinks[i],'plural_hidden');addClassName(restoreLinks[i],'plural');}}}}else{for(var i=0;i<removeLinks.length;++i){if(hasClassName(removeLinks[i],'single_hidden')){removeClassName(removeLinks[i],'single_hidden');addClassName(removeLinks[i],'single');}else if(hasClassName(removeLinks[i],'plural_hidden')){removeClassName(removeLinks[i],'plural_hidden');addClassName(removeLinks[i],'plural');}}
for(var i=0;i<restoreLinks.length;++i){if(hasClassName(restoreLinks[i],'single')){removeClassName(restoreLinks[i],'single');addClassName(restoreLinks[i],'single_hidden');}else if(hasClassName(restoreLinks[i],'plural')){removeClassName(restoreLinks[i],'plural');addClassName(restoreLinks[i],'plural_hidden');}}}
resize_current_popup();}
CF_content_selector.prototype.get_selection_ids=function(){this.list_id_selection='';for(var i=0;i<this.select_elements.length;++i){if(hasClassName(this.select_elements[i],'selected')){this.list_id_selection+=this.select_elements[i].id.replace(this.id_suffix,'')+',';}}
this.list_id_selection=this.list_id_selection.substring(0,this.list_id_selection.length-1);return this.list_id_selection;}
function CF_decryptlink(){var tagsA=document.getElementsByTagName('span');var len=tagsA.length;for(var i=0;i<len;i++){var e=tagsA[i];if(e.className.substring(0,13)=='DOC_cryptlink'){var classname=e.className+' ';var class_crypt=classname.substring(13,classname.indexOf(' '));var class_decrypt=classname.substring(classname.indexOf(' ')+1);var id_decrypt=e.id;var onclick_decrypt=e.onclick;var target_decrypt=e.rel?e.rel.replace('target_',''):'';var nlink=document.createElement('a');nlink.href=CF_decryptlink_decode(class_crypt);if(class_decrypt){nlink.className=class_decrypt;}
if(id_decrypt){nlink.id=id_decrypt;}
if(onclick_decrypt){nlink.onclick=onclick_decrypt;}
if(target_decrypt){nlink.target=target_decrypt;}
while(e.childNodes.length){nlink.appendChild(e.childNodes[0]);}
e.className='';e.id='';e.onclick='';e.rel='';e.removeAttribute('onclick');e.appendChild(nlink);}}}
function CF_decryptlink_decode(input){var CF_decryptlink_keyStr="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/"+"=";var output='';var chr1,chr2,chr3='';var enc1,enc2,enc3,enc4='';var i=0;var base64test=/[^A-Za-z0-9\+\/\=]/g;if(base64test.exec(input)){alert("There were invalid base64 characters in the input text.\n"+"Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\n"+"Expect errors in decoding.");}
input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=CF_decryptlink_keyStr.indexOf(input.charAt(i++));enc2=CF_decryptlink_keyStr.indexOf(input.charAt(i++));enc3=CF_decryptlink_keyStr.indexOf(input.charAt(i++));enc4=CF_decryptlink_keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}
if(enc4!=64){output=output+String.fromCharCode(chr3);}
chr1=chr2=chr3='';enc1=enc2=enc3=enc4='';}while(i<input.length);return unescape(output);}
function getFirstParentNodeByTagName(el,tag_name){var parent_node=el.parentNode;if(parent_node.tagName.toUpperCase()==tag_name.toUpperCase()){return parent_node;}else if(parent_node.parentNode){parentNode.getFirstParentNodeByTagName(tag_name);}
return false;}
function set_rollover(element,rollover,inline,callback){if(element&&rollover){rollover.style.display='none';element.onmouseover=function(){rollover.style.display=(inline?'inline':'block');if(callback){callback(this,true);}};element.onmouseout=function(){rollover.style.display='none';if(callback){callback(this,false);}};}}
function set_rollover_windowed(element,rollover,aWindowed,inline,callback){if(element&&rollover){var version=get_ie_version();rollover.style.display='none';element.onmouseover=function(){if(version==6){for(i in aWindowed){get(aWindowed[i]).style.visibility='hidden';}}
rollover.style.display=(inline?'inline':'block');if(callback){callback(this,true);}};element.onmouseout=function(){if(version==6){for(i in aWindowed){get(aWindowed[i]).style.visibility='visible';}}
rollover.style.display='none';if(callback){callback(this,false);}};}}
function get_ie_version(){var version=null;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");version=parseFloat(temp[1]);}
return version;}
function remove_from_dressing(elm,id_user,id_product){new CF_ajax('http://www.be.com'+'/widget/remove_product_from_dressing.php',{method:'post',parameters:'id_user='+id_user
+'&id_product='+id_product,onComplete:CF_bind(elm,remove_from_dressing_callback,true)});}
function remove_from_dressing_callback(validation){if(validation){this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);}}
function trim(myString){if(myString){return myString.replace(/^\s+/g,'').replace(/\s+$/g,'');}else{return'';}}
function rollover_trigger(){var elements=getElementsByClassName('rollover_trigger');for(var i=0;i<elements.length;i++){var element=elements[i];element.onmouseover=function(){addClassName(this,'rollover_tips_parent');};element.onmouseout=function(){removeClassName(this,'rollover_tips_parent');};}
var elements=getElementsByClassName('rollover_trigger2');var current_opened_trigger=null;for(var i=0;i<elements.length;i++){var element=elements[i];if(hasClassName(element,'rollover_tips_parent')){current_opened_trigger=element;}
element.onmouseover=function(){if(current_opened_trigger&&current_opened_trigger!=this){removeClassName(current_opened_trigger,'rollover_tips_parent');current_opened_trigger=this;}
addClassName(this,'rollover_tips_parent');};}}
var loaded_notification=false;function load_notifications(){var version=null;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");version=parseFloat(temp[1]);}
notifications_el=get('notifications');if(notifications_el.style.display=='block'){notifications_el.style.display='none';removeClassName(notifications_el.parentNode,'selected_notification');if(version==6){get('FormSearchColRight').style.visibility='visible';}}else{notifications_el.style.display='block';addClassName(notifications_el.parentNode,'selected_notification');if(version==6){get('FormSearchColRight').style.visibility='hidden';}}
if(!loaded_notification){var opts={method:'get',parameters:'rd='+Math.random(),onComplete:function(ajax){get('notifications_content').innerHTML=ajax.responseText;loaded_notification=true;rollover_trigger();var notification_page=2;if(get('next_notification')){get('next_notification').onclick=function(){var opts={method:'get',parameters:'page='+notification_page+'&rd='+Math.random(),onComplete:function(ajax){more_notifications_el=get('next_notification');more_notifications_el.id='';more_notifications_el.innerHTML=ajax.responseText;rollover_trigger();notification_page++;}};new CF_ajax('http://www.be.com'+'/widget/update_notifications.php',opts);}}}};new CF_ajax('http://www.be.com'+'/widget/update_notifications.php',opts);}
return false;}
function remove_notification(id_comment,type){var opts={method:'get',parameters:'id_comment='+id_comment+'&type='+type+'&remove=1'+'&rd='+Math.random(),onComplete:function(){get('notification_'+type+'_'+id_comment).parentNode.removeChild(get('notification_'+type+'_'+id_comment));var notifications=get('nb_notifications');if(notifications){var nb_notifications=parseInt(notifications.innerHTML);nb_notifications--;notifications.innerHTML=nb_notifications;}}};new CF_ajax('http://www.be.com'+'/widget/update_notifications.php',opts);}