/* compact [
	plugins/couteau_suisse/outils/decoupe.js
	plugins/couteau_suisse/outils/glossaire.js
	plugins/couteau_suisse/outils/blocs.js
	page=socialtags.js
	plugins/thickbox2/javascript/thickbox.js
] 68.3% */

/* plugins/couteau_suisse/outils/decoupe.js */
var onglet_actif=0;
function onglets_init(){
var cs_bloc=jQuery('div.onglets_bloc_initial',this);
if(cs_bloc.length){
cs_bloc.prepend('<div class="onglets_liste"></div>')
.children('.onglets_contenu').each(function(i){
this.id='onglets_contenu_'+i;
jQuery(this).parent().children('.onglets_liste').append(
'<h2 id="'+'onglets_titre_'+i+'" class="onglets_titre">'+this.firstChild.innerHTML+'</h2>'
)})
.children('h2').remove();
jQuery('div.onglets_liste',this).each(function(){
this.firstChild.className+=' selected';
this.nextSibling.className+=' selected'});
jQuery('h2.onglets_titre',this).hover(
function(){
jQuery(this).addClass('hover')
},function(){
jQuery(this).removeClass('hover')
}
);
jQuery('div.onglets_bloc_initial',this)
.attr('class','onglets_bloc').each(function(i){this.id='ongl_'+i});
jQuery('h2.onglets_titre',this).click(function(e){
var contenu='#'+this.id;
contenu=contenu.replace(/titre/,'contenu');
var bloc=jQuery(this).parent().parent();
bloc.children('.selected').removeClass('selected').end()
.children('.onglets_liste').children('.selected').removeClass('selected');
jQuery(contenu).addClass('selected');
jQuery(this).addClass('selected');
return false});
jQuery('h2.onglets_titre a',this).click(function(e){
jQuery(this).parents('h2').click();
if(e.stopPropagation)e.stopPropagation();
e.cancelBubble=true;
return false});
if(onglet_get&&(this==document)){
sel=jQuery('#onglets_titre_'+onglet_get);
sel.click()}
}
}
function get_onglet(url){
tab=url.match(/[?&]onglet=([0-9]*)/);
if(tab==null)return false;
return tab[1]}
var onglet_get=get_onglet(window.location.search);


/* plugins/couteau_suisse/outils/glossaire.js */
var gloss_el=null;
var gloss_dt=null;
var gloss_dd=null;
var gloss_dl=null;
function glossaire_init(){
if(jQuery('span.gl_js',this).length){
if(!jQuery('#glossOverDiv').length){
jQuery('body').append('<div id="glossOverDiv" style="position:absolute; display:none; visibility: hidden;"><span class="gl_dl"><span class="gl_dt">TITRE</span><span class="gl_dd">Definition</span></span></div>');
gloss_el=document.getElementById('glossOverDiv');
gloss_dl=gloss_el.firstChild;
gloss_dt=gloss_dl.firstChild;
gloss_dd=gloss_dl.lastChild}
jQuery('span.gl_mot',this).cs_todo().hover(
function(e){
$this=jQuery(this);
if(this.firstChild.className=="spip_surligne"){
this.className="gl_mot spip_surligne";
this.innerHTML=this.firstChild.innerHTML}
gloss_dt.innerHTML=$this.parent().children('.gl_js')[0].title;
gloss_dd.innerHTML=$this.parent().children('.gl_jst')[0].title;
reg=$this.css('font-size').match(/^\d\d?(?:\.\d+)?px/);
if(reg)gloss_el.style.fontSize=reg[0];
jQuery(gloss_el)
.css('top',e.pageY.toString()+"px")
.css('left',e.pageX.toString()+"px")
.css('font-family',jQuery(this).css('font-family'));
gloss_el.style.display='block';
gloss_el.style.visibility='visible';
if(typeof jQuery.fn.offset=="function"){
if(1){
var $glossOverDiv=jQuery('#glossOverDiv');
var $gloss_dl=jQuery(gloss_dl);
positionBy='auto';
ombre=0;
decalX=2;
width=180;
height='auto';
var glossHeight,wHeight;
var linkHeight=this.offsetHeight;
var defHeight=isNaN(parseInt(height,10))?'auto':(/\D/g).test(height)?height:height+'px';
var sTop,linkTop,posY,mouseY,baseLine;
sTop=jQuery(document).scrollTop();
var glossWidth=width+ombre;
var linkWidth=this.offsetWidth;
var linkLeft,posX,mouseX,winWidth;
winWidth=jQuery(window).width();
linkTop=posY=$this.offset().top;
linkLeft=$this.offset().left;
mouseX=e.pageX;
mouseY=e.pageY;
$glossOverDiv.css({margin:'0px'});$gloss_dl.css({margin:'0px'});
posX=Math.max(linkLeft-(glossWidth-linkWidth)/2,0);
if(positionBy=='dessous'||positionBy=='dessus'){
$glossOverDiv.css({left:posX+'px'})}else{
posX2=(linkWidth>linkLeft&&linkLeft>glossWidth)||(linkLeft+linkWidth+glossWidth+decalX>winWidth)
?linkLeft-glossWidth-decalX
:linkWidth+linkLeft+decalX;
if(positionBy=='mouse'||linkWidth+glossWidth>winWidth){
posX=Math.max(mouseX-(glossWidth-linkWidth)/2,0)}
var pY=e.pageY;
$glossOverDiv.css({left:(posX>0&&positionBy!='dessus')?posX:(mouseX+(glossWidth/2)>winWidth)?winWidth/2-glossWidth/2:Math.max(mouseX-(glossWidth/2),0)})}
wHeight=jQuery(window).height();
$glossOverDiv.css({overflow:defHeight=='auto'?'visible':'auto',height:defHeight});
glossHeight=defHeight=='auto'?Math.max($gloss_dl.outerHeight(),$gloss_dl.height()):parseInt(defHeight,10);
glossHeight+=ombre;
tipY=posY;
baseLine=sTop+wHeight;
if(positionBy=='dessous')tipY=posY+linkHeight+2;
else if(positionBy=='dessus')tipY=posY-glossHeight-2;
else if(posX<mouseX&&Math.max(posX,0)+glossWidth>mouseX){
if(posY+glossHeight>baseLine&&mouseY-sTop>glossHeight){
tipY=posY-glossHeight-2}else{
tipY=posY+linkHeight+2}
}else if(posY+glossHeight>baseLine){
tipY=(glossHeight>=wHeight)?sTop:baseLine-glossHeight}else if($this.css('display')=='block'||positionBy=='mouse'){
tipY=pY}else{
tipY=posY}
$glossOverDiv.css({top:tipY+'px'})}
}
gloss_el.style.visibility='visible'},
function(e){
gloss_el.style.display='none';
gloss_el.style.visibility='hidden'}
);
if(typeof jQuery.fn.offset=="function"){
jQuery('a.cs_glossaire').focus(
function(){
legl_mot=this.firstChild;
gloss_dt.innerHTML=jQuery(this).children('.gl_js')[0].title;
gloss_dd.innerHTML=jQuery(this).children('.gl_jst')[0].title;
reg=jQuery(this.firstChild).css('font-size').match(/^\d\d?(?:\.\d+)?px/);
if(reg)gloss_el.style.fontSize=reg[0];
var result=jQuery(this).offset({scroll:false});
jQuery(gloss_el)
.css('top',result.top+"px")
.css('left',result.left+"px")
.css('font-family',jQuery(this.firstChild).css('font-family'));
gloss_el.style.display='block';
gloss_el.style.visibility='visible'}
);
jQuery('a.cs_glossaire').blur(
function(){
gloss_el.style.display='none';
gloss_el.style.visibility='hidden'}
)}
}
}


/* plugins/couteau_suisse/outils/blocs.js */

if(typeof jQuery.fn.hasClass=="undefined")
jQuery.fn.hasClass=function(selector){
return this.is("."+selector)};
jQuery.fn.blocs_toggle_slide=function(selector){
return this.toggleClass('blocs_slide')
.is(".blocs_slide")?this.slideUp(blocs_slide):this.slideDown(blocs_slide)};
jQuery.fn.blocs_toggle=function(){
if(!this.length)return this;
var cible=this.hasClass('cs_blocs')?this.children('.blocs_titre').eq(0):this;
var dest=cible.toggleClass('blocs_replie').next();
if(blocs_slide==='aucun'){
dest.toggleClass('blocs_invisible');
if(dest.is('div.blocs_resume'))dest.next().toggleClass('blocs_invisible')}else{
dest.blocs_toggle_slide();
if(dest.is('div.blocs_resume'))dest.next().blocs_toggle_slide()}
var url=cible.children().attr("href");
if(url!='javascript:;'){
cible.children().attr("href",'javascript:;');
cible.parent().children(".blocs_destination")
.load(url)}
return this};
jQuery.fn.blocs_replie_tout=function(){
if(blocs_replier_tout){
var cible=this.hasClass('cs_blocs')?this:this.parents('div.cs_blocs');
var lignee=cible.children('.blocs_titre');
jQuery('.blocs_titre').not('.blocs_replie').not(lignee).blocs_toggle()}
return this}
var blocs_clic_ajax=null;
function blocs_init(){
jQuery('.blocs_titre',this).cs_todo()
.click(function(){
jQuery(this).blocs_replie_tout().blocs_toggle();
return false});
jQuery('.blocs_destination a.replier_bloc',this).cs_todo()
.click(function(){
s=jQuery(this).parents('.cs_blocs:first');
if(typeof jQuery.fn.scrollTo=="function")jQuery('body').scrollTo(s,500,
{margin:true,onAfter:function(){s.blocs_replie_tout().blocs_toggle()}});
else s.blocs_replie_tout().blocs_toggle();
return false})}
document.write('<style type="text/css">div.blocs_invisible{display:none;}</style>');
function cs_blocs_cookie(){
if(typeof jQuery.cookie!='function')return;
var blocs_cookie_name='blocs'+window.location.pathname+window.location.search
blocs_cookie_name=blocs_cookie_name.replace(/[ ;,=]/,'_');
var deplies=jQuery.cookie(blocs_cookie_name);
jQuery.cookie(blocs_cookie_name,null);
if(deplies)
jQuery(deplies).blocs_replie_tout().blocs_toggle();
jQuery(window).bind('unload',function(){
jQuery.cookie(blocs_cookie_name,blocs_deplies())})}
function blocs_deplies(){
var deplies='';
jQuery('.cs_blocs').each(function(){
var numero=/cs_bloc\d+/.exec(this.className);
if(numero==null)return;
replie=jQuery(this).children('.blocs_titre').eq(0).hasClass('blocs_replie');
if(!replie)deplies+=(deplies.length?', ':'')+'div.'+numero[0]});
return deplies.length?deplies:null}
function blocs_get_pagination(url){
tab=url.match(/#pagination([0-9]+)/);
if(tab==null)return false;
return tab[1]}
var blocs_pagination=blocs_get_pagination(window.location.hash);


/* page=socialtags.js */

;var socialtags_addfavorite=function(u,t){
if(document.all)window.external.AddFavorite(u,t)};
(function($){$(function(){
var selector=$('#contenu');
if(!selector.length)return;
var socialtags=[
{a:'bookmark',n:'Ajouter aux favoris',i:'plugins/socialtags/images/bookmark.png',u:'javascript:socialtags_addfavorite(\'%u\',\'%t\');'},
{a:'facebook',n:'Facebook',i:'plugins/socialtags/images/facebook.png',u:'http://www.facebook.com/sharer.php?u=%u&t=%t'},
{a:'google',n:'Google',i:'plugins/socialtags/images/google.png',u:'http://www.google.com/bookmarks/mark?op=edit&bkmk=%u&title=%t'}
];
var title=$('title').text()||'';
var jqss=(jQuery.fn.jquery<='1.2.6')?'@':'';
var description=($('meta['+jqss+'name=description]').attr('content')||'').substr(0,250);
var cano=$('link['+jqss+'rel=canonical]')[0];
var url=cano?cano.href:document.location.href;
var ul=$('<ul><\/ul>');
var esc=function(x){return encodeURIComponent(x).replace(/\s/g,' ')};
$.each(socialtags,function(){if(this.u){
if(this.a=='bookmark'&&!document.all)return;
$('<a rel="nofollow"><img class="socialtags-hovers" src="'+this.i+'"\/><\/a>')
.attr('href',
this.u
.replace(/%u/g,esc(url))
.replace(/%t/g,esc(title))
.replace(/%d/g,esc(description))
)
.attr('title',this.n)
.wrap('<li><\/li>')
.parent().appendTo(ul)}});
selector.after(ul.wrap('<div class="socialtags"><\/div>').parent())})})(jQuery);


/* plugins/thickbox2/javascript/thickbox.js */

var DELAI=7000;var imageArray=[];
var FULL_S=false;
var DIAPO=false;
if(typeof TB_chemin_css=='undefined'){TB_chemin_css='thickbox.css'}
if(typeof TB_chemin_animation=='undefined'){TB_chemin_animation='circle_animation.gif'}
function TB_image(){
var t=this.title||this.name;
var longdesc=jQuery('img[longdesc]',this).attr('longdesc');
if(longdesc)
TB_show(t,longdesc);
else
TB_show(t,this.href,'image');
return false}
function TB_init(root){
jQuery("a.thickbox",root).each(
function(i){
this.onclick=TB_image;
var t=this.alt||this.name||null;
this.alt=t+" - view bigger version";
if(
(this.type&&this.type.match(/^image[\/](jpeg|gif|png)$/i))
||(this.href&&this.href.match(/\.(jpeg|jpg|png|gif)$/i))
){
imageArray.push([
this.href,
this.title||this.name
])}
}
)}
function TB_show(caption,url){try{
if(document.getElementById("TB_HideSelect")==null){
jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay' title='Fermer'></div><div id='TB_window'></div>");
jQuery("#TB_overlay").click(TB_remove)}
jQuery(".TB_hide").hide();
if(caption==null){caption=""};
if(!FULL_S){
jQuery(window).scroll(TB_position)}
TB_overlaySize();
jQuery("body").append("<div id='TB_load'><img src='"+TB_chemin_animation+"' alt='loading' /></div>");
TB_load_position();
if(url.indexOf("?")!==-1){var baseURL=url.substr(0,url.indexOf("?"))}else{
var baseURL=url}
var urlString=/\.jpg|\.jpeg|\.png|\.gif|\.bmp/g;
var urlType=baseURL.toLowerCase().match(urlString);
if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){
TB_PrevCaption="";
TB_PrevURL="";
TB_PrevHTML="";
TB_NextCaption="";
TB_NextURL="";
TB_NextHTML="";
TB_imageCount="";
TB_Full_Size="";
TB_FoundURL=false;
if(imageArray.length>0){
TB_TempArray=imageArray;
for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML==""));TB_Counter++){
var urlTypeTemp=TB_TempArray[TB_Counter][0].toLowerCase().match(urlString);
if(!(TB_TempArray[TB_Counter][0]==url)){
if(TB_FoundURL){
TB_NextCaption=TB_TempArray[TB_Counter][1];
TB_NextURL=TB_TempArray[TB_Counter][0];
TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#' title='Image suivante'><strong> &gt;</strong></a></span>"}else{
TB_PrevCaption=TB_TempArray[TB_Counter][1];
TB_PrevURL=TB_TempArray[TB_Counter][0];
TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#' title='Image precedente'><strong>&lt; </strong></a></span>"}
}else{
TB_FoundURL=true;
TB_imageCount=(TB_Counter+1)+" / "+(TB_TempArray.length)}
}
}
if(!(TB_NextHTML=="")){imageSuivante=new Image();
imageSuivante.src=TB_NextURL}
imgPreloader=new Image();
imgPreloader.onload=function(){
imgPreloader.onload=null;
TB_Big_Image=false;
var pagesize=TB_getPageSize();
var x=pagesize[0]-150;
var y=pagesize[1]-150;
var imageWidth=imgPreloader.width;
var imageHeight=imgPreloader.height;
IMAGE_WIDTH=imageWidth;
IMAGE_HEIGHT=imageHeight;
if(imageWidth>x){
TB_Big_Image=true;
imageHeight=imageHeight*(x/imageWidth);
imageWidth=x;
if(imageHeight>y){
TB_Big_Image=true;
imageWidth=imageWidth*(y/imageHeight);
imageHeight=y}
}else if(imageHeight>y){
TB_Big_Image=true;
imageWidth=imageWidth*(y/imageHeight);
imageHeight=y;
if(imageWidth>x){
TB_Big_Image=true;
imageHeight=imageHeight*(x/imageWidth);
imageWidth=x}
}
if(!DIAPO){
TB_Diapo="<span id='TB_Diapo'>&nbsp;&nbsp;<a href='#'><strong>[Diaporama]</strong></a></span>"}else{
TB_Diapo="<span id='TB_Diapo'>&nbsp;&nbsp;<a href='#' title='Stop'><strong>[Stop]</strong></a></span>"}
if(TB_Big_Image)
TB_Full_Size="<span id='TB_Full'>&nbsp;&nbsp;<a href='#'><strong>[Zoom]</strong></a></span>";
TB_WIDTH=imageWidth+20;
TB_HEIGHT=imageHeight+20;
jQuery("#TB_window").append("<a href='#' id='TB_ImageOff'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+" - next picture'/></a>"+"<div id='TB_legend' style='background-color:#fff'><div id='TB_caption'>"+caption+"</div><div id='TB_secondLine'>"+TB_imageCount+TB_Full_Size+TB_PrevHTML+TB_NextHTML+TB_Diapo+"</div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton'><img src='"+TB_chemin_close+"' alt='Fermer' /></a></div></div>");
jQuery("#TB_closeWindowButton").click(TB_remove);
jQuery("#TB_load").remove();
jQuery("#TB_window").fadeIn("slow");
if(!(TB_NextHTML=="")){
function goNext(){
FULL_S=false;
jQuery("#TB_window").remove();
jQuery("body").append("<div id='TB_window'></div>");
TB_show(TB_NextCaption,TB_NextURL);
return false}
jQuery("#TB_next").click(goNext)}
if(!(TB_PrevHTML=="")){
function goPrev(){
FULL_S=false;
if(jQuery(document).unbind('click',goPrev)){jQuery(document).unbind('click',goPrev)};
jQuery("#TB_window").remove();
jQuery("body").append("<div id='TB_window'></div>");
TB_show(TB_PrevCaption,TB_PrevURL);
return false}
jQuery("#TB_prev").click(goPrev)}
if(!(TB_Full_Size=="")){
function fullSize(){
var arrayPageScroll=TB_getPageScrollTop();
var pagesize=TB_getPageSize();
if(!FULL_S){
FULL_S=true;
TB_TOP=arrayPageScroll[1];
if((arrayPageScroll[0]+(pagesize[0]-IMAGE_WIDTH)/2)>0){
TB_LEFT=arrayPageScroll[0]+(pagesize[0]-IMAGE_WIDTH)/2}else{
TB_LEFT=50}
jQuery("#TB_window").animate({top:TB_TOP,left:TB_LEFT,width:(IMAGE_WIDTH+20),height:(IMAGE_HEIGHT+20)},1500);
jQuery("#TB_Image").animate({top:20,left:20,width:IMAGE_WIDTH,height:IMAGE_HEIGHT},1500,TB_recadre)}
else{
FULL_S=false;
jQuery("#TB_window").animate({top:(arrayPageScroll[1]+(pagesize[1]-TB_HEIGHT)/2),left:(arrayPageScroll[0]+(pagesize[0]-TB_WIDTH)/2),width:TB_WIDTH,height:TB_HEIGHT},1500);
jQuery("#TB_Image").animate({top:20,left:20,width:(TB_WIDTH-20),height:(TB_HEIGHT-20)},1500,TB_recadre)}
return false}
jQuery("#TB_Full").click(fullSize)}
if(!(TB_NextHTML=="")){
jQuery("#TB_ImageOff").click(goNext)}else{
jQuery("#TB_ImageOff").click(TB_remove)}
jQuery("#TB_Diapo").click(diaporama);
document.onkeydown=function(e){
if(e==null){keycode=event.keyCode}else{keycode=e.which}
if(keycode==27|keycode==67|keycode==70){TB_remove()}else if(keycode==190|keycode==39){if(!(TB_NextHTML=="")){
document.onkeydown="";
goNext()}
}else if(keycode==188|keycode==37){if(!(TB_PrevHTML=="")){
document.onkeydown="";
goPrev()}
}
}
TB_position();
jQuery("#TB_load").remove();
jQuery("#TB_window").css({display:"block"});
if(DIAPO)
setTimeout('diapo();',DELAI);
jQuery("#TB_ImageOff")[0].focus()}
imgPreloader.src=url}else{var queryString=url.replace(/^[^\?]+\?+/,'');
queryString=queryString.replace(/^[^\?]+\?+/,'');
var params=TB_parseQuery(queryString);
TB_WIDTH=(params['width']*1)+30;
TB_HEIGHT=(params['height']*1)+40;
ajaxContentW=TB_WIDTH-30;
ajaxContentH=TB_HEIGHT-45;
if(url.indexOf('TB_iframe')!=-1){
urlNoQuery=url.split('TB_');
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' onload='TB_showIframe()'> </iframe>")}else{
jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}
jQuery("#TB_closeWindowButton").click(TB_remove);
if(url.indexOf('TB_inline')!=-1){
jQuery("#TB_ajaxContent").html(jQuery('#'+params['inlineId']).html());
TB_position();
jQuery("#TB_load").remove();
jQuery("#TB_window").css({display:"block"})}else if(url.indexOf('TB_iframe')!=-1){
TB_position();
if(frames['TB_iframeContent']==undefined){jQuery("#TB_load").remove();
jQuery("#TB_window").css({display:"block"});
jQuery(document).keyup(function(e){var key=e.keyCode;if(key==27){TB_remove()}})}
}else{
jQuery("#TB_ajaxContent").load(url,function(){
TB_position();
jQuery("#TB_load").remove();
jQuery("#TB_window").css({display:"block"})})}
}
jQuery(window).resize(TB_position);
document.onkeyup=function(e){
if(e==null){keycode=event.keyCode}else{keycode=e.which}
if(keycode==27){TB_remove()}
}
}catch(e){
alert(e)}
}
function diaporama(){
if(!DIAPO){
DIAPO=true;
diapo()}else{
DIAPO=false}
return false}
function diapo(){
if(DIAPO){
if(TB_NextURL!=""){
jQuery("#TB_window").remove();
jQuery("body").append("<div id='TB_window'></div>");
TB_show(TB_NextCaption,TB_NextURL)}else DIAPO=false}
return false}
function TB_showIframe(){
jQuery("#TB_load").remove();
jQuery("#TB_window").css({display:"block"})}
function TB_remove(){
DIAPO=false;
FULL_S=false;
jQuery("#TB_imageOff").unbind('click');
jQuery("#TB_overlay").unbind('click');
jQuery("#TB_closeWindowButton").unbind('click');
jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').remove()});
jQuery("#TB_load").remove();
jQuery(".TB_hide").show();
return false}
function TB_position(){
var pagesize=TB_getPageSize();
var arrayPageScroll=TB_getPageScrollTop();
var legendHeight=jQuery("#TB_legend").height();
if(FULL_S&&DIAPO){
FULL_S=false;
jQuery("#TB_window").animate({top:(arrayPageScroll[1]+(pagesize[1]-TB_HEIGHT)/2),left:(arrayPageScroll[0]+(pagesize[0]-TB_WIDTH)/2),width:TB_WIDTH,height:TB_HEIGHT},1500);
jQuery("#TB_Image").animate({top:20,left:20,width:(TB_WIDTH-20),height:(TB_HEIGHT-20)},1500,TB_recadre)}
if(!FULL_S||DIAPO){
jQuery("#TB_window").css({width:TB_WIDTH+"px",left:(arrayPageScroll[0]+(pagesize[0]-TB_WIDTH)/2)+"px",top:(arrayPageScroll[1]+(pagesize[1]-TB_HEIGHT)/2-legendHeight/2)+"px"})}
}
function TB_overlaySize(){
if(window.innerHeight&&window.scrollMaxY||window.innerWidth&&window.scrollMaxX){
yScroll=window.innerHeight+window.scrollMaxY;
xScroll=window.innerWidth+window.scrollMaxX;
var deff=document.documentElement;
var wff=(deff&&deff.clientWidth)||document.body.clientWidth||window.innerWidth||self.innerWidth;
var hff=(deff&&deff.clientHeight)||document.body.clientHeight||window.innerHeight||self.innerHeight;
xScroll-=(window.innerWidth-wff);
yScroll-=(window.innerHeight-hff)}else if(document.body.scrollHeight>document.body.offsetHeight||document.body.scrollWidth>document.body.offsetWidth){yScroll=document.body.scrollHeight;
xScroll=document.body.scrollWidth}else{yScroll=document.body.offsetHeight;
xScroll=document.body.offsetWidth}
jQuery("#TB_overlay").css({"height":yScroll+"px","width":xScroll+"px"});
jQuery("#TB_HideSelect").css({"height":yScroll+"px","width":xScroll+"px"})}
function TB_load_position(){
var pagesize=TB_getPageSize();
var arrayPageScroll=TB_getPageScrollTop();
jQuery("#TB_load")
.css({left:(arrayPageScroll[0]+(pagesize[0]-100)/2)+"px",top:(arrayPageScroll[1]+((pagesize[1]-100)/2))+"px"})
.css({display:"block"})}
function TB_parseQuery(query){
var Params=new Object();
if(!query)return Params;var Pairs=query.split(/[;&]/);
for(var i=0;i<Pairs.length;i++){
var KeyVal=Pairs[i].split('=');
if(!KeyVal||KeyVal.length!=2)continue;
var key=unescape(KeyVal[0]);
var val=unescape(KeyVal[1]);
val=val.replace(/\+/g,' ');
Params[key]=val}
return Params}
function TB_getPageScrollTop(){
var yScrolltop;
var xScrollleft;
if(self.pageYOffset||self.pageXOffset){
yScrolltop=self.pageYOffset;
xScrollleft=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop||document.documentElement.scrollLeft){yScrolltop=document.documentElement.scrollTop;
xScrollleft=document.documentElement.scrollLeft}else if(document.body){yScrolltop=document.body.scrollTop;
xScrollleft=document.body.scrollLeft}
arrayPageScroll=new Array(xScrollleft,yScrolltop)
return arrayPageScroll}
function TB_getPageSize(){
var de=document.documentElement;
var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;
var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight
arrayPageSize=new Array(w,h)
return arrayPageSize}
function TB_recadre(){
TB_overlaySize();
TB_position()}



