/* Copyright (c) 2011 www.mailrouge.com - no copy or any usage allowed without explicit and nominative and written authorisation of mailrouge.com */
/* 2011-12, 14 [17:22:58] */
var br=String.fromCharCode(13,10);function _iparseInt(str){if(str.indexOf('0')==0)str=str.replace(/^\0+/g,'');str=parseInt(str);if(isNaN(str))str=0;return str;}function do_confirm(mystring){if(confirm(mystring))return(1);else return(0);}function make_yoo(what){if(islo)return;if(!what)what='';var CPR=cpr.toUpperCase();var mytitle=prjtit;if(what)mytitle+=': '+what;if(mytitle.length>100)mytitle=mytitle.substr(0,100);var mybody=document.getElementsByTagName('BODY').item(0);var myscreen=' ['+screen.availWidth+'*'+screen.availHeight+'|'+mybody.clientWidth+'*'+mybody.clientHeight+']';mytitle+=myscreen;var ititle=escape(mytitle);var ivlo=escape('~['+cpr+'[');var so='http://www.mailrouge.fr/a/yoo2.php?title='+ititle+'&vlo='+ivlo+'&callback=?';$.getJSON(so,donothing);}var no_rem_zoom=false;function hide_f(){nocomment=false;$('div[id^=divform_][isformulaire=1]').hide();if(!no_rem_zoom)rem_zoom();rem_cse();try{if(typeof diapooff=='function'&&$('#ccdia').is(':visible'))diapooff();}catch(e){}var myifr=id_exists('ifr_f');if(!myifr||myifr.style.display=='none')return;myifr.style.display='none';myifr.src='about:blank';}function contact(what){nocomment=false;if(!what)return;rem_zoom();what=what.replace(/^contact_/,'abk_');if(!what||what.indexOf(what)!=0||!id_exists(what))return;var myitem=id_exists(what);var subj=myitem.getAttribute('abk1');var abk3=myitem.getAttribute('abk3');var abk6=myitem.getAttribute('abk6');var abk5=myitem.getAttribute('abk5');var ema=(abk3&&abk6&&abk5)?abk3+'@'+abk6+'.'+abk5:'';var mess=myitem.getAttribute('abk4');var opt=myitem.getAttribute('abk9');show_f(subj,mess,ema,opt);}function show_f(xsubj,xmess,xema,xopt){nocomment=false;if(typeof formulaire!='function')return;rem_zoom();if(!xopt)xopt='default';else if(xopt.search(/^[a-zA-Z0-9]{1,3}$/gi)!=-1)xopt='default_'+xopt;var subj2=(xopt)?xopt:xsubj;if(!xsubj)xsubj='';if(!xmess)xmess='';if(!xema)xema='';var id_form_={form:xopt,id_prj:'',id_url:'',subj:xsubj,mess:xmess,ema:xema};formulaire(id_form_);}function ifr_position(myifr){nocomment=false;get_docsize();myifr.style.left=form_left+_parseInt(jdocl)+'px';myifr.style.top=form_top+_parseInt(jdoct)+'px';return(true);}function aalert(mystring){if(!mystring)return;alert(unescape(mystring));}function hide_ifr(){nocomment=false;$('#popifr1').hide();}function is_uid_flatevents(is_uid,ev1){if(!is_flatevents())return;next_flatevents_=[];next_flatevents0_=[];rem_flatevents();show_flatevents2(is_uid,ev1);}var pop_single=false;function show_ifr(myrequest){if(pop_single){idone=1;if(typeof ifrxyz_=='undefined')ifrxyz_=[0,0,0,0,0];yes_ifr(myrequest,ifrxyz_[0],ifrxyz_[1],ifrxyz_[2],ifrxyz_[3],ifrxyz_[4]);return;}nocomment=false;if(is_flatevents()){add_temoin('from show_ifr, myrequest : '+myrequest+' !');}if(myrequest.search(/^pop_itb?.php\?[A-Z]{1,3}$/)!=-1){myrequest=myrequest.replace(/^pop_itb?.php\?([A-Z]{1,3})$/,'$1');}else if(myrequest.search(/^pop_itb?.php\?(prev|next)?(s|p|section|page)\d+/)!=-1||myrequest.search(/^pop_itb?.php\?specific-\w{1,15}/)!=-1){myrequest=myrequest.replace(/^pop_itb?.php\?(.*)$/,'$1');}else if(myrequest.search(/^pop_itb?.php\?vide$/)!=-1){var mydatas='<div style="display:none;">&nbsp;</div>';var mytox=base_tox;var mytoy=0;var tow=0;var toh=0;display_ifr(mydatas,mytox,mytoy,tow,toh);return;}else if((myrequest.search(/^https?:\/\//gi)!=-1||myrequest.search(/^\.\.?\//gi)!=-1)&&myrequest.search(/-([A-Z]{1,3})$/)==-1){var mytox=base_tox;var mytoy=0;var tow=0;var toh=0;var mydatas=myrequest;display_ifr(mydatas,mytox,mytoy,tow,toh);return;}if(myrequest.search(/-([A-Z]{1,3})$/)!=-1){myrequest=myrequest.replace(/-([A-Z]{1,3})$/,'~$1');}if(myrequest.search(/~[A-Z]{1,3}/)!=-1){myGroup=myrequest.replace(/^.*~([A-Z]{1,3}).*$/,'$1');}else myGroup='';try{$('#mymovie').get(0).SetVariable("ifrh",myrequest);}catch(e){return false;}}var next_flatevents0_=[];var allow_check_flatevents=true;function yes_ifr(myrequest,tox,toy,tow,toh,bottompos){nocomment=false;var is_toh=-1;var is_uid='';if(toh&&typeof toh=='string'&&toh.search(/^[A-Z]{1,3}$/g)!=-1){is_uid=toh;toh=0;}if(is_flatevents())add_temoin('from yes_ifr, myrequest : '+myrequest+', tox: '+tox+', toy: '+toy+', tow: '+tow+', toh:'+toh+', is_uid : '+is_uid+', bottompos: '+bottompos+' !');if(idone<1)return;if(myrequest.search(/^pop_itb?.php\?vide$/)!=-1){var mydatas='<div style="display:none;">&nbsp;</div>';var mytox=base_tox;var mytoy=0;var tow=0;var toh=0;is_uid_flatevents(is_uid,'vide');allow_check_flatevents=false;display_ifr(mydatas,mytox,mytoy,tow,toh,bottompos);allow_check_flatevents=true;return;}else if(myrequest.search(/^https?:\/\//gi)!=-1||myrequest.search(/^\.\.?\//gi)!=-1){if(tox=='target'&&(!toy||toy=='_top')){document.location.href=myrequest;return;}else{is_uid_flatevents(is_uid,'http');display_ifr(myrequest,tox,toy,tow,toh,bottompos);return;}}if(pop_single&&(myrequest.search(/^(s|p|section|page|next|prev)(\d+)/)!=-1||myrequest.indexOf('specific-')==0)){myrequest='pop_itb.php?'+myrequest;}myrequest=myrequest.replace(/pop_it\.php/gi,'pop_itb.php');if(myrequest.search(/\?(s|p|section|page)(\d+)/)!=-1){var ev1=myrequest.replace(/^.*\?(s|p|section|page)(\d+).*$/,"$1$2");}else var ev1='';if(myrequest.search(/~[A-Z]{1,3}/)!=-1){var ev2=myrequest.replace(/^.*~([A-Z]{1,3}).*$/,"$1");}else var ev2='';if(ev1||ev2)next_flatevents0_=[ev1,ev2];else{next_flatevents0_=[];}var mytime=new Date().getTime();var ajaxobj={async:true,url:myrequest,type:"POST",cache:false,error:function(XMLHttpRequest,textStatus,errorThrown){var msg='oops.. recommencer, problème de connection';alert(msg);},success:function(response,textStatus){if(typeof check_group_=='function'){var my_=check_group_(myrequest,tox,toy,tow,toh,bottompos);display_ifr(response,my_[0],my_[1],my_[2],my_[3],my_[4]);}else{display_ifr(response,tox,toy,tow,toh,bottompos);}},data:{ati:mytime},global:true};$.ajax(ajaxobj);}function donothing(){}var lasttoy=0;function is_overflow(mydatas){var toreturn=(mydatas.indexOf('id=blogtable')!=-1||mydatas.indexOf('id="blogtable"')!=-1||mydatas.indexOf('isoverflow')!=-1)?true:false;return toreturn;}function display_ifr(mydatas,tox,toy,tow,toh,bottompos){nocomment=false;var notoy=(toy==-1)?true:false;if(islo&&!islo2&&!addtemoin&&typeof add_temoin=='function')add_temoin();if(toy!=null)lasttoy=toy;tow=base_tow;if(mydatas.search(/^https?:\/\//gi)!=-1||mydatas.search(/^\.\.?\//gi)!=-1){if(!toh)toh=base_toh;if(!$('#popifr1').length){$('<iframe id=popifr1 name=popifr1 style="display:none;" framespacing=0 frameborder=0 marginHeight=0 marginWidth=0></iframe>').appendTo('body').css({position:'absolute',zIndex:1000,backgroundColor:ifrbgc});if(ifrbgc=='transparent')$('#popifr1').attr('allowTransparency',true);}$('#popifr1').css({left:tox,top:toy,width:tow,height:toh}).attr('src',mydatas).show();$('#popifr').hide().html('');check_flatevents();var myyoo=mydatas.replace(/^(http:\/\/|\.\.?\/)/i,'');if(myyoo){myyoo=myyoo.replace(/\.php/gi,' ');myyoo=myyoo.replace(/(\?|\=|\&amp;|\&|\/)/gi,' ');}resize_flc('',tox,toy,tow,toh,myyoo,bottompos);return;}var xyw_=search_fixed_xyw(mydatas);if(xyw_!='no'){if(xyw_[0]!=-1)tox=xyw_[0];if(xyw_[1]!=-1)toy=xyw_[1];if(xyw_[2]!=-1)tow=xyw_[2];if(xyw_[3]&&xyw_[3]!=-1)toh=xyw_[3];nocomment_.push('clipimg');}else{nocomment_=[];}if(typeof divbgc!='string'||!divbgc){divbgc='white';}if(!$('#popifr').length){$('<div id=popifr style="display:none;"></div>').appendTo('body').css({position:'absolute',display:'none',zIndex:1000,overflow:'hidden'});$('#popifr').css({background:divbgc});}var iheight=(toh&&toh>0)?toh:'';var ioverflow=(toh&&toh>0)?'auto':'hidden';var ibackground=divbgc;var pop_background=search_pop_background(mydatas);if(pop_background!='no'){ibackground=pop_background;nocomment_.push('clipimg');}else{nocomment_=[];}var myifr,myifr2;myifr=id_exists('popifr');if(is_flatevents()){try{var flat_yn=flat_pos();if(flat_yn!=-9999)toy=flat_top_[1];}catch(e){};};var isorp=mydatas.indexOf(' sorp="');var mysorp='p';if(isorp){try{mysorp=mydatas.split(' sorp="')[1].substr(0,1);if(mysorp!='s'&&mysorp!='p')mysorp='';}catch(e){mysorp='p';}}mysorp+='body';if(!($('#popifr').hasClass(mysorp)))$('#popifr').removeClass().addClass(mysorp);var mybgc={background:ibackground};var tempo1=$('#popifr').attr('do_callback');if(tempo1&&typeof callback_datas=='function'){mydatas=callback_datas(mydatas,tempo1);$('#popifr').removeAttr('do_callback');}if(pop_scroll!=''&&pop_height!=0&&!is_overflow(mydatas)){ioverflow=pop_scroll;iheight=pop_height;toh=pop_height;if(mybgc)$('#popifr').css(mybgc);var mycssobj=(!notoy)?{left:tox,top:toy,width:tow,height:iheight,overflow:ioverflow,overflowX:'hidden'}:{left:tox,width:tow,height:iheight,overflow:ioverflow,overflowX:'hidden'};$('#popifr').css(mycssobj).html(mydatas).show();myifr2='';var cssobj=(_parseInt(myifr.scrollHeight)>pop_height)?{borderBottom:'1px dotted #dddddd'}:{border:'0px'};$('#popifr').css(cssobj);}else{if(mybgc)$('#popifr').css(mybgc);var mycssobj=(!notoy)?{left:tox,top:toy,width:tow,height:iheight,overflow:ioverflow,border:'0px'}:{left:tox,width:tow,height:iheight,overflow:ioverflow,border:'0px'};$('#popifr').css(mycssobj).html(mydatas).show();myifr2=id_exists('popifr');}check_someevents($('#popifr'));$('#popifr1').hide().attr('src','about:blank');check_flatevents();if(id_exists('divblog')){if(typeof hover_trmess=='function'){hover_trmess();}else{$.getScript('./blog'+jsmin+'.js',function(){if(typeof hover_trmess=='function')hover_trmess();else window.setTimeout(function(){if(typeof hover_trmess=='function')hover_trmess();},500);});}flbc=[myifr,tox,toy,tow,toh,'no',0];}else flbc=[];var mytit=id_exists('thetit');myyoo=(mytit)?mytit.innerHTML:'';if(!check_swf())resize_flc(myifr2,tox,toy,tow,toh,myyoo,bottompos);else window.setTimeout(function(){resize_flc(myifr2,tox,toy,tow,toh,myyoo,bottompos);},100);window.setTimeout(function(){check_img(myifr);},500);}var isflat=false;function is_flatevents(){if(isflat)return true;if(typeof show_flatevents_!='function')return false;else{isflat=true;return true;}}var myGroup='';function check_flatevents(){if(!is_flatevents())return;if(allow_check_flatevents)show_flatevents_();myGroup='';}function search_fixed_xyw(mydatas){if(mydatas.search(/fixed_xyw=\"[^\"]+\"/gi)==-1)return'no';var itis=mydatas.search(/fixed_xyw=\"[^\"]+\"/gi);var mydatas2=mydatas.substr(itis,50);var splitted_=mydatas2.split('"');var xyw=splitted_[1];try{eval('var xyw_=['+xyw+']');for(var i in xyw_)xyw_[i]=_parseInt(xyw_[i]);}catch(e){return'no';}return xyw_;}function search_pop_background(mydatas){if(mydatas.search(/pop_background=\"[^\"]+\"/gi)==-1)return'no';var itis=mydatas.search(/pop_background=\"[^\"]+\"/gi);var mydatas2=mydatas.substr(itis,300);var splitted_=mydatas2.split('"');var xyw=(splitted_.length)?splitted_[1]:'no';return xyw;}var flbc=[];function resize_flbc_blog(){if(flbc&&flbc.length==7)resize_flc(flbc[0],flbc[1],flbc[2],flbc[3],flbc[4],flbc[5],flbc[6]);}function check_img(myifr){nocomment=false;var collect=myifr.getElementsByTagName('IMG');for(var i=0;i<collect.length;i++){var myitem=collect[i];if(!myitem.complete&&myitem.src)myitem.src=myitem.src+'?'+new Date().getTime();}}function check_swf(){nocomment=false;var myscript=id_exists('mrg_swf');if(!myscript)return(0);var mytxt=myscript.innerHTML;eval(mytxt);return(1);}function tellme(objid,objattr){nocomment=false;var myitem=id_exists(objid);if(!myitem)return('');var myattrib=myitem.getAttribute(objattr);if(!myattrib)return('');return myattrib;}function pop_next(){var mybutton=$('#hidden_next');if(mybutton.length)mybutton.click();else if(typeof prevnext_menu=='function')prevnext_menu(1);}function pop_prev(){var mybutton=$('#hidden_prev');if(mybutton.length)mybutton.click();else if(typeof prevnext_menu=='function')prevnext_menu(-1);}function keydown_pop(e){if($('#divblog').length){var mytarget=e.target;if(mytarget){var mynodename=mytarget.nodeName;if(mynodename&&(mynodename=='INPUT'||mynodename=='TEXTAREA')){return true;}}}if($('img[name=is_dia]').length){e.preventDefault();if(typeof keydown_diapo=='function'){keydown_diapo(e);}return;}else if($('#divvisit').length){e.preventDefault();if(typeof keydown_visit=='function'){keydown_visit(e);}return;}else if($('div[id^=divform_][isformulaire=1]:visible').length){return true;}else if($('div[name=divavis]:visible').length){e.preventDefault();var ee=e.keyCode;if(ee==27||ee==46){rem_zoom();}else if($('div[name=divavis][diapo=1]:visible').length){if(ee==9){toggle_dia();}else if(ee==32||ee==13)go_zoom('next');else if(ee>=33&&ee<=36){if(ee==36)go_zoom('start');else if(ee==35)go_zoom('end');else if(ee==34)go_zoom('prev');else if(ee==33)go_zoom('next');}else if(ee>=37&&ee<=40){if(ee==37)go_zoom('prev');else if(ee==39)go_zoom('next');else if(ee==38)go_zoom('prev');else if(ee==40)go_zoom('next');}}return false;}e.preventDefault();var ee=e.keyCode;if(ee==37)pop_prev();else if(ee==39)pop_next();return false;}function resize_flc(myifr,tox,toy,tow,toh,myyoo,bottompos){hide_f();empty_zoom();accordeon($('#popifr'));if(pop_single&&!dpp){check_tvi();if(myyoo!='no')make_yoo(myyoo);return;}if(bottompos==null||!bottompos)bottompos=false;if(toh&&!myifr)var myheight=toh;else{var myheight=_parseInt(myifr.scrollHeight);if(myheight&&myheight>=min_popheight){var myitem=id_exists('imgpndown');if(myitem)myitem.className='';}}if(toy==null&&lasttoy!=null)toy=lasttoy;var addtoy=0;var newheight=myheight+toy+addtoy;if(!pageheight)pageheight=base_pageheight;var newheight0=newheight;if(newheight<=pageheight)newheight=pageheight;if(dpp){if(typeof parent.aff_gtp1=='function'){var myt2=$('#iqs').attr('t2');var myqs=$('#iqs').attr('qs');;parent.aff_gtp1(myt2,myqs,myheight+3);}}else{var myflc=id_exists('flc');myflc.style.height=newheight;var mysetvar=newheight0+':coucou:';$('#mymovie').get(0).SetVariable("ifrh",mysetvar);var mxr=_parseInt(tox+tow);$('#mymovie').get(0).SetVariable("ifrho",mxr);if(myyoo==null||!myyoo)myyoo=myheight;}var newheight1=_parseInt(newheight);if(newheight1&&$('[bottom]').length){if(newheight1>swf_height)newheight1=swf_height;var decah=_parseInt($('[bottom]').attr('decah'))+newheight1;$('[bottom]').css({top:decah});var cpr2=cpr.replace(/[0]$/,'');}check_tvi();if(bottompos)window.scrollTo(0,0);if(myyoo!='no')make_yoo(myyoo);}function no_show_avis(myimg){if(!myimg)return;var myselection=$('div[name=divavis], #avis_quit');if(myimg==-1){myselection.hide('slow');return;}myselection.hide();var myimg2=myimg.replace(/[^\w]+/gi,'_');get_docsize();var mytop=jdoct+10;var myleft=400;var mytopquit=mytop+500;var myleftquit=myleft-4;if($('div[name=divavis][image='+myimg2+']').length){$('div[name=divavis][image='+myimg2+']').css({top:mytop,left:myleft}).fadeIn('slow');$('#avis_quit').css({top:mytopquit,left:myleftquit}).fadeIn('slow');return;}var ismulti=false;var mypath='http://grandchamp78.lamairie.net/img/';if(myimg.indexOf('http://')==0)mypath='';var myimg2_=myimg.split('.');if(myimg2_.length==3&&myimg2_[1].length>1){ismulti=true;var imgcode_=[];var imgname='';var imgstyle='';for(var ii=0;ii<myimg2_[1].length;ii++){imgname=mypath+myimg2_[0]+'.'+myimg2_[1].substr(ii,1)+'.'+myimg2_[2];imgstyle=(ii==0)?'':' style="border-Top: 2px dashed gray"';imgcode_.push('<img src="'+imgname+'" border=0'+imgstyle+' />');}var imgcode=imgcode_.join('<br />');}else{var imgcode='<img src="'+mypath+myimg+'" border=0 />';}$('<div name=divavis image="'+myimg2+'" style="position: absolute; top: '+mytop+'px; left: '+myleft+'px; z-Index: 30000000; border: 2px dodgerblue dotted; width: 600px; height: 550px; overflow: scroll; background-color: white; cursor:pointer;" title="cliquer pour fermer" onclick="show_avis(-1);"></div>').appendTo('body').html(imgcode);if(!$('#avis_quit').length)$('<img id=avis_quit src="http://www.mailrouge.fr/img/all/rte_quit.gif" width=18 height=18 border=0 style="cursor: pointer; position: absolute; top: '+mytopquit+'px; left: '+myleftquit+'px; z-Index: 30000001;" title="cliquer pour fermer" onclick="show_avis(-1);" />').appendTo('body');else $('#avis_quit').css({top:mytopquit,left:myleftquit}).fadeIn('slow');}function check_someevents($mycontainer){if(!$mycontainer)$mycontainer=$(document);$mycontainer.find('img.img_dia').removeAttr('onclick').click(function(){pop_dia(this);});pop_mosa_titles();}function switch_overout($mycontainer){return;if(!$mycontainer)$mycontainer=$(document);$mycontainer.find('span[liname=zoom][eve=onmouseover]:not([evedone=1])').each(function(i,n){$(n).attr({evedone:'1'});var thefunct=$(n).attr('onmouseover');$(n).bind('mouseenter click',thefunct);$(n).removeAttr('onmouseover');var thelivalue=$(n).attr('livalue');if(thelivalue.indexOf(':overout:')>1){$(n).bind('mouseleave',rem_zoom);$(n).removeAttr('onmouseout');}});}function do_pop_mosa_titles(n,mycolor,mysize){if(!mysize)mysize=8;var mytitle=$.trim($(n).attr('title'));var upperFirst=mytitle.substr(0,1).toUpperCase()+mytitle.substr(1);if(upperFirst!=mytitle){mytitle=upperFirst;$(n).attr({title:mytitle});}if(mytitle.indexOf(',')==0){var tit0=$.trim(mytitle.substr(1));$(n).attr({title:tit0});}mytitle+=',';var titles_=mytitle.split(',');var tit1=$.trim(titles_[0]);var tit2=$.trim(titles_[1]);if(!tit1)tit1='&nbsp;';if(!tit2)tit2='&nbsp;';var w1=$(n).width();var t1b=$(n).css('marginTop');var t1=(_parseInt(t1b)+2)*-1;if(!t1)t1=0;var t2b=$(n).css('marginBottom');var t2=(_parseInt(t2b))*-1;if(!t2)t2=0;$(n).wrap('<span><table style="display:inline;border-collapse: collapse;" cellSpacing=0 cellPadding=0 border=0><tr><td style="color: '+mycolor+';"></td></tr></table></span>');$(n).before('<div style="font: bold '+mysize+'pt tahoma; text-align:center; width: '+w1+';overflow:hidden; text-overflow:ellipsis; position: relative; top:'+t1+'px;">'+tit1+'</div>');$(n).after('<div style="font: normal '+mysize+'pt tahoma; text-align:center; width: '+w1+';overflow:hidden; text-overflow:ellipsis; position: relative; top:'+t2+'px;">'+tit2+'</div>');}function pop_mosa_titles(){if(!$('#popifr').find('img.size08pt, img.size10pt, img.size12pt, img.size14pt').length&&!$('#popifr').find('table[mosaic*=":tityes"]').length)return;var mycolor=$('#popifr').find('p[idec]:first').css('color');if(!mycolor)mycolor='darkslateblue';$('#popifr').find('img.size08pt, img.size10pt, img.size12pt, img.size14pt').each(function(i,n){var mysize=8;if($(n).hasClass('size08pt'))mysize=8;else if($(n).hasClass('size10pt'))mysize=10;else if($(n).hasClass('size12pt'))mysize=12;else if($(n).hasClass('size14pt'))mysize=14;do_pop_mosa_titles(n,mycolor,mysize);});if(typeof pop_mosa_titles_local=='function')return;$('#popifr').find('table[mosaic*=":tityes"]').find('img.img_dia').each(function(i,n){do_pop_mosa_titles(n,mycolor,8);});}function rem_zoom(){rem_zoom_diapo_auto();$('div[name="divavis"][ismosaic="1"]:visible').find('img:visible').hide();$('div[name=divavis]').hide('slow');$('#avis_quit, #avis_diapo, #avis_diapo_auto').hide();}function empty_zoom(){rem_zoom();$('div[name=divavis], #avis_quit, #avis_diapo, #avis_diapo_auto').remove();}$(window).bind('resize',empty_zoom);var pop_zoom_img_title='';function pop_zoom(myitem,params){if(!params)return;var myimg2=params;myimg2=myimg2.replace(/[^\w\-]/g,'-');var hasimg=($(myitem).has('img[title]').length==1)?true:false;var hasimg_title=(!hasimg)?'':$(myitem).find('img[title]').attr('title');if(!hasimg_title&&!$(myitem).find('img').length){$('#divtempo').remove();$('<div id=divtempo style="display:none"></div>').appendTo('body').html($(myitem).html());$('#divtempo').find('span[name="zoom_list"]').remove();hasimg_title=$('#divtempo').text();$('#divtempo').remove();}pop_zoom_img_title=(!hasimg_title)?'':hasimg_title;var mosaic_parent=$(myitem).parents('table.ipop_dia:first');var ismosaic=(mosaic_parent.length==0)?false:true;var ismosaic_fixed=(ismosaic&&mosaic_parent.attr('mosaic'))?true:false;var ismosaic_pos=0;var isauto=true;var issynchro=false;var synchrolist_=[];if(ismosaic_fixed){var tempo=mosaic_parent.attr('mosaic');if(tempo){var tempo_=tempo.split(':');var ismosaic_pos=(tempo_.length>=5)?tempo_[4]:0;if(!ismosaic_pos||$.inArray(ismosaic_pos,['u','o','d','r','l'])==-1)ismosaic_pos=0;if(tempo.indexOf(':a0')>0)isauto=false;if(tempo.indexOf(':s1')>0){issynchro=true;}}}if($('div[name=divavis][image="'+myimg2+'"]:visible').length){if(!ismosaic){var myeve=(myitem)?$(myitem).attr('eve'):'';var myevedone=(myitem)?$(myitem).attr('evedone'):'';if(myeve=='onmouseover'&&!myevedone)return;rem_zoom();return;}else if(ismosaic){no_rem_zoom=true;hide_f();no_rem_zoom=false;}}else{hide_f();}var params2=params+':::::::';var params_=params2.split(':');var myimg=params_[0];var myimgname_full=myimg.replace(/^.*\/img\/(.*)$/i,'$1');var myimgname_short=myimgname_full.replace(/\.(jpg|jpeg|gif|png)$/i,'');var myurl='http://'+myimg;var myserial=params_[1];var myevent='click';var myposition='pright';var myjust='jcenter';var myresize='rno';var myjoin='av';var mybgc='white';var mydivsize='600*550';for(var idx in params_){if(idx<=1)continue;var idy=params_[idx];if(!idy)continue;if($.inArray(idy,['click','over','overout'])!=-1)myevent=idy;else if($.inArray(idy,['pleft','pcenter','pright','pauto'])!=-1)myposition=idy;else if($.inArray(idy,['jleft','jcenter','jright'])!=-1)myjust=idy;else if($.inArray(idy,['ryes','rno'])!=-1)myresize=idy;else if($.inArray(idy,['av','ah','ad','al'])!=-1)myjoin=idy;else if(idy.search(/^\d+\*\d+$/)!=-1)mydivsize=idy;else if(idy.indexOf('bgc')==0){if(idy=='bgc_default')mybgc='white';else mybgc=idy.replace(/^bgc_/,'');}}if(myjoin=='ad'&&!ismosaic&&pop_zoom_img_title&&$('#avis_title').length){$('#avis_title').html(pop_zoom_img_title);}else{$('#avis_title').html('');}get_docsize();var mydivsize_=mydivsize.split('*');var mytop=jdoct+10;if(ismosaic_pos=='u'||ismosaic_pos=='d'||ismosaic_pos=='o'){var max_mosaic_width=mosaic_parent.width();if(max_mosaic_width>1000)max_mosaic_width=1000;var mywidth=max_mosaic_width;var myheight=_parseInt(mywidth*.66);}else{var mywidth=_parseInt(mydivsize_[0]);var myheight=_parseInt(mydivsize_[1]);}if(ismosaic_pos){if(ismosaic_pos=='u')mytop=(myheight+10)*-1;else if(ismosaic_pos=='d')mytop=3;else if(ismosaic_pos=='o')mytop=-5;else mytop=-6;}var mybody='body';if(ismosaic_fixed&&ismosaic_pos){if(ismosaic_pos=='d')mybody=mosaic_parent.find('td.ipop_dia_td:first > div:last');else mybody=mosaic_parent.find('td.ipop_dia_td:first > div:first');}if(mywidth>jwinw)mywidth=jwinw-20;if(myheight>jwinh)myheight=jwinh-20;if(myjoin=='ad'){var hide_radio_rem=(myheight<300)?'none':'';$('#avis_diapo_auto').find('div[name="radio_rem"]').css({display:hide_radio_rem});}var myleft=400;if(myposition=='pauto'){if(myitem){var itemposition=$(myitem).offset();if(itemposition.left<=400)myposition='pright';else if(itemposition.left>=600)myposition='pleft';else myposition='pcenter';}else myposition='pcenter';}if(myposition=='pleft')myleft=(myjoin!='ad')?10:30;else if(myposition=='pcenter')myleft=_parseInt((jwinw-600)/2)+jdocl;else if(myposition=='pright')myleft=400;if(myjoin!='ad'){if(myleft<10)myleft=10;}else if(myleft<30)myleft=30;if(ismosaic_pos){if(ismosaic_pos=='r'){if(mosaic_parent.find('td').length>1&&mosaic_parent.find('td.ipop_dia_td').length){myleft=mosaic_parent.find('td.ipop_dia_td:first').width()+10;}else myleft=mosaic_parent.width()+10;}else if(ismosaic_pos=='l'){myleft=(mywidth+10)*-1;}else myleft=-2;}var mytopquit=mytop+myheight-50;var myleftquit=myleft-4;var mytopdia=mytop+4;var myleftdia=myleftquit;var mydia_start='';var igo_zoom=0;if(myjoin=='ad'){var idia_start=$(myitem).attr('dia_start');if(idia_start){mydia_start=idia_start;igo_zoom='i:'+idia_start;}}var mydiv=$('div[name=divavis][image="'+myimg2+'"]');var mydiaauto=0;if(mydiv.length){var isoverflow='auto';if(myjoin=='ad'){mydiaauto=_parseInt(mydiv.attr('diaauto'));$('#avis_quit').hide();$('#avis_diapo').css({top:mytopdia,left:myleftdia,zIndex:30000001}).appendTo(mybody).show();isoverflow='hidden';var igo_fadeIn='slow';if(igo_zoom!=0){mydiv.find('img[andresize="2"]').attr({andresize:'20'}).css({display:'none'});if(mydiv.is(':visible')){mydiv.css({width:mywidth,height:myheight,top:mytop,left:myleft,overflow:isoverflow,zIndex:30000000});go_zoom([igo_zoom,mydiv]);}else{igo_fadeIn='fast';mydiv.css({width:mywidth,height:myheight,top:mytop,left:myleft,overflow:isoverflow,zIndex:30000000}).show(function(){go_zoom([igo_zoom,mydiv]);});}}else{mydiv.css({width:mywidth,height:myheight,top:mytop,left:myleft,overflow:isoverflow,zIndex:30000000}).fadeIn(igo_fadeIn,function(){go_zoom([igo_zoom,mydiv]);});}sh_diapo_auto(mydiv,myjoin,myevent,myheight,mydiaauto);}else{sh_diapo_auto(mydiv,myjoin,myevent,myheight,mydiaauto);if(myevent!='overout')$('#avis_quit').css({top:mytopquit,left:myleftquit,zIndex:30000001}).appendTo('body').show();isoverflow='auto';$('div[name=divavis][image="'+myimg2+'"]').css({width:mywidth,height:myheight,top:mytop,left:myleft,overflow:isoverflow,zIndex:30000000}).fadeIn('slow');}if(!dpp&&myyoo!='no'){var myyoo='zoom '+myimgname_short;make_yoo(myyoo);}return;}var ismulti=false;var andresize=(myresize=='ryes')?' andresize="1"':'';var nodisplay=(myresize=='ryes')?'display:none;':'';var table_size="width: 100%; height: 100%;";var countimg=0;var countimgdiapo=0;var remw=0;var remh=0;var nowrap_style='';var nowrap_attrib='';if(myserial){ismulti=true;var myfirstimg=myimg.replace(/^.*\/([^\/]*)$/i,'$1');var myimgpath=myimg.replace(/\/[^\/]*$/i,'/');var myimgbase=myimg.replace(/.\.(jpg|jpeg|gif|png)$/i,'');var myimgext=myimg.replace(/^(.*)(jpg|jpeg|gif|png)$/i,'$2');var imgcode_=[];var imgname='';var imgstyle='';if(1==1||myserial.search(/[,;]/)!=-1){var graycolor=(mybgc=='white')?'gray':mybgc;var zoom_list=false;var zoom_list_alldir=(myserial=='*')?true:false;if($(myitem).find('span[name="zoom_list"]').length){var rawserial=$(myitem).find('span[name="zoom_list"]').text();if(rawserial){var rawserial_=rawserial.split(';');if(issynchro){synchrolist_=[];mosaic_parent.find('td.ipop_dia_td').find('img.img_dia').each(function(ii,nn){var src=$(nn).attr('src');src=src.replace(/\?\d+$/i,'');src=src.replace(/\.(jpg|jpeg|png|gif)$/i,'');synchrolist_.push(src.split('/').pop());});issynchro=(synchrolist_.length)?true:false;}if(issynchro){var rawserial2_=[];for(var idx in rawserial_){var idy_=rawserial_[idx].split(',');var idz=idy_.shift();rawserial2_[idz]=idy_.join(',');}rawserial_=[];for(var idx in synchrolist_){var idy=synchrolist_[idx];if(rawserial2_[idy])rawserial_.push(idy+','+rawserial2_[idy]);}}var sizeslist_=[];var resizedlist_=[];var myserial_=[];zoom_list=true;var maxw=mywidth-30;var maxh=myheight-30;for(var ii=0;ii<rawserial_.length;ii++){var img_split_=rawserial_[ii].split(',');myserial_[ii]=img_split_[0];var thewidth=_parseInt(img_split_[1]);var theheight=_parseInt(img_split_[2]);sizeslist_[ii]=(thewidth&&theheight)?' width="'+thewidth+'" height="'+theheight+'"':"";var resized_=give_img_resized(thewidth,theheight,maxw,maxh);resizedlist_[ii]=(resized_[0]&&resized_[1])?'width:'+resized_[0]+';height:'+resized_[1]+';':'';}}}else{myserial=myfirstimg+','+myserial.replace(/[,;]+/g,',');var myserial_=myserial.split(',');}var mydia_start_attribute='';for(var ii=0;ii<myserial_.length;ii++){var myimgname=myserial_[ii];if(!myimgname)continue;if(myimgname.search(/\.(jpg|jpeg|gif|png)$/i)==-1)myimgname+='.'+myimgext;imgname='http://'+myimgpath+myimgname;if(myjoin=='ad'){countimgdiapo++;if(mydia_start){mydia_start_attribute=' dia_src="'+myimgname.replace(/\.([\w]+)$/i,'_$1')+'"';}}countimg++;if(myjoin=='av'){imgstyle=(ii==0)?'':'border-Top: 2px dashed '+graycolor+';';}else if(myjoin=='ah')imgstyle=(ii==0)?'vertical-Align: middle;':'border-Left: 1px solid transparent; vertical-Align: middle;';else if(myjoin=='ad')imgstyle='vertical-Align: middle;';else if(myjoin=='al'){imgstyle='border-Top: 1px solid transparent;';if(myjust=='jcenter')imgstyle+='vertical-Align: middle;';}var src1='src';if(myjoin=='ad'&&ii>=2)src1='src1';else src1='src';if(!zoom_list){imgcode_.push('<img src="'+imgname+'" border=0 ii_img="'+countimgdiapo+'" style="'+imgstyle+nodisplay+'"'+andresize+mydia_start_attribute+' />');}else if(myresize=='ryes'){imgcode_.push('<img '+src1+'="'+imgname+'" border=0 ii_img="'+countimgdiapo+'" style="'+imgstyle+resizedlist_[ii]+nodisplay+'"'+andresize+mydia_start_attribute+sizeslist_[ii]+' />');}else if(andresize=='rno'){imgcode_.push('<img '+src1+'="'+imgname+'" border=0 ii_img="'+countimgdiapo+'" style="'+imgstyle+nodisplay+'"'+andresize+mydia_start_attribute+sizeslist_[ii]+' />');}}}if(countimg>1){if(myjoin=='ah'){remh=0;if(andresize){var t_height=myheight-30;table_size="width: 100%; height: "+t_height+"px;";}}else if(myjoin=='ad'){remh=0;if(andresize){table_size="width: "+mywidth+"px; height: "+myheight+"px;";}}else if(myjoin=='av'){remw=0;if(andresize){var t_width=mywidth-30;table_size="width: "+t_width+"px; height: 100%;";}}}var tojoin='';var imgcode='';if(myjoin=='av')imgcode=imgcode_.join('<br />');else if(myjoin=='ah'){imgcode=imgcode_.join('');nowrap_style='white-Space: nowrap;';nowrap_attrib=' nowrap';}else if(myjoin=='ad')imgcode=imgcode_.join('');else if(1==1||myjoin=='al')imgcode=imgcode_.join('<span style="font-size: 1px;"> </span>');}else{var imgcode='<img src="'+myurl+'" border=0 ii_img="0" style="'+nodisplay+'"'+andresize+' />';}if(mybgc=='white')var borderstyle=(myevent=='over')?'2px dodgerblue dotted':'2px slateblue dotted';else var borderstyle='2px solid '+mybgc;var isoverflow=(myjoin=='ad')?'hidden':'auto';var diapomode=(myjoin=='ad')?' diapo="1"':'';var divtitle=(myjoin=='ad')?' title="diaporama"':' title="cliquer pour fermer"';if(ismosaic&&!isauto)divtitle=' title="suivant = cliquer à droite '+br+'précédent = cliquer à gauche"';var itismosaic=(ismosaic)?' ismosaic="1"':'';var mycode0='<div name=divavis'+itismosaic+' image="'+myimg2+'"'+diapomode+' style="position: absolute; top: '+mytop+'px; left: '+myleft+'px; z-Index: 30000000; border: '+borderstyle+'; width: '+mywidth+'px; height: '+myheight+'px; overflow: '+isoverflow+'; background-color: '+mybgc+'; cursor:pointer;'+nowrap_style+'"'+divtitle+nowrap_attrib+'>';var mycode1='</div>';if(myjust=='jcenter'){var mycode=mycode0+'<table cellSpacing=0 cellPadding=0 border=0 style="'+table_size+'"><tr><td align=center style="'+nowrap_style+'"'+nowrap_attrib+'>'+imgcode+'</td></tr></table>'+mycode1;}else if(myjust=='jright'){var mycode=mycode0+'<table cellSpacing=0 cellPadding=0 border=0 style="'+table_size+'"><tr><td align=right vAlign=top style="'+nowrap_style+'"'+nowrap_attrib+'>'+imgcode+'</td></tr></table>'+mycode1;}else{var mycode=mycode0+imgcode+mycode1;}if(ismosaic_fixed&&ismosaic_pos){if(ismosaic_pos!='d'){$('<div style="position:relative; width: 100%; text-align:left;" align="left">'+mycode+'</div>').prependTo(mosaic_parent.find('td.ipop_dia_td:first'));}else{$('<div style="position:relative; width: 100%; text-align:left;" align="left">'+mycode+'</div>').appendTo(mosaic_parent.find('td.ipop_dia_td:first'));}}else{$(mycode).appendTo('body');}var mybody='body';if(ismosaic_fixed&&ismosaic_pos){if(ismosaic_pos=='d')mybody=mosaic_parent.find('td.ipop_dia_td:first > div:last');else mybody=mosaic_parent.find('td.ipop_dia_td:first > div:first');}if(myjoin=='ad')$('div[name=divavis][image="'+myimg2+'"]').click(function(e){go_zoom_click(e,this);});else $('div[name="divavis"][image="'+myimg2+'"]').click(rem_zoom);if(andresize&&!zoom_list){$('div[name=divavis][image="'+myimg2+'"]').find('img[andresize="1"]').each(function(i,n){$(n).load(function(){var diffw=30+remw;var diffh=30+remh;var maxw=mywidth-diffw;var maxh=myheight-diffh;var imgw=$(this).width();var imgh=$(this).height();if(!imgw||!imgh)return true;var ratioh=maxh/imgh;var ratiow=maxw/imgw;var ratio=(ratioh<=ratiow)?ratioh:ratiow;var neww=(ratio>=1)?imgw:_parseInt(ratio*imgw);var newh=(ratio>=1)?imgh:_parseInt(ratio*imgh);if(!neww||!newh)return true;var ii_img=_parseInt($(n).attr('ii_img'));if(myjoin!='ad'||ii_img==1){$(this).css({width:neww,height:newh}).attr({andresize:2}).fadeIn('fast');}else{$(this).css({width:neww,height:newh}).attr({andresize:20});}});});}else if(andresize&&zoom_list){$('div[name=divavis][image="'+myimg2+'"]').find('img[andresize="1"]').each(function(i,n){var ii_img=_parseInt($(n).attr('ii_img'));if(myjoin!='ad'||ii_img==1){if(!$(this).attr('src')&&$(this).attr('src1'))$(this).attr('src')=$(this).attr('src1');$(this).attr({andresize:2}).fadeIn('fast');}else{$(this).attr({andresize:20});}});}var mydiv=$('div[name="divavis"][image="'+myimg2+'"]');var mydiv_avis=mydiv.get(0);window.setTimeout(function(){check_img(mydiv_avis);},500);var mydiaauto=0;if(myjoin=='ad'&&(!ismosaic||isauto)){mydiaauto=(myevent=='overout')?2:1;}mydiv.attr({ijoin:myjoin,ievent:myevent,iheight:myheight,diaauto:mydiaauto});if(myjoin!='ad'){if(!$('#avis_quit').length){$('<img id=avis_quit src="http://www.mailrouge.fr/img/all/rte_quit.gif" width=18 height=18 border=0 style="cursor: pointer; position: absolute; top: '+mytopquit+'px; left: '+myleftquit+'px; z-Index: 30000001;" title="cliquer pour fermer" onclick="rem_zoom();" />').appendTo('body');}else{$('#avis_quit').css({top:mytopquit,left:myleftquit,zIndex:30000001}).appendTo('body').show();}if(myevent=='overout')$('#avis_quit').hide();sh_diapo_auto(mydiv,myjoin,myevent,myheight,mydiaauto);}else if(myjoin=='ad'){if(!$('#avis_diapo').length){var auto_checked=(!ismosaic||isauto)?' checked':'';$('<div id=avis_diapo style="position:absolute; top: '+mytopdia+'px; left: '+myleftdia+'px; z-Index: 30000001; white-Space: nowrap"><img overout=rem src="http://www.mailrouge.fr/img/all/rte_quitnosave.gif" width=18 height=18 border=0 style="cursor: pointer; border-right: 1px solid transparent; vertical-Align: middle;" title="fermer" onclick="rem_zoom();" />&nbsp;<span id=avis_diapo_count style="font: bold 8pt arial; color: black; cursor: help; background-Color: beige; padding: 0px 2px;"></span>&nbsp;<img overout=rem src="http://www.mailrouge.fr/img/all/rte_left2.gif" width=18 height=18 border=0 style="cursor: pointer; border-right: 1px solid transparent; vertical-Align: middle;" title="début" onclick="go_zoom(\'start\');" /><img overout=rem src="http://www.mailrouge.fr/img/all/rte_left.gif" width=18 height=18 border=0 style="cursor: pointer; border-right: 0px solid transparent; vertical-Align: middle;" title="précédent" onclick="go_zoom(\'prev\');" /><input overout=rem type="checkbox" style="vertical-Align: middle; name="zoom_diaporama" id="zoom_diaporama" title="diaporama, défilement automatique des images (au clavier = touche tabulation)"'+auto_checked+' /><img overout=rem src="http://www.mailrouge.fr/img/all/rte_right.gif" width=18 height=18 border=0 style="cursor: pointer; border-right: 1px solid transparent; vertical-Align: middle;" title="suivant" onclick="go_zoom(\'next\');" /><img overout=rem src="http://www.mailrouge.fr/img/all/rte_right2.gif" width=18 height=18 border=0 style="cursor: pointer; border-right: 1px solid transparent; vertical-Align: middle;" title="fin" onclick="go_zoom(\'end\');" /><img overout=rem src="http://www.mailrouge.fr/img/all/rte_help.gif" width=18 height=18 border=0 style="cursor: help; border-left: 5px solid transparent; vertical-Align: middle;" title="* suivant: cliquer sur la droite de cette fenêtre, '+br+'* précédent: cliquer sur la gauche de cette fenêtre '+br+'* au clavier : flèches gauche/droite, haut/bas, début/fin, barre d\'espacement, retour chariot, tab, ou touche d\'échappement '+br+'* touche d\'échappement : ferme la fenêtre de zoom '+br+'* touche tabulation : stoppe/ou active le diaporama automatique" />&nbsp;&nbsp;<div id=avis_title style=" position: absolute; top: 2px; left: 200px; width: 200px; overflow: hidden; overflow-x: hidden; text-overflow: ellipsis; font: bold 10pt arial; white-Space: nowrap; color: white; text-align: center;">'+pop_zoom_img_title+'</div></div>').appendTo(mybody);$('#zoom_diaporama').click(zoom_diapo_start);$('<div id="avis_diapo_auto" title="durée d\'affichage automatique en secondes par image" style="font: normal 7pt tahoma; color: black; background-Color: transparent; background-Image : url(http://www.mailrouge.fr/silver100.png); background-Repeat: repeat-y; background-Position: 5px 0px; position: absolute; top: 25px; left: -29px; padding: 0 0 0 0; border: 0; text-align: left; white-Space:nowrap;"><div>&nbsp; &nbsp;sec.</div><div><input type=radio name="zoom_auto" style="vertical-Align: text-bottom;" value="1" />1</div><div><input type=radio name="zoom_auto" style="vertical-align: text-bottom;" value="2" />2</div><div><input type=radio name="zoom_auto" style="vertical-Align: middle;" value="3" checked />3</div><div><input type=radio name="zoom_auto" style="vertical-Align: top;" value="6" />6</div><div><input type=radio name="zoom_auto" value="9" />9</div><div><input type=radio name="zoom_auto" value="12" />12</div><div><input type=radio name="zoom_auto" value="15" />15</div><div name=radio_rem><input type=radio name="zoom_auto" value="30" />30</div><div name=radio_rem><input type=radio name="zoom_auto" value="60" />60</div><div name=radio_rem><input type=radio name="zoom_auto" value="90" />90</div></div>').appendTo('#avis_diapo');var sec_width=$('#avis_diapo_auto').width();sec_width=-sec_width+4-2;$('#avis_diapo_auto').css({left:sec_width});$('#avis_diapo_auto').find('input:radio').css({verticalAlign:'middle'}).click(function(){zoom_diapo_auto($(this).val());});sh_diapo_auto(mydiv,myjoin,myevent,myheight,mydiaauto);}else{$('#avis_diapo').css({top:mytopdia,left:myleftdia,zIndex:30000001}).appendTo(mybody);sh_diapo_auto(mydiv,myjoin,myevent,myheight,mydiaauto);}go_zoom([igo_zoom,$('div[name="divavis"][image="'+myimg2+'"]')]);}if(!dpp&&myyoo!='no'){var myyoo='zoom '+myimgname_short;make_yoo(myyoo);}}function aff_testmsg(mystring){return;}function toggle_dia(){var mydiv=$('div[name="divavis"]:visible');var mydiaauto=_parseInt(mydiv.attr('diaauto'));if(mydiaauto==2){zoom_diapo_start();}else if(mydiaauto==1){$('#zoom_diaporama').attr({checked:false});rem_zoom_diapo_auto();mydiv.attr({diaauto:0});}else{$('#zoom_diaporama').attr({checked:true});zoom_diapo_start();mydiv.attr({diaauto:1});}}function sh_diapo_auto(mydiv,myjoin,myevent,myheight,mydiaauto){var sh=false;var shbuttons=true;if(myjoin=='ad')sh=true;if(myevent=='overout')shbuttons=false;if(sh){$('#avis_diapo').show();if(myheight<300)$('#avis_diapo_auto').find('div[name="radio_rem"]').hide();else $('#avis_diapo_auto').find('div[name="radio_rem"]').show();if(shbuttons){if(mydiaauto==1)$('#avis_diapo_auto').show();else $('#avis_diapo_auto').hide();$('#avis_diapo').find('img[overout="rem"], input[overout="rem"]').css({visibility:'visible'}).show();}else{$('#avis_diapo_auto').hide();$('#avis_diapo').find('img[overout="rem"], input[overout="rem"]').css({visibility:'hidden'});}}else{$('#avis_diapo').hide();$('#avis_diapo_auto').hide();$('#avis_diapo_auto').find('div[name="radio_rem"]').hide();}}function pop_dia(myitem){var mysrc=$(myitem).attr('src');var mysplitted=mysrc.split('/');var lastidx=mysplitted.length-1;var myimg=mysplitted[lastidx];myimg=myimg.replace(/[\?].*$/i,'');myimg=myimg.replace(/\.([\w]+)$/i,'_$1');var mycaption=$(myitem).parents('table[mosaic]:first').find('caption');if(!mycaption.length){mycaption=$(myitem).parents('table.ipop_dia:first').find('caption');if(!mycaption.length)return;};mycaption.find('span[liname="zoom"]:first').attr({dia_start:myimg}).click();}var zoom_diapo_interval='';var zoom_diapo_count=0;function give_img_resized(imgw,imgh,maxw,maxh){if(!imgw||!imgh)return[0,0];if(!maxw)maxw=imgw;if(!maxh)maxh=imgh;var ratioh=maxh/imgh;var ratiow=maxw/imgw;var ratio=(ratioh<=ratiow)?ratioh:ratiow;var neww=(ratio>=1)?imgw:_parseInt(ratio*imgw);var newh=(ratio>=1)?imgh:_parseInt(ratio*imgh);if(!neww||!newh)return[0,0];else return[neww,newh];}function rem_zoom_diapo_auto(){window.clearInterval(zoom_diapo_interval);zoom_diapo_count=0;$('#zoom_diaporama').attr({checked:false});$('#avis_diapo_auto').hide();var mydiv=$('div[name=divavis]:visible');if(!$('#avis_quit:visible').length)mydiv.attr({title:'cliquer à droite = suivant, '+br+'cliquer à gauche = précédent'});}function zoom_diapo_start(){var ischecked=$('#zoom_diaporama').attr('checked');var mydiv=$('div[name="divavis"]:visible');var mydiaauto=_parseInt(mydiv.attr('diaauto'));if(mydiaauto==2){zoom_diapo_auto(3);return;}if(ischecked){mydiv.attr({diaauto:1});zoom_diapo_auto(3);}else{mydiv.attr({diaauto:0});rem_zoom_diapo_auto();}}function zoom_diapo_auto(mysecondes){var mydiv=$('div[name="divavis"]:visible');var myevent=mydiv.attr('ievent');if(myevent!='overout')$('#avis_diapo_auto').show();else $('#avis_diapo_auto').hide();window.clearInterval(zoom_diapo_interval);mysecondes=_parseInt(mysecondes);if(!mysecondes)mysecondes=3;$('#zoom_diaporama').attr({checked:true});$('#avis_diapo_auto').find('input:radio[name="zoom_auto"][value="'+mysecondes+'"]').attr({checked:true});zoom_diapo_count=0;var totimg=mydiv.find('img[andresize]').length;var s=(mysecondes==1)?'':'s';mydiv.attr({title:'diaporama automatique, '+br+mysecondes+' seconde'+s+' * '+totimg+' images'});if(totimg<12)totimg=12;zoom_diapo_interval=window.setInterval(function(){go_zoom('next');zoom_diapo_count+=1;if(zoom_diapo_count>=totimg)rem_zoom_diapo_auto();},mysecondes*1000);}function go_zoom_click(event,myitem){if($('#avis_diapo_auto:visible').length)return;var myx=event.pageX;var divx=$(myitem).offset().left;var divw=$(myitem).width()/3;var diff=_parseInt(myx-divx);var where=(divw&&diff&&diff<divw)?'prev':'next';go_zoom(where);}function go_zoom(where_){if(typeof where_=='object'){var where=where_[0];var mydiv=where_[1];}else{var where=where_;var mydiv=$('div[name="divavis"]:visible');}var lastidx=_parseInt(mydiv.find('img[andresize]:last').attr('ii_img'));var nextidx=1;var curimg=mydiv.find('img[andresize="2"]');var curidx=(curimg.length)?_parseInt(curimg.attr('ii_img')):0;if(where==0){nextidx=curidx;}else{mydiv.find('img[andresize="2"]').attr({andresize:'20'}).css({display:'none'});if(where.indexOf(':')==1){var mydia_start=where.substr(2);curimg=mydiv.find('img[dia_src="'+mydia_start+'"]');curidx=_parseInt(curimg.attr('ii_img'));nextidx=curidx;}else{if(where=='next')nextidx=curidx+1;else if(where=='prev')nextidx=curidx-1;else if(where=='start')nextidx=1;else if(where=='end')nextidx=lastidx;}}if(nextidx<1)nextidx=lastidx;if(nextidx>lastidx||!mydiv.find('img[andresize][ii_img="'+nextidx+'"]').length)nextidx=1;var nextone=mydiv.find('img[andresize][ii_img="'+(nextidx)+'"]');if(nextone.length&&!nextone.attr('src')&&nextone.attr('src1')){var newsrc=nextone.attr('src1');nextone.attr({src:newsrc});}var mywidth=mydiv.width()-200-200;var color_title=mydiv.attr('titlecolor');if(!color_title){var mybgc=mydiv.css('backgroundColor');var newbgc='white';if(mybgc){mybgc=mybgc.toLowerCase();if(mybgc.indexOf('rgb')==0){var tempo_=mybgc.replace(/[^\d,]+/,'').split(',');for(var idx in tempo_)tempo_[idx]=_parseInt(tempo_[idx]);if(tempo_[0]==255&&tempo_[1]==255&&tempo_[2]==255)mybgc='white';}if(mybgc=='white'||mybgc=='#ffffff')newbgc='black';}if(!newbgc)newbgc='white';mydiv.attr({titlecolor:newbgc});color_title=newbgc;}$('#avis_title').html('').css({width:mywidth,color:color_title});mydiv.find('img[andresize]').css({display:'none'});nextone.attr({andresize:'2'}).css({position:'relative',top:'7px'}).show();if(mywidth>30){try{var mysrc=nextone.attr('src').split('/').pop().replace(/\?.*$/g,'');var mytitle=$('img.img_dia[src*="'+mysrc+'"]').attr('title');if(mytitle)$('#avis_title').html(mytitle);if(!mytitle&&pop_zoom_img_title){$('#avis_title').html(pop_zoom_img_title);}}catch(e){alert(e+' line1580');}}var nexta=nextidx+1;var nextone=mydiv.find('img[andresize][ii_img="'+nexta+'"]');if(nextone.length&&!nextone.attr('src')&&nextone.attr('src1')){var newsrc=nextone.attr('src1');nextone.attr({src:newsrc});}var nexta=nextidx+2;var nextone=mydiv.find('img[andresize][ii_img="'+nexta+'"]');if(nextone.length&&!nextone.attr('src')&&nextone.attr('src1')){var newsrc=nextone.attr('src1');nextone.attr({src:newsrc});}var nexta=nextidx-1;var nextone=mydiv.find('img[andresize][ii_img="'+nexta+'"]');if(nextone.length&&!nextone.attr('src')&&nextone.attr('src1')){var newsrc=nextone.attr('src1');nextone.attr({src:newsrc});}if(nextidx==0)nextidx=1;if(lastidx==0)lastidx=mydiv.find('img[andresize]').length;var mytext=nextidx+' / '+lastidx;$('#avis_diapo_count').text(mytext).attr({title:mytext});if(where==0||where.indexOf(':')==1){if(_parseInt(mydiv.attr('diaauto'))>=1)zoom_diapo_auto(3);}if(!dpp&&myyoo!='no'){var myyoo='zoom '+nextidx+'/'+lastidx;make_yoo(myyoo);}}function accordeon($mycontainer){if(!$mycontainer.find('blockquote.bqmenu[accordeon=1]').length)return;$mycontainer.find('blockquote.bqmenu[accordeon=1]').css({display:'none',padding:'0 0 0 9px',margin:'0px'}).attr({accordeon:'2'});$mycontainer.find('div.m_sec0').each(function(i,n){var mytitle=$(n).text();$(n).attr({title:mytitle}).css({cursor:'pointer'}).hover(function(){$(n).removeClass().addClass('m_sec_hover');},function(){$(n).removeClass().addClass('m_sec0');});});$mycontainer.find('div.divmsec').css({cursor:'pointer'}).click(function(){var myparent_children=$(this).parent().children('blockquote, div.divmsec');var myidx=myparent_children.index(this);var found=false;myparent_children.each(function(i,n){var tagname=n.tagName;if(tagname=='BLOCKQUOTE'){if(i<myidx){$(n).hide();}else if(i>myidx&&!found){$(n).toggle();found=true;}else{$(n).hide();}}});if(typeof back_accordeon=='function'){back_accordeon();}});}function rem_cse(){$('#ifr_cse, #close_cse').remove();}function load_cse(){rem_cse();$('<iframe id="ifr_cse" src="mrg_cse.php"></iframe>').appendTo('body').css({width:800,height:500,position:'absolute',top:30,left:150,zIndex:30000000});$('<img id="close_cse" src="http://www.mailrouge.fr/img/all/rte_quitnosave.gif" width=17 height=17 border=0 style="cursor:pointer;" title="fermer" onclick="rem_cse();" />').appendTo('body').css({position:'absolute',top:40,left:145,zIndex:30000001});window.scrollTo(0,0);make_yoo('Rechercher');}function check_tvi(){if($('#tvi').length&&(_parseInt($('#tvi').text())==0||$('#divvisit').length)){$.get('./tvi.php',tviok,'text');}if($('#divtvi').length&&$('#popifr').length&&!$('#divtvi').attr('binded')){$('#divtvi').attr({binded:1}).unbind().bind('click',function(e){if(!e)return;if(!confirm('liste des pages visitées'))return;var mydate=new Date().getTime();if(typeof rem_flatevents=='function')rem_flatevents();var cpr2=cpr.replace(/[0]$/,'');var mycode='<div id=divvisit><form id="visit" name="visit" style="display:none;"><input type="hidden" name="ac" value="'+cpr2+'" /></form></div>';$('#popifr').html(mycode);if(typeof do_load_visit=='function')do_load_visit();else if(typeof viso=='string'&&viso)$.getScript(viso);});}}function do_tvi(){check_tvi();}function number_format_(mynum){var mystring=mynum.toString();var len=mystring.length;if(len>=13)mystring=mystring.replace(/([0-9]{1,3})([0-9]{3})([0-9]{3})([0-9]{3})([0-9]{3})$/,'$1.$2.$3.$4.$5');else if(len>=10)mystring=mystring.replace(/([0-9]{1,3})([0-9]{3})([0-9]{3})([0-9]{3})$/,'$1.$2.$3.$4');else if(len>=7)mystring=mystring.replace(/([0-9]{1,3})([0-9]{3})([0-9]{3})$/,'$1.$2.$3');else if(len>=4)mystring=mystring.replace(/([0-9]{1,3})([0-9]{3})$/,'$1.$2');return mystring;}function tviok(response){response=_parseInt(response);if(!response)return;response=number_format_(response);$('#tvi').text(response);}$(document).ready(function(){$(document).unbind('keydown').bind('keydown',keydown_pop);});
