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;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--;}else{addClassName(element,'selected');this.nb_element_selected++;}
this.update_selection_tools_display();}
CF_content_selector.prototype.select_all=function(){for(var i=0;i<this.select_elements.length;++i){if(!hasClassName(this.select_elements[i],'selected')){addClassName(this.select_elements[i],'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.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');}
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));}};new CF_ajax('http://www.be.com'+'/widget/update_notifications.php',opts);}
on_dom_ready(rollover_trigger);function ImageFlow()
{this.defaults={aspectRatio:1.964,buttons:false,captions:true,imageCursor:'default',ImageFlowID:'imageflow',imageFocusM:1.0,imageFocusMax:4,imageScaling:true,imagesHeight:0.67,imagesM:1.0,onClick:function(){},opacity:false,opacityArray:[10,8,6,4,2],percentLandscape:118,percentOther:100,preloadImages:true,reflections:true,reflectionGET:'',reflectionP:0.5,reflectionPNG:false,scrollbarP:0.6,slider:true,sliderCursor:'e-resize',sliderWidth:14,startID:1,startAnimation:false,endAnimationCallback:function(){},backgroundBar:false,xStep:150,marginLeft:0,noImgTxt:'Pas d\'image'};var thisObject=this;this.init=function(options)
{var optionsArray=['aspectRatio','buttons','captions','imageCursor','imagesM','ImageFlowID','imageFocusM','imageFocusMax','imagesHeight','onClick','opacity','opacityArray','percentLandscape','percentOther','preloadImages','reflections','reflectionGET','reflectionP','reflectionPNG','imageScaling','scrollbarP','slider','sliderCursor','sliderWidth','startID','startAnimation','endAnimationCallback','backgroundBar','xStep','marginLeft','noImgTxt'];var max=optionsArray.length;for(var i=0;i<max;i++)
{var name=optionsArray[i];this[name]=(options!==undefined&&options[name]!==undefined)?options[name]:thisObject.defaults[name];}
var ImageFlowDiv=document.getElementById(thisObject.ImageFlowID);if(ImageFlowDiv)
{ImageFlowDiv.style.visibility='visible';this.ImageFlowDiv=ImageFlowDiv;if(this.createStructure())
{this.imagesDiv=document.getElementById(thisObject.ImageFlowID+'_images');this.captionDiv=document.getElementById(thisObject.ImageFlowID+'_caption');this.navigationDiv=document.getElementById(thisObject.ImageFlowID+'_navigation');this.scrollbarDiv=document.getElementById(thisObject.ImageFlowID+'_scrollbar');this.sliderDiv=document.getElementById(thisObject.ImageFlowID+'_slider');this.buttonNextDiv=document.getElementById(thisObject.ImageFlowID+'_next');this.buttonPreviousDiv=document.getElementById(thisObject.ImageFlowID+'_previous');this.indexArray=[];this.current=0;this.imageID=0;this.target=0;this.memTarget=0;this.firstRefresh=true;this.firstCheck=true;this.busy=false;if(this.slider===false)
{this.sliderDiv.style.display='none';this.scrollbarDiv.style.border='none';}
var width=this.ImageFlowDiv.offsetWidth;var height=Math.round(width/thisObject.aspectRatio);document.getElementById(thisObject.ImageFlowID+'_loading_txt').style.paddingTop=Math.max(0,((height*0.5)-22))+'px';ImageFlowDiv.style.height=height+'px';if(thisObject.imagesDiv.childNodes.length>0){this.loadingProgress();}else{document.getElementById(thisObject.ImageFlowID+'_loading').style.display='none';var loadingP=document.getElementById(thisObject.ImageFlowID+'_loading_txt');loadingP.replaceChild(document.createTextNode(thisObject.noImgTxt),loadingP.firstChild);return false;}}}};this.createStructure=function()
{var imagesDiv=thisObject.Helper.createDocumentElement('div','images');var node=null;var max=this.ImageFlowDiv.childNodes.length;for(var index=0;index<max;index++)
{if(this.ImageFlowDiv.firstChild.nodeType!=1){node=this.ImageFlowDiv.childNodes[index];}else{node=this.ImageFlowDiv.firstChild;}
if(node&&node.nodeType==1&&node.nodeName=='DIV')
{if(thisObject.reflections===true)
{var version='2';if(thisObject.reflectionPNG===true)
{version='3';}
var src=node.getAttribute('src',2);src='reflect'+version+'.php?img='+src+thisObject.reflectionGET;node.setAttribute('src',src);}
imagesDiv.appendChild(node);}}
var loadingP=thisObject.Helper.createDocumentElement('p','loading_txt');var loadingText=document.createTextNode(' ');loadingP.appendChild(loadingText);var loadingDiv=thisObject.Helper.createDocumentElement('div','loading');var loadingBarDiv=thisObject.Helper.createDocumentElement('div','loading_bar');loadingDiv.appendChild(loadingBarDiv);var captionDiv=thisObject.Helper.createDocumentElement('div','caption');var scrollbarDiv=thisObject.Helper.createDocumentElement('div','scrollbar');var sliderDiv=thisObject.Helper.createDocumentElement('div','slider');scrollbarDiv.appendChild(sliderDiv);if(thisObject.buttons)
{var buttonPreviousDiv=thisObject.Helper.createDocumentElement('div','previous','button');var buttonNextDiv=thisObject.Helper.createDocumentElement('div','next','button');scrollbarDiv.appendChild(buttonPreviousDiv);scrollbarDiv.appendChild(buttonNextDiv);}
var navigationDiv=thisObject.Helper.createDocumentElement('div','navigation');navigationDiv.appendChild(captionDiv);navigationDiv.appendChild(scrollbarDiv);var backgroundBar=null;if(thisObject.backgroundBar){backgroundBar=thisObject.Helper.createDocumentElement('div','background_bar');thisObject.ImageFlowDiv.appendChild(backgroundBar)}
var success=false;if(thisObject.ImageFlowDiv.appendChild(imagesDiv)&&thisObject.ImageFlowDiv.appendChild(loadingP)&&thisObject.ImageFlowDiv.appendChild(loadingDiv)&&thisObject.ImageFlowDiv.appendChild(navigationDiv))
{success=true;}
return success;};this.loadingProgress=function()
{var p=thisObject.loadingStatus();if(p<100||thisObject.firstCheck===true&&thisObject.preloadImages===true)
{if(thisObject.firstCheck===true&&p==100)
{thisObject.firstCheck=false;window.setTimeout(thisObject.loadingProgress,100);}
else
{window.setTimeout(thisObject.loadingProgress,40);}}
else
{document.getElementById(thisObject.ImageFlowID+'_loading').style.display='none';document.getElementById(thisObject.ImageFlowID+'_loading_txt').style.display='none';window.setTimeout(thisObject.Helper.addResizeEvent,1000);thisObject.MouseDrag.init();thisObject.Touch.init();thisObject.Key.init();thisObject.refresh(true);document.getElementById(thisObject.ImageFlowID+'_scrollbar').style.visibility='visible';var startID=thisObject.startID-1;if(thisObject.imageScaling==false){startID+=Math.min(thisObject.imageFocusMax,parseInt((thisObject.max-1)/2));}
if(startID<0)
{startID=0;}
if(startID>thisObject.max-1)
{startID=thisObject.max-1;}
thisObject.glideTo(startID,!thisObject.startAnimation);if(thisObject.startAnimation===true)
{thisObject.moveTo(5000);}}};this.loadingStatus=function()
{var max=thisObject.imagesDiv.childNodes.length;var i=0,completed=0;var image=null,images=null;for(var index=0;index<max;index++)
{images=thisObject.getImgs(thisObject.imagesDiv.childNodes[index]);subcomplete=0;for(var j=0;j<images.length;j++)
{image=images[j];if(image&&image.nodeType==1&&image.nodeName=='IMG')
{if(image.complete===true||(image.width&&image.height))
{completed++;}
i++;}}}
if(i){var finished=Math.round((completed/i)*100);}else{var finished=0;}
var loadingBar=document.getElementById(thisObject.ImageFlowID+'_loading_bar');if(loadingBar){loadingBar.style.width=finished+'%';}
var loadingP=document.getElementById(thisObject.ImageFlowID+'_loading_txt');if(loadingP){var loadingTxt=document.createTextNode('loading images '+completed+'/'+i);loadingP.replaceChild(loadingTxt,loadingP.firstChild);}
return finished;};this.refresh=function()
{this.imagesDivWidth=thisObject.imagesDiv.offsetWidth+thisObject.imagesDiv.offsetLeft;this.maxHeight=Math.round(thisObject.imagesDivWidth/thisObject.aspectRatio);this.maxFocus=thisObject.imageFocusMax*thisObject.xStep;this.size=thisObject.imagesDivWidth*0.5;this.sliderWidth=thisObject.sliderWidth*0.5;this.scrollbarWidth=(thisObject.imagesDivWidth-(Math.round(thisObject.sliderWidth)*2))*thisObject.scrollbarP;this.imagesDivHeight=Math.round(thisObject.maxHeight*thisObject.imagesHeight);thisObject.ImageFlowDiv.style.height=(thisObject.maxHeight<=0?0:thisObject.maxHeight)+'px';thisObject.imagesDiv.style.height=(thisObject.imagesDivHeight<=0?0:thisObject.imagesDivHeight)+'px';thisObject.navigationDiv.style.height=Math.abs(thisObject.maxHeight-thisObject.imagesDivHeight)+'px';thisObject.captionDiv.style.width=(thisObject.imagesDivWidth<=0?0:thisObject.imagesDivWidth)+'px';thisObject.captionDiv.style.paddingTop=Math.round(thisObject.imagesDivWidth*0.02)+'px';thisObject.scrollbarDiv.style.width=Math.max(0,thisObject.scrollbarWidth)+'px';thisObject.scrollbarDiv.style.marginLeft=Math.round(thisObject.sliderWidth+((thisObject.imagesDivWidth-thisObject.scrollbarWidth)/2))+'px';thisObject.sliderDiv.style.cursor=thisObject.sliderCursor;thisObject.sliderDiv.onmousedown=function(){thisObject.MouseDrag.start(this);return false;};if(thisObject.buttons)
{thisObject.buttonPreviousDiv.onclick=function(){thisObject.MouseWheel.handle(1);};thisObject.buttonNextDiv.onclick=function(){thisObject.MouseWheel.handle(-1);};}
var multi=(thisObject.reflections===true)?thisObject.reflectionP+1:1;var max=thisObject.imagesDiv.childNodes.length;var i=0;var image=null;for(var index=0;index<max;index++)
{image=thisObject.imagesDiv.childNodes[index];if(image!==null&&image.nodeType==1&&image.nodeName=='DIV')
{this.indexArray[i]=index;image.url=image.getAttribute('longdesc');image.xPosition=(-i*thisObject.xStep);image.i=i;if(thisObject.firstRefresh)
{if(image.getAttribute('width')!==null&&image.getAttribute('height')!==null)
{image.w=image.getAttribute('width');image.h=image.getAttribute('height')*multi;}
else if(image.width!==null&&image.height!==null&&typeof(image.width)!='undefined'&&typeof(image.height)!='undefined')
{image.w=image.width;image.h=image.height;}
else
{image.w=image.offsetWidth;image.h=image.offsetHeight>0?image.offsetHeight:0;}
var real_images=thisObject.getImgs(image);if(typeof(thisObject.riow)=='undefined'||thisObject.riow.length<real_images.length){var continue_ok=true;for(var k=0;k<real_images.length;k++){if(real_images[k].nodeName=='IMG'&&!real_images[k].complete){continue_ok=false;break;}}
if(continue_ok){thisObject.riow=new Array();thisObject.rioh=new Array();thisObject.riot=new Array();thisObject.riol=new Array();for(var k=0;k<real_images.length;k++){real_image=real_images[k];thisObject.riow[k]=real_image.offsetWidth;thisObject.rioh[k]=real_image.offsetHeight;thisObject.riot[k]=0;thisObject.riol[k]=real_image.offsetLeft;}}}else{if(thisObject.imageScaling){var real_images=thisObject.getImgs(image);for(var k=0;k<real_images.length;k++){if(real_images[k].nodeName=='IMG'&&real_images[k].offsetHeight<=30){real_image=real_images[k];real_image.style.height=thisObject.rioh[k]+'px';real_image.style.width=thisObject.riow[k]+'px';real_image.style.top=thisObject.riot[k]+'px';real_image.style.left=thisObject.riol[k]+'px';}}}}}
if((image.w)>(image.h/(thisObject.reflectionP+1)))
{image.pc=thisObject.percentLandscape;image.pcMem=thisObject.percentLandscape;}
else
{image.pc=thisObject.percentOther;image.pcMem=thisObject.percentOther;}
if(thisObject.imageScaling===false)
{image.style.position='relative';image.style.display='inline';}
image.style.cursor=thisObject.imageCursor;image.style.position='absolute';i++;}}
this.max=thisObject.indexArray.length;if(thisObject.imageScaling===false)
{image=thisObject.imagesDiv.childNodes[thisObject.indexArray[0]];this.totalImagesWidth=image.w*thisObject.max;for(var i=0;i<thisObject.indexArray.length;i++){thisObject.imagesDiv.childNodes[thisObject.indexArray[i]].style.paddingLeft=(thisObject.xStep*i)+'px';}
thisObject.imagesDiv.style.height=image.h+'px';thisObject.navigationDiv.style.height=(thisObject.maxHeight<image.h?0:thisObject.maxHeight-image.h)+'px';}
var noAnimation=thisObject.firstRefresh&&!thisObject.startAnimation;if(thisObject.firstRefresh)
{thisObject.firstRefresh=false;}
if(!noAnimation||thisObject.startID<0||thisObject.startID>thisObject.max||(thisObject.startID==1&&(thisObject.imageScaling||thisObject.max<=2))){thisObject.glideTo(thisObject.imageID);thisObject.moveTo(thisObject.current);}};this.moveTo=function(x)
{this.current=x;this.zIndex=thisObject.max;for(var index=0;index<thisObject.max;index++)
{var image=thisObject.imagesDiv.childNodes[thisObject.indexArray[index]];if(!image){continue;}
var real_images=thisObject.getImgs(image);var currentImage=index*-thisObject.xStep;if(thisObject.imageScaling)
{if((currentImage+thisObject.maxFocus)<thisObject.memTarget||(currentImage-thisObject.maxFocus)>thisObject.memTarget)
{image.style.visibility='hidden';image.style.display='none';for(var i=0;i<real_images.length;i++)
{real_image=real_images[i];real_image.style.visibility='hidden';real_image.style.display='none';}}
else
{var z=(Math.sqrt(10000+x*x)+100)*thisObject.imagesM;var xs=x/z*thisObject.size+thisObject.size;image.style.display='block';for(var i=0;i<real_images.length;i++)
{real_image=real_images[i];real_image.style.display='block';}
var newImageH=(image.h/image.w*image.pc)/z*thisObject.size;var newImageW=0;if(newImageH>thisObject.maxHeight){newImageH=thisObject.maxHeight;newImageW=image.w*newImageH/image.h;}else{newImageW=image.pc/z*thisObject.size;}
image.style.left=xs-(image.pc/2)/z*thisObject.size+'px';if(newImageW&&newImageH)
{var previous_val=image.h;image.style.height=newImageH+'px';var proportion_h=parseFloat(image.style.height)/previous_val;previous_val=image.w;image.style.width=newImageW+'px';var proportion_w=parseFloat(image.style.width)/previous_val;var newImageTop=(thisObject.imagesDivHeight-newImageH)+((newImageH/(thisObject.reflectionP+1))*thisObject.reflectionP);image.style.top=newImageTop+'px';image.style.fontSize=proportion_h+'em';for(var i=0;i<real_images.length;i++)
{real_image=real_images[i];real_image.style.height=(thisObject.rioh[i]*proportion_h)+'px';real_image.style.width=(thisObject.riow[i]*proportion_w)+'px';if(thisObject.riot[i])
real_image.style.top=(thisObject.riot[i]*proportion_h)+'px';if(thisObject.riol[i]){real_image.style.left=(thisObject.riol[i]*proportion_w)+'px';}}}
image.style.visibility='visible';for(var i=0;i<real_images.length;i++)
{real_image=real_images[i];real_image.style.display='block';real_image.style.visibility='visible';}
switch(x<0)
{case true:this.zIndex++;break;default:this.zIndex=thisObject.zIndex-1;break;}
switch(image.i==thisObject.imageID)
{case false:image.onclick=function(){thisObject.glideTo(this.i);return false;};break;default:this.zIndex=thisObject.zIndex+1;if(real_images[0].src!=='')
{image.onclick=thisObject.onClick;}
break;}
image.style.zIndex=thisObject.zIndex;}}
else
{if((currentImage+thisObject.maxFocus)<thisObject.memTarget||(currentImage-thisObject.maxFocus)>thisObject.memTarget)
{image.style.visibility='hidden';for(var i=0;i<real_images.length;i++)
{real_image=real_images[i];real_image.style.visibility='hidden';real_image.style.display='none';}}
else
{image.style.visibility='visible';for(var i=0;i<real_images.length;i++)
{real_image=real_images[i];real_image.style.display='inline';real_image.style.visibility='visible';}
if(real_images[0].src!=='')
{image.onclick=thisObject.onClick;}}
image.style.zIndex=thisObject.max-image.i;thisObject.imagesDiv.style.marginLeft=((thisObject.ImageFlowDiv.offsetWidth/2+thisObject.xStep/2)-(thisObject.max*thisObject.xStep-x)+thisObject.marginLeft)+'px';}
x+=thisObject.xStep;}};this.glideTo=function(imageID,noAnimation)
{var x=-imageID*thisObject.xStep;this.target=x;this.memTarget=x;this.imageID=imageID;var caption_el=thisObject.imagesDiv.childNodes[imageID];if(!caption_el){caption='&nbsp;';}else{var caption=caption_el.getAttribute('alt');if(caption===''||thisObject.captions===false)
{caption='&nbsp;';}}
thisObject.captionDiv.innerHTML=caption;if(thisObject.MouseDrag.busy===false)
{this.newSliderX=(imageID*thisObject.scrollbarWidth)/Math.max(1,(thisObject.max-1))-thisObject.MouseDrag.newX;thisObject.sliderDiv.style.marginLeft=(thisObject.newSliderX-thisObject.sliderWidth)+'px';}
if(thisObject.opacity===true||thisObject.imageFocusM!==thisObject.defaults.imageFocusM)
{thisObject.Helper.setOpacity(thisObject.imagesDiv.childNodes[imageID],thisObject.opacityArray[0]);thisObject.imagesDiv.childNodes[imageID].pc=thisObject.imagesDiv.childNodes[imageID].pc*thisObject.imageFocusM;var opacityValue=0;var rightID=0;var leftID=0;var last=thisObject.opacityArray.length;for(var i=1;i<(thisObject.imageFocusMax+1);i++)
{if((i+1)>last)
{opacityValue=thisObject.opacityArray[last-1];}
else
{opacityValue=thisObject.opacityArray[i];}
rightID=imageID+i;leftID=imageID-i;if(rightID<thisObject.max)
{thisObject.Helper.setOpacity(thisObject.imagesDiv.childNodes[rightID],opacityValue);thisObject.imagesDiv.childNodes[rightID].pc=thisObject.imagesDiv.childNodes[rightID].pcMem;}
if(leftID>=0)
{thisObject.Helper.setOpacity(thisObject.imagesDiv.childNodes[leftID],opacityValue);thisObject.imagesDiv.childNodes[leftID].pc=thisObject.imagesDiv.childNodes[leftID].pcMem;}}}
if(thisObject.busy===false)
{var noAnimation=typeof(noAnimation)!='undefined'&&noAnimation;window.setTimeout(function(){thisObject.animate(noAnimation);},50);thisObject.busy=true;}};this.animate=function(noAnimation)
{switch(thisObject.target<thisObject.current-1||thisObject.target>thisObject.current+1)
{case true:var noAnimation=typeof(noAnimation)!='undefined'&&noAnimation;var movement=thisObject.current+(noAnimation?thisObject.target:((thisObject.target-thisObject.current)/3));thisObject.moveTo(movement);window.setTimeout(function(){thisObject.animate(false);},50);thisObject.busy=true;break;default:thisObject.busy=false;thisObject.endAnimationCallback(thisObject);break;}};this.MouseWheel={init:function()
{if(window.addEventListener)
{thisObject.ImageFlowDiv.addEventListener('DOMMouseScroll',thisObject.MouseWheel.get,false);}
thisObject.Helper.addEvent(thisObject.ImageFlowDiv,'mousewheel',thisObject.MouseWheel.get);},get:function(event)
{var delta=0;if(!event)
{event=window.event;}
if(event.wheelDelta)
{delta=event.wheelDelta/120;}
else if(event.detail)
{delta=-event.detail/3;}
if(delta)
{thisObject.MouseWheel.handle(delta);}
thisObject.Helper.suppressBrowserDefault(event);},handle:function(delta)
{var change=false;var newImageID=0;if(delta>0)
{if(thisObject.imageID>=1)
{newImageID=thisObject.imageID-1;change=true;}}
else
{if(thisObject.imageID<(thisObject.max-1))
{newImageID=thisObject.imageID+1;change=true;}}
if(change===true)
{thisObject.glideTo(newImageID);}}};this.MouseDrag={object:null,objectX:0,mouseX:0,newX:0,busy:false,init:function()
{thisObject.Helper.addEvent(thisObject.ImageFlowDiv,'mousemove',thisObject.MouseDrag.drag);thisObject.Helper.addEvent(thisObject.ImageFlowDiv,'mouseup',thisObject.MouseDrag.stop);thisObject.Helper.addEvent(document,'mouseup',thisObject.MouseDrag.stop);thisObject.ImageFlowDiv.onselectstart=function()
{var selection=true;if(thisObject.MouseDrag.busy===true)
{selection=false;}
return selection;};},start:function(o)
{thisObject.MouseDrag.object=o;thisObject.MouseDrag.objectX=thisObject.MouseDrag.mouseX-o.offsetLeft+thisObject.newSliderX;},stop:function()
{thisObject.MouseDrag.object=null;thisObject.MouseDrag.busy=false;},drag:function(e)
{var posx=0;if(!e)
{e=window.event;}
if(e.pageX)
{posx=e.pageX;}
else if(e.clientX)
{posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;}
thisObject.MouseDrag.mouseX=posx;if(thisObject.MouseDrag.object!==null)
{var newX=(thisObject.MouseDrag.mouseX-thisObject.MouseDrag.objectX)+thisObject.sliderWidth;if(newX<(-thisObject.newSliderX))
{newX=-thisObject.newSliderX;}
if(newX>(thisObject.scrollbarWidth-thisObject.newSliderX))
{newX=thisObject.scrollbarWidth-thisObject.newSliderX;}
var step=(newX+thisObject.newSliderX)/(thisObject.scrollbarWidth/(thisObject.max-1));var imageID=Math.round(step);thisObject.MouseDrag.newX=newX;thisObject.MouseDrag.object.style.left=newX+'px';if(thisObject.imageID!==imageID)
{thisObject.glideTo(imageID);}
thisObject.MouseDrag.busy=true;}}};this.Touch={x:0,startX:0,stopX:0,busy:false,first:true,init:function()
{thisObject.Helper.addEvent(thisObject.navigationDiv,'touchstart',thisObject.Touch.start);thisObject.Helper.addEvent(document,'touchmove',thisObject.Touch.handle);thisObject.Helper.addEvent(document,'touchend',thisObject.Touch.stop);},isOnNavigationDiv:function(e)
{var state=false;if(e.touches)
{var target=e.touches[0].target;if(target===thisObject.navigationDiv||target===thisObject.sliderDiv||target===thisObject.scrollbarDiv)
{state=true;}}
return state;},getX:function(e)
{var x=0;if(e.touches)
{x=e.touches[0].pageX;}
return x;},start:function(e)
{thisObject.Touch.startX=thisObject.Touch.getX(e);thisObject.Touch.busy=true;thisObject.Helper.suppressBrowserDefault(e);},isBusy:function()
{var busy=false;if(thisObject.Touch.busy===true)
{busy=true;}
return busy;},handle:function(e)
{if(thisObject.Touch.isBusy&&thisObject.Touch.isOnNavigationDiv(e))
{if(thisObject.Touch.first)
{thisObject.Touch.stopX=((thisObject.max-1)-thisObject.imageID)*(thisObject.imagesDivWidth/(thisObject.max-1));thisObject.Touch.first=false;}
var newX=-(thisObject.Touch.getX(e)-thisObject.Touch.startX-thisObject.Touch.stopX);if(newX<0)
{newX=0;}
if(newX>thisObject.imagesDivWidth)
{newX=thisObject.imagesDivWidth;}
thisObject.Touch.x=newX;var imageID=Math.round(newX/(thisObject.imagesDivWidth/(thisObject.max-1)));imageID=(thisObject.max-1)-imageID;if(thisObject.imageID!==imageID)
{thisObject.glideTo(imageID);}
thisObject.Helper.suppressBrowserDefault(e);}},stop:function()
{thisObject.Touch.stopX=thisObject.Touch.x;thisObject.Touch.busy=false;}};this.Key={init:function()
{document.onkeydown=function(event){thisObject.Key.handle(event);};},handle:function(event)
{var charCode=thisObject.Key.get(event);switch(charCode)
{case 39:thisObject.MouseWheel.handle(-1);break;case 37:thisObject.MouseWheel.handle(1);break;}},get:function(event)
{event=event||window.event;return event.keyCode;}};this.Helper={addEvent:function(obj,type,fn)
{if(obj.addEventListener)
{obj.addEventListener(type,fn,false);}
else if(obj.attachEvent)
{obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event);};obj.attachEvent("on"+type,obj[type+fn]);}},setOpacity:function(object,value)
{if(thisObject.opacity===true)
{object.style.opacity=value/10;object.style.filter='alpha(opacity='+value*10+')';}},createDocumentElement:function(type,id,optionalClass)
{var element=document.createElement(type);element.setAttribute('id',thisObject.ImageFlowID+'_'+id);if(optionalClass!==undefined)
{id+=' '+optionalClass;}
element.setAttribute('class',id);element.setAttribute('className',id);return element;},suppressBrowserDefault:function(e)
{if(e.preventDefault)
{e.preventDefault();}
else
{e.returnValue=false;}
return false;},addResizeEvent:function()
{var otherFunctions=window.onresize;if(typeof window.onresize!='function')
{window.onresize=function()
{thisObject.refresh();};}
else
{window.onresize=function(){if(otherFunctions)
{otherFunctions();}
thisObject.refresh();};}}};this.getImgs=function(div)
{var imgs_list=new Array();var images;if(div&&div!==null&&div.nodeType==1)
{var max=div.childNodes.length;var image=null;for(var index=0;index<max;index++)
{image=div.childNodes[index];if(image!==null&&image.nodeType==1&&!hasClassName(image,'imageflowIgnore'))
{if(image.nodeName=='IMG')
{imgs_list.push(image);}
else
{if(image.nodeName=='DIV'){imgs_list.push(image);}
images=thisObject.getImgs(image);for(var i=0;i<images.length;i++)
{imgs_list.push(images[i]);}}}}}
return imgs_list;};}
var domReadyEvent={name:"domReadyEvent",events:{},domReadyID:1,bDone:false,DOMContentLoadedCustom:null,add:function(handler)
{if(!handler.$$domReadyID)
{handler.$$domReadyID=this.domReadyID++;if(this.bDone)
{handler();}
this.events[handler.$$domReadyID]=handler;}},remove:function(handler)
{if(handler.$$domReadyID)
{delete this.events[handler.$$domReadyID];}},run:function()
{if(this.bDone)
{return;}
this.bDone=true;for(var i in this.events)
{this.events[i]();}},schedule:function()
{if(this.bDone)
{return;}
if(/KHTML|WebKit/i.test(navigator.userAgent))
{if(/loaded|complete/.test(document.readyState))
{this.run();}
else
{setTimeout(this.name+".schedule()",100);}}
else if(document.getElementById("__ie_onload"))
{return true;}
if(typeof this.DOMContentLoadedCustom==="function")
{if(typeof document.getElementsByTagName!=='undefined'&&(document.getElementsByTagName('body')[0]!==null||document.body!==null))
{if(this.DOMContentLoadedCustom())
{this.run();}
else
{setTimeout(this.name+".schedule()",250);}}}
return true;},init:function()
{if(document.addEventListener)
{document.addEventListener("DOMContentLoaded",function(){domReadyEvent.run();},false);}
setTimeout("domReadyEvent.schedule()",100);function run()
{domReadyEvent.run();}
if(typeof addEvent!=="undefined")
{addEvent(window,"load",run);}
else if(document.addEventListener)
{document.addEventListener("load",run,false);}
else if(typeof window.onload==="function")
{var oldonload=window.onload;window.onload=function()
{domReadyEvent.run();oldonload();};}
else
{window.onload=run;}/*@cc_on
   @if (@_win32 || @_win64)
   document.write("<script id=__ie_onload defer src=\"//:\"><\/script>");
   var script = document.getElementById("__ie_onload");
   script.onreadystatechange = function()
   {
    if (this.readyState == "complete")
    {
     domReadyEvent.run(); // call the onload handler
    }
   };
   @end
  @*/}};