// JavaScript Document

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function flvS1(v1){//v1.0
var v2=v1.indexOf("?"),v3=(v2>-1)?v1.substring(v2+1):"";var v4=(v3!="")?v1.substring(0,v2):v1;var v5=(v3!="")?parent.frames[v3].document:document;var v6=0,v7=0,v8;if (v5.layers){var v9=false,v6=v7=0;v8=v5.anchors[v4];if (v8){v9=true;}else {if (v5.layers.length>0){for (j=0;j<v5.layers.length;j++){v8=v5.layers[j].document.anchors[v4];if (v8){v9=true;v6=v5.layers[j].left;v7=v5.layers[j].top;break}}}}this.x=v6+v8.x;this.y=v7+v8.y;return;}if (v5.all){v8=v5.all[v4];}else if (v5.getElementById){v8=v5.getElementById(v4);if (!v8){var v10=v5.getElementsByName(v4);v8=v10[0];}}else {this.x=0;this.y=0;return;}if (v8){v6+=v8.offsetLeft;v7+=v8.offsetTop;while (v8.offsetParent){v8=v8.offsetParent;v6+=v8.offsetLeft;v7+=v8.offsetTop;}}this.x=v6;this.y=v7;}

function flvS3(v1){//v1.0
var v2=MM_findObj(v1),v3=0,v4=0,v5=0,v6=0;if (!v2){this.x=this.y=this.h=this.w=0;return;}var v7=(document.layers)?v2:v2.style;v3=v7.left;v4=v7.top;if ((v3==""||v4=="")&&document.all&&!window.opera){if (v3==""){v3=v2.offsetLeft;}if (v4==""){v4=v2.offsetTop;}}if (v2.offsetHeight){v5=v2.offsetHeight;v6=v2.offsetWidth;}else if (document.layers){v5=v7.clip.height;v6=v7.clip.width;}this.x=parseInt(v3);this.y=parseInt(v4);this.h=parseInt(v5);this.w=parseInt(v6);}

function flvS4(){//v1.0
var v1=arguments,v2=v1[0],v3=v1[1],v4=MM_findObj(v2),v5=v6=0;if (!v4&&document.all){v4=document.all[v2];}if (!v4){this.x=0;this.y=0;return;}var v7=(document.getElementById||document.all),v8=document.layers,v9=v2.indexOf("?");if (v9>-1){v2=v2.substring(0,v9);}if (v8){for (var v10=0;v10<v8.length;v10++){var v11="document."+v8[v10].id;if (eval(v11+".document."+v2)){v5=eval(v11+".left");v6=eval(v11+".top");break;}}}if (v7){v5+=v4.offsetLeft;v6+=v4.offsetTop;while (v4.offsetParent){v4=v4.offsetParent;v5+=v4.offsetLeft;v6+=v4.offsetTop;}}else if (v8){v5+=v4.x;v6+=v4.y;}this.x=v5;this.y=v6;}

function flvS8(v1,v2,v3){//v1.0
var v4=(document.layers)?v1:v1.style;var v5=flvS5();eval("v4.left='"+v2+v5+"'");eval("v4.top='"+v3+v5+"'");}

function flvS5(){//v1.0
var v1=((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1)&&(!window.opera))?"px":"";return v1;}

function flvS6(){//v1.0
var v1=(arguments.length>0)?arguments[0]:window;if (v1.innerWidth){this.x=v1.pageXOffset;this.y=v1.pageYOffset;}else {v1=v1.document;if (v1.documentElement&&v1.documentElement.clientWidth){this.x=v1.documentElement.scrollLeft;this.y=v1.documentElement.scrollTop;}else if (v1.body){this.x=v1.body.scrollLeft;this.y=v1.body.scrollTop;}else {this.x=0;this.y=0;}}}



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_preloadimages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadimages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function P7_HScroller(el,dr,tx,ox,spd) { //v1.7 by PVII
 var g,gg,fr,sp,pa='',slw=true,m=false,w,ww,lx,rx;tx=parseInt(tx);
 if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;}else{return;}
 if(dr=="Stop"){if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1)&& !window.opera){pa="px";}
 if(navigator.userAgent.indexOf("NT")>-1 || navigator.userAgent.indexOf("Windows 2000")>-1){slw=false;}
 if(spd=="Slow"){sp=(slw)?2:1;fr=(slw)?40:30;}else if(spd=="Medium"){sp=(slw)?4:1;fr=(slw)?40:10;
 }else{sp=(slw)?8:4;fr=(slw)?40:10;}if(spd=="Warp"){sp=5000;}var xx = parseInt(gg.left);if(isNaN(xx)){
 if(g.currentStyle){xx=parseInt(g.currentStyle.left);}else if(document.defaultView&&document.defaultView.getComputedStyle){
 xx=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("left"));}else{xx=0;}}
 if(document.all || document.getElementById){w=parseInt(g.offsetWidth);if(!w){w=parseInt(g.style.pixelWidth);}
 if(g.hasChildNodes){for(wx=0;wx<g.childNodes.length;wx++){ww=parseInt(g.childNodes[wx].offsetWidth);
 if(ww>w){w=ww;}}}}else if(document.layers){w=parseInt(g.clip.width);}lx=tx-w+parseInt(ox);rx=tx;
 if(dr=="Right"){if(xx>lx){m=true;xx-=sp;if(xx<lx){xx=lx;}}}
 if(dr=="Left"){if(xx<rx){m=true;xx+=sp;if(xx>rx){xx=rx;}}}
 if(dr=="Reset"){gg.left=tx+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if(m){gg.left=xx+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=true;
  eval("g.p7Magic=setTimeout(\"P7_HScroller('"+el+"','"+dr+"',"+tx+","+ox+",'"+spd+"')\","+fr+")");
 }else{g.toMove=false;}
}



function valider_recherche() {
	if (document.search.auteur_titre.value=="") {
		alert('Veuillez saisir votre un mot-clès titre ou auteur');
		return false;
	} else {
			document.search.submit();
	}		
}


// SCROLLER "à l'affiche"
function flvXAS1(){
var v1=arguments,v2=v1.length,v3='AutoScrollContainer',v4='AutoScrollContent';var v5=MM_findObj(v3),v6=MM_findObj(v4);if (!v5){return;}if (v5.XAS1!=null){clearTimeout(v5.XAS1);}var v7=(v2>0)?parseInt(v1[0]):1;if (v7){var v8=(v2>1)?parseInt(v1[1]):1,v9=(v2>2)?parseInt(v1[2]):50,v10=(v2>3)?parseInt(v1[3]):1;var v11=new flvS3(v3),v12=new flvS3(v4);var v13=v12.x,v14=v12.y,v15=0,v16=0;if (v10==1){var v17=-1*v12.h;v15=v12.x;if (v14>=v17){v16=v12.y-v8;}else {v16=v11.h;}}else {var v18=-1*v12.w;v16=v12.y;if (v13>=v18){v15=v12.x-v8;}else {v15=v11.w;}}flvS8(v6,v15,v16);v5.XAS1=setTimeout("flvXAS1("+v7+","+v8+","+v9+","+v10+")",v9);}}
