Vorw=C3=A4rts est une m=C3=A9thode d'apprentissage de la langue =
allemande, utilis=C3=A9e=20
jusque dans les ann=C3=A9es 90 dans les =C3=A9coles de Suisse=20
Romande, d'Angleterre et du Canada. La m=C3=A9thode est construite =
sur de petites=20
histoires se passant =C3=A0 Cadolzburg,=20
petit village de Bavi=C3=A8re. =
Elles racontent la=20
vie de la =C2=AB famille Schaudi =C2=BB, clich=C3=A9 de la =
classe moyenne rurale=20
allemande. Machiste (la femme reste au foyer =C3=A0 faire =C3=A0 manger =
et n'a pas mot =C3=A0=20
dire sur la gestion de la famille), d'une efficacit=C3=A9 discutable =
(les Suisses=20
romands parlent mal l'allemand par rapport =C3=A0 la dur=C3=A9e de leurs =
=C3=A9tudes), elle a=20
fait rire (mais aussi pleurer) des g=C3=A9n=C3=A9rations =
d'=C3=A9coliers. Cette famille Schaudi=20
est devenu un mythe dans la culture suisse.
";=0A=
}=0A=
}=0A=
else {=0A=
alert("bad target for sajax_do_call: not a function or object: " + =
target);=0A=
}=0A=
=0A=
return;=0A=
}=0A=
=0A=
sajax_debug(func_name + " uri =3D " + uri + " / post =3D " + post_data);=0A=
x.send(post_data);=0A=
sajax_debug(func_name + " waiting..");=0A=
delete x;=0A=
=0A=
return true;=0A=
}=0A=
=0A=
/**=0A=
* @return boolean whether the browser supports XMLHttpRequest=0A=
*/=0A=
function wfSupportsAjax() {=0A=
var request =3D sajax_init_object();=0A=
var supportsAjax =3D request ? true : false;=0A=
delete request;=0A=
return supportsAjax;=0A=
}=0A=
=0A=
------=_NextPart_000_000D_01C93BFF.ECE3A150
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://fr.wikipedia.org/skins-1.5/common/mwsuggest.js?182
/*=0A=
* OpenSearch ajax suggestion engine for MediaWiki=0A=
* =0A=
* uses core MediaWiki open search support to fetch suggestions=0A=
* and show them below search boxes and other inputs=0A=
*=0A=
* by Robert Stojnic (April 2008)=0A=
*/=0A=
=0A=
// search_box_id -> Results object =0A=
var os_map =3D {};=0A=
// cached data, url -> json_text=0A=
var os_cache =3D {};=0A=
// global variables for suggest_keypress=0A=
var os_cur_keypressed =3D 0;=0A=
var os_last_keypress =3D 0;=0A=
var os_keypressed_count =3D 0;=0A=
// type: Timer=0A=
var os_timer =3D null;=0A=
// tie mousedown/up events=0A=
var os_mouse_pressed =3D false;=0A=
var os_mouse_num =3D -1;=0A=
// if true, the last change was made by mouse (and not keyboard)=0A=
var os_mouse_moved =3D false;=0A=
// delay between keypress and suggestion (in ms)=0A=
var os_search_timeout =3D 250;=0A=
// these pairs of inputs/forms will be autoloaded at startup=0A=
var os_autoload_inputs =3D new Array('searchInput', 'searchInput2', =
'powerSearchText', 'searchText');=0A=
var os_autoload_forms =3D new Array('searchform', 'searchform2', =
'powersearch', 'search' );=0A=
// if we stopped the service=0A=
var os_is_stopped =3D false;=0A=
// max lines to show in suggest table=0A=
var os_max_lines_per_suggest =3D 7;=0A=
// number of steps to animate expansion/contraction of container width=0A=
var os_animation_steps =3D 6;=0A=
// num of pixels of smallest step=0A=
var os_animation_min_step =3D 2;=0A=
// delay between steps (in ms)=0A=
var os_animation_delay =3D 30;=0A=
// max width of container in percent of normal size (1 =3D=3D 100%) =0A=
var os_container_max_width =3D 2;=0A=
// currently active animation timer=0A=
var os_animation_timer =3D null;=0A=
=0A=
/** Timeout timer class that will fetch the results */ =0A=
function os_Timer(id,r,query){=0A=
this.id =3D id;=0A=
this.r =3D r;=0A=
this.query =3D query; =0A=
}=0A=
=0A=
/** Timer user to animate expansion/contraction of container width */=0A=
function os_AnimationTimer(r, target){=0A=
this.r =3D r;=0A=
var current =3D document.getElementById(r.container).offsetWidth;=0A=
this.inc =3D Math.round((target-current) / os_animation_steps);=0A=
if(this.inc < os_animation_min_step && this.inc >=3D0)=0A=
this.inc =3D os_animation_min_step; // minimal animation step=0A=
if(this.inc > -os_animation_min_step && this.inc <0)=0A=
this.inc =3D -os_animation_min_step;=0A=
this.target =3D target;=0A=
}=0A=
=0A=
/** Property class for single search box */=0A=
function os_Results(name, formname){ =0A=
this.searchform =3D formname; // id of the searchform=0A=
this.searchbox =3D name; // id of the searchbox=0A=
this.container =3D name+"Suggest"; // div that holds results=0A=
this.resultTable =3D name+"Result"; // id base for the result table =
(+num =3D table row)=0A=
this.resultText =3D name+"ResultText"; // id base for the spans within =
result tables (+num)=0A=
this.toggle =3D name+"Toggle"; // div that has the toggle =
(enable/disable) link=0A=
this.query =3D null; // last processed query=0A=
this.results =3D null; // parsed titles=0A=
this.resultCount =3D 0; // number of results=0A=
this.original =3D null; // query that user entered =0A=
this.selected =3D -1; // which result is selected=0A=
this.containerCount =3D 0; // number of results visible in container =0A=
this.containerRow =3D 0; // height of result field in the container=0A=
this.containerTotal =3D 0; // total height of the container will all =
results=0A=
this.visible =3D false; // if container is visible=0A=
}=0A=
=0A=
/** Hide results div */=0A=
function os_hideResults(r){=0A=
var c =3D document.getElementById(r.container);=0A=
if(c !=3D null)=0A=
c.style.visibility =3D "hidden";=0A=
r.visible =3D false;=0A=
r.selected =3D -1;=0A=
}=0A=
=0A=
/** Show results div */=0A=
function os_showResults(r){=0A=
if(os_is_stopped)=0A=
return;=0A=
os_fitContainer(r);=0A=
var c =3D document.getElementById(r.container);=0A=
r.selected =3D -1;=0A=
if(c !=3D null){=0A=
c.scrollTop =3D 0;=0A=
c.style.visibility =3D "visible";=0A=
r.visible =3D true;=0A=
} =0A=
}=0A=
=0A=
function os_operaWidthFix(x){=0A=
// TODO: better css2 incompatibility detection here=0A=
if(is_opera || is_khtml || =
navigator.userAgent.toLowerCase().indexOf('firefox/1')!=3D-1){=0A=
return 30; // opera&konqueror & old firefox don't understand =
overflow-x, estimate scrollbar width=0A=
} =0A=
return 0;=0A=
}=0A=
=0A=
function os_encodeQuery(value){=0A=
if (encodeURIComponent) {=0A=
return encodeURIComponent(value);=0A=
}=0A=
if(escape) {=0A=
return escape(value);=0A=
}=0A=
return null;=0A=
}=0A=
function os_decodeValue(value){=0A=
if (decodeURIComponent) {=0A=
return decodeURIComponent(value);=0A=
}=0A=
if(unescape){=0A=
return unescape(value);=0A=
}=0A=
return null;=0A=
}=0A=
=0A=
/** Brower-dependent functions to find window inner size, and scroll =
status */=0A=
function f_clientWidth() {=0A=
return f_filterResults (=0A=
window.innerWidth ? window.innerWidth : 0,=0A=
document.documentElement ? document.documentElement.clientWidth : 0,=0A=
document.body ? document.body.clientWidth : 0=0A=
);=0A=
}=0A=
function f_clientHeight() {=0A=
return f_filterResults (=0A=
window.innerHeight ? window.innerHeight : 0,=0A=
document.documentElement ? document.documentElement.clientHeight : 0,=0A=
document.body ? document.body.clientHeight : 0=0A=
);=0A=
}=0A=
function f_scrollLeft() {=0A=
return f_filterResults (=0A=
window.pageXOffset ? window.pageXOffset : 0,=0A=
document.documentElement ? document.documentElement.scrollLeft : 0,=0A=
document.body ? document.body.scrollLeft : 0=0A=
);=0A=
}=0A=
function f_scrollTop() {=0A=
return f_filterResults (=0A=
window.pageYOffset ? window.pageYOffset : 0,=0A=
document.documentElement ? document.documentElement.scrollTop : 0,=0A=
document.body ? document.body.scrollTop : 0=0A=
);=0A=
}=0A=
function f_filterResults(n_win, n_docel, n_body) {=0A=
var n_result =3D n_win ? n_win : 0;=0A=
if (n_docel && (!n_result || (n_result > n_docel)))=0A=
n_result =3D n_docel;=0A=
return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;=0A=
}=0A=
=0A=
/** Get the height available for the results container */=0A=
function os_availableHeight(r){=0A=
var absTop =3D document.getElementById(r.container).style.top;=0A=
var px =3D absTop.lastIndexOf("px");=0A=
if(px > 0)=0A=
absTop =3D absTop.substring(0,px);=0A=
return f_clientHeight() - (absTop - f_scrollTop());=0A=
}=0A=
=0A=
=0A=
/** Get element absolute position {left,top} */=0A=
function os_getElementPosition(elemID){=0A=
var offsetTrail =3D document.getElementById(elemID);=0A=
var offsetLeft =3D 0;=0A=
var offsetTop =3D 0;=0A=
while (offsetTrail){=0A=
offsetLeft +=3D offsetTrail.offsetLeft;=0A=
offsetTop +=3D offsetTrail.offsetTop;=0A=
offsetTrail =3D offsetTrail.offsetParent;=0A=
}=0A=
if (navigator.userAgent.indexOf('Mac') !=3D -1 && typeof =
document.body.leftMargin !=3D 'undefined'){=0A=
offsetLeft +=3D document.body.leftMargin;=0A=
offsetTop +=3D document.body.topMargin;=0A=
}=0A=
return {left:offsetLeft,top:offsetTop};=0A=
}=0A=
=0A=
/** Create the container div that will hold the suggested titles */=0A=
function os_createContainer(r){=0A=
var c =3D document.createElement("div");=0A=
var s =3D document.getElementById(r.searchbox);=0A=
var pos =3D os_getElementPosition(r.searchbox); =0A=
var left =3D pos.left;=0A=
var top =3D pos.top + s.offsetHeight;=0A=
c.className =3D "os-suggest";=0A=
c.setAttribute("id", r.container); =0A=
document.body.appendChild(c); =0A=
=0A=
// dynamically generated style params =0A=
// IE workaround, cannot explicitely set "style" attribute=0A=
c =3D document.getElementById(r.container);=0A=
c.style.top =3D top+"px";=0A=
c.style.left =3D left+"px";=0A=
c.style.width =3D s.offsetWidth+"px";=0A=
=0A=
// mouse event handlers=0A=
c.onmouseover =3D function(event) { os_eventMouseover(r.searchbox, =
event); };=0A=
c.onmousemove =3D function(event) { os_eventMousemove(r.searchbox, =
event); };=0A=
c.onmousedown =3D function(event) { return =
os_eventMousedown(r.searchbox, event); };=0A=
c.onmouseup =3D function(event) { os_eventMouseup(r.searchbox, event); =
};=0A=
return c;=0A=
}=0A=
=0A=
/** change container height to fit to screen */=0A=
function os_fitContainer(r){ =0A=
var c =3D document.getElementById(r.container);=0A=
var h =3D os_availableHeight(r) - 20;=0A=
var inc =3D r.containerRow;=0A=
h =3D parseInt(h/inc) * inc;=0A=
if(h < (2 * inc) && r.resultCount > 1) // min: two results=0A=
h =3D 2 * inc; =0A=
if((h/inc) > os_max_lines_per_suggest )=0A=
h =3D inc * os_max_lines_per_suggest;=0A=
if(h < r.containerTotal){=0A=
c.style.height =3D h +"px";=0A=
r.containerCount =3D parseInt(Math.round(h/inc));=0A=
} else{=0A=
c.style.height =3D r.containerTotal+"px";=0A=
r.containerCount =3D r.resultCount;=0A=
}=0A=
}=0A=
/** If some entries are longer than the box, replace text with "..." */=0A=
function os_trimResultText(r){=0A=
// find max width, first see if we could expand the container to fit it=0A=
var maxW =3D 0;=0A=
for(var i=3D0;i maxW)=0A=
maxW =3D e.offsetWidth;=0A=
}=0A=
var w =3D document.getElementById(r.container).offsetWidth;=0A=
var fix =3D 0;=0A=
if(r.containerCount < r.resultCount){ =0A=
fix =3D 20; // give 20px for scrollbar =0A=
} else=0A=
fix =3D os_operaWidthFix(w);=0A=
if(fix < 4)=0A=
fix =3D 4; // basic padding=0A=
maxW +=3D fix;=0A=
=0A=
// resize container to fit more data if permitted =0A=
var normW =3D document.getElementById(r.searchbox).offsetWidth;=0A=
var prop =3D maxW / normW;=0A=
if(prop > os_container_max_width)=0A=
prop =3D os_container_max_width;=0A=
else if(prop < 1)=0A=
prop =3D 1;=0A=
var newW =3D Math.round( normW * prop ); =0A=
if( w !=3D newW ){ =0A=
w =3D newW;=0A=
if( os_animation_timer !=3D null )=0A=
clearInterval(os_animation_timer.id)=0A=
os_animation_timer =3D new os_AnimationTimer(r,w);=0A=
os_animation_timer.id =3D =
setInterval("os_animateChangeWidth()",os_animation_delay);=0A=
w -=3D fix; // this much is reserved=0A=
}=0A=
=0A=
// trim results=0A=
if(w < 10)=0A=
return;=0A=
for(var i=3D0;i w && (e.offsetWidth < lastW || iteration<2)){=0A=
changedText =3D true;=0A=
lastW =3D e.offsetWidth;=0A=
var l =3D e.innerHTML; =0A=
e.innerHTML =3D l.substring(0,l.length-replace)+"...";=0A=
iteration++;=0A=
replace =3D 4; // how many chars to replace=0A=
}=0A=
if(changedText){=0A=
// show hint for trimmed titles=0A=
=
document.getElementById(r.resultTable+i).setAttribute("title",r.results[i=
]);=0A=
}=0A=
}=0A=
}=0A=
=0A=
/** Invoked on timer to animate change in container width */=0A=
function os_animateChangeWidth(){=0A=
var r =3D os_animation_timer.r;=0A=
var c =3D document.getElementById(r.container);=0A=
var w =3D c.offsetWidth;=0A=
var inc =3D os_animation_timer.inc;=0A=
var target =3D os_animation_timer.target;=0A=
var nw =3D w + inc;=0A=
if( (inc > 0 && nw >=3D target) || (inc <=3D 0 && nw <=3D target) ){=0A=
// finished !=0A=
c.style.width =3D target+"px";=0A=
clearInterval(os_animation_timer.id)=0A=
os_animation_timer =3D null;=0A=
} else{=0A=
// in-progress=0A=
c.style.width =3D nw+"px";=0A=
}=0A=
}=0A=
=0A=
/** Handles data from XMLHttpRequest, and updates the suggest results */=0A=
function os_updateResults(r, query, text, cacheKey){ =0A=
os_cache[cacheKey] =3D text;=0A=
r.query =3D query;=0A=
r.original =3D query;=0A=
if(text =3D=3D ""){=0A=
r.results =3D null;=0A=
r.resultCount =3D 0;=0A=
os_hideResults(r);=0A=
} else{ =0A=
try {=0A=
var p =3D eval('('+text+')'); // simple json parse, could do a safer =
one=0A=
if(p.length<2 || p[1].length =3D=3D 0){=0A=
r.results =3D null;=0A=
r.resultCount =3D 0;=0A=
os_hideResults(r);=0A=
return;=0A=
} =0A=
var c =3D document.getElementById(r.container);=0A=
if(c =3D=3D null)=0A=
c =3D os_createContainer(r); =0A=
c.innerHTML =3D os_createResultTable(r,p[1]);=0A=
// init container table sizes=0A=
var t =3D document.getElementById(r.resultTable); =0A=
r.containerTotal =3D t.offsetHeight; =0A=
r.containerRow =3D t.offsetHeight / r.resultCount;=0A=
os_fitContainer(r);=0A=
os_trimResultText(r); =0A=
os_showResults(r);=0A=
} catch(e){=0A=
// bad response from server or such=0A=
os_hideResults(r); =0A=
os_cache[cacheKey] =3D null;=0A=
}=0A=
} =0A=
}=0A=
=0A=
/** Create the result table to be placed in the container div */=0A=
function os_createResultTable(r, results){=0A=
var c =3D document.getElementById(r.container);=0A=
var width =3D c.offsetWidth - os_operaWidthFix(c.offsetWidth); =0A=
var html =3D "
";=0A=
r.results =3D new Array();=0A=
r.resultCount =3D results.length;=0A=
for(i=3D0;i
"+title+"
";=0A=
}=0A=
html+=3D"
"=0A=
return html;=0A=
}=0A=
=0A=
/** Fetch namespaces from checkboxes or hidden fields in the search form,=0A=
if none defined use wgSearchNamespaces global */=0A=
function os_getNamespaces(r){ =0A=
var namespaces =3D "";=0A=
var elements =3D document.forms[r.searchform].elements;=0A=
for(i=3D0; i < elements.length; i++){=0A=
var name =3D elements[i].name;=0A=
if(typeof name !=3D 'undefined' && name.length > 2 =0A=
&& name[0]=3D=3D'n' && name[1]=3D=3D's' =0A=
&& ((elements[i].type=3D=3D'checkbox' && elements[i].checked) =0A=
|| (elements[i].type=3D=3D'hidden' && elements[i].value=3D=3D"1")) ){=0A=
if(namespaces!=3D"")=0A=
namespaces+=3D"|";=0A=
namespaces+=3Dname.substring(2);=0A=
}=0A=
}=0A=
if(namespaces =3D=3D "")=0A=
namespaces =3D wgSearchNamespaces.join("|");=0A=
return namespaces;=0A=
}=0A=
=0A=
/** Update results if user hasn't already typed something else */=0A=
function os_updateIfRelevant(r, query, text, cacheKey){=0A=
var t =3D document.getElementById(r.searchbox);=0A=
if(t !=3D null && t.value =3D=3D query){ // check if response is still =
relevant =0A=
os_updateResults(r, query, text, cacheKey);=0A=
}=0A=
r.query =3D query;=0A=
}=0A=
=0A=
/** Fetch results after some timeout */=0A=
function os_delayedFetch(){=0A=
if(os_timer =3D=3D null)=0A=
return;=0A=
var r =3D os_timer.r;=0A=
var query =3D os_timer.query;=0A=
os_timer =3D null;=0A=
var path =3D =
wgMWSuggestTemplate.replace("{namespaces}",os_getNamespaces(r))=0A=
.replace("{dbname}",wgDBname)=0A=
.replace("{searchTerms}",os_encodeQuery(query));=0A=
=0A=
// try to get from cache, if not fetch using ajax=0A=
var cached =3D os_cache[path];=0A=
if(cached !=3D null){=0A=
os_updateIfRelevant(r, query, cached, path);=0A=
} else{ =0A=
var xmlhttp =3D sajax_init_object();=0A=
if(xmlhttp){=0A=
try { =0A=
xmlhttp.open("GET", path, true);=0A=
xmlhttp.onreadystatechange=3Dfunction(){=0A=
if (xmlhttp.readyState=3D=3D4 && typeof os_updateIfRelevant =
=3D=3D 'function') { =0A=
os_updateIfRelevant(r, query, xmlhttp.responseText, path);=0A=
}=0A=
};=0A=
xmlhttp.send(null); =0A=
} catch (e) {=0A=
if (window.location.hostname =3D=3D "localhost") {=0A=
alert("Your browser blocks XMLHttpRequest to 'localhost', try using =
a real hostname for development/testing.");=0A=
}=0A=
throw e;=0A=
}=0A=
}=0A=
}=0A=
}=0A=
=0A=
/** Init timed update via os_delayedUpdate() */=0A=
function os_fetchResults(r, query, timeout){=0A=
if(query =3D=3D ""){=0A=
os_hideResults(r);=0A=
return;=0A=
} else if(query =3D=3D r.query)=0A=
return; // no change=0A=
=0A=
os_is_stopped =3D false; // make sure we're running=0A=
=0A=
/* var cacheKey =3D wgDBname+":"+query; =0A=
var cached =3D os_cache[cacheKey];=0A=
if(cached !=3D null){=0A=
os_updateResults(r,wgDBname,query,cached);=0A=
return;=0A=
} */=0A=
=0A=
// cancel any pending fetches=0A=
if(os_timer !=3D null && os_timer.id !=3D null)=0A=
clearTimeout(os_timer.id);=0A=
// schedule delayed fetching of results =0A=
if(timeout !=3D 0){=0A=
os_timer =3D new =
os_Timer(setTimeout("os_delayedFetch()",timeout),r,query);=0A=
} else{ =0A=
os_timer =3D new os_Timer(null,r,query);=0A=
os_delayedFetch(); // do it now!=0A=
}=0A=
=0A=
}=0A=
/** Change the highlighted row (i.e. suggestion), from position cur to =
next */=0A=
function os_changeHighlight(r, cur, next, updateSearchBox){=0A=
if (next >=3D r.resultCount)=0A=
next =3D r.resultCount-1;=0A=
if (next < -1)=0A=
next =3D -1; =0A=
r.selected =3D next;=0A=
if (cur =3D=3D next)=0A=
return; // nothing to do.=0A=
=0A=
if(cur >=3D 0){=0A=
var curRow =3D document.getElementById(r.resultTable + cur);=0A=
if(curRow !=3D null)=0A=
curRow.className =3D "os-suggest-result";=0A=
}=0A=
var newText;=0A=
if(next >=3D 0){=0A=
var nextRow =3D document.getElementById(r.resultTable + next);=0A=
if(nextRow !=3D null)=0A=
nextRow.className =3D os_HighlightClass();=0A=
newText =3D r.results[next];=0A=
} else=0A=
newText =3D r.original;=0A=
=0A=
// adjust the scrollbar if any=0A=
if(r.containerCount < r.resultCount){=0A=
var c =3D document.getElementById(r.container);=0A=
var vStart =3D c.scrollTop / r.containerRow;=0A=
var vEnd =3D vStart + r.containerCount;=0A=
if(next < vStart)=0A=
c.scrollTop =3D next * r.containerRow;=0A=
else if(next >=3D vEnd)=0A=
c.scrollTop =3D (next - r.containerCount + 1) * r.containerRow;=0A=
}=0A=
=0A=
// update the contents of the search box=0A=
if(updateSearchBox){=0A=
os_updateSearchQuery(r,newText); =0A=
}=0A=
}=0A=
=0A=
function os_HighlightClass() {=0A=
var match =3D navigator.userAgent.match(/AppleWebKit\/(\d+)/);=0A=
if (match) {=0A=
var webKitVersion =3D parseInt(match[1]);=0A=
if (webKitVersion < 523) {=0A=
// CSS system highlight colors broken on old Safari=0A=
// https://bugs.webkit.org/show_bug.cgi?id=3D6129=0A=
// Safari 3.0.4, 3.1 known ok=0A=
return "os-suggest-result-hl-webkit";=0A=
}=0A=
}=0A=
return "os-suggest-result-hl";=0A=
}=0A=
=0A=
function os_updateSearchQuery(r,newText){=0A=
document.getElementById(r.searchbox).value =3D newText;=0A=
r.query =3D newText;=0A=
}=0A=
=0A=
/** Find event target */=0A=
function os_getTarget(e){=0A=
if (!e) e =3D window.event;=0A=
if (e.target) return e.target;=0A=
else if (e.srcElement) return e.srcElement;=0A=
else return null;=0A=
}=0A=
=0A=
=0A=
=0A=
/********************=0A=
* Keyboard events =0A=
********************/ =0A=
=0A=
/** Event handler that will fetch results on keyup */=0A=
function os_eventKeyup(e){=0A=
var targ =3D os_getTarget(e);=0A=
var r =3D os_map[targ.id];=0A=
if(r =3D=3D null)=0A=
return; // not our event=0A=
=0A=
// some browsers won't generate keypressed for arrow keys, catch it =0A=
if(os_keypressed_count =3D=3D 0){=0A=
os_processKey(r,os_cur_keypressed,targ);=0A=
}=0A=
var query =3D targ.value;=0A=
os_fetchResults(r,query,os_search_timeout);=0A=
}=0A=
=0A=
/** catch arrows up/down and escape to hide the suggestions */=0A=
function os_processKey(r,keypressed,targ){=0A=
if (keypressed =3D=3D 40){ // Arrow Down=0A=
if (r.visible) { =0A=
os_changeHighlight(r, r.selected, r.selected+1, true); =0A=
} else if(os_timer =3D=3D null){=0A=
// user wants to get suggestions now=0A=
r.query =3D "";=0A=
os_fetchResults(r,targ.value,0);=0A=
}=0A=
} else if (keypressed =3D=3D 38){ // Arrow Up=0A=
if (r.visible){=0A=
os_changeHighlight(r, r.selected, r.selected-1, true);=0A=
}=0A=
} else if(keypressed =3D=3D 27){ // Escape=0A=
document.getElementById(r.searchbox).value =3D r.original;=0A=
r.query =3D r.original;=0A=
os_hideResults(r);=0A=
} else if(r.query !=3D document.getElementById(r.searchbox).value){=0A=
// os_hideResults(r); // don't show old suggestions=0A=
}=0A=
}=0A=
=0A=
/** When keys is held down use a timer to output regular events */=0A=
function os_eventKeypress(e){ =0A=
var targ =3D os_getTarget(e);=0A=
var r =3D os_map[targ.id];=0A=
if(r =3D=3D null)=0A=
return; // not our event=0A=
=0A=
var keypressed =3D os_cur_keypressed;=0A=
if(keypressed =3D=3D 38 || keypressed =3D=3D 40){=0A=
var d =3D new Date()=0A=
var now =3D d.getTime();=0A=
if(now - os_last_keypress < 120){=0A=
os_last_keypress =3D now;=0A=
return;=0A=
}=0A=
}=0A=
=0A=
os_keypressed_count++;=0A=
os_processKey(r,keypressed,targ);=0A=
}=0A=
=0A=
/** Catch the key code (Firefox bug) */=0A=
function os_eventKeydown(e){=0A=
if (!e) e =3D window.event;=0A=
var targ =3D os_getTarget(e);=0A=
var r =3D os_map[targ.id];=0A=
if(r =3D=3D null)=0A=
return; // not our event=0A=
=0A=
os_mouse_moved =3D false;=0A=
=0A=
os_cur_keypressed =3D (window.Event) ? e.which : e.keyCode;=0A=
os_last_keypress =3D 0;=0A=
os_keypressed_count =3D 0;=0A=
}=0A=
=0A=
/** Event: loss of focus of input box */=0A=
function os_eventBlur(e){ =0A=
var targ =3D os_getTarget(e);=0A=
var r =3D os_map[targ.id];=0A=
if(r =3D=3D null)=0A=
return; // not our event=0A=
if(!os_mouse_pressed) =0A=
os_hideResults(r);=0A=
}=0A=
=0A=
/** Event: focus (catch only when stopped) */=0A=
function os_eventFocus(e){=0A=
// nothing happens here?=0A=
}=0A=
=0A=
=0A=
=0A=
/********************=0A=
* Mouse events =0A=
********************/ =0A=
=0A=
/** Mouse over the container */=0A=
function os_eventMouseover(srcId, e){=0A=
var targ =3D os_getTarget(e); =0A=
var r =3D os_map[srcId];=0A=
if(r =3D=3D null || !os_mouse_moved)=0A=
return; // not our event=0A=
var num =3D os_getNumberSuffix(targ.id);=0A=
if(num >=3D 0)=0A=
os_changeHighlight(r,r.selected,num,false);=0A=
=0A=
}=0A=
=0A=
/* Get row where the event occured (from its id) */=0A=
function os_getNumberSuffix(id){=0A=
var num =3D id.substring(id.length-2);=0A=
if( ! (num.charAt(0) >=3D '0' && num.charAt(0) <=3D '9') )=0A=
num =3D num.substring(1);=0A=
if(os_isNumber(num))=0A=
return parseInt(num);=0A=
else=0A=
return -1;=0A=
}=0A=
=0A=
/** Save mouse move as last action */=0A=
function os_eventMousemove(srcId, e){=0A=
os_mouse_moved =3D true;=0A=
}=0A=
=0A=
/** Mouse button held down, register possible click */=0A=
function os_eventMousedown(srcId, e){=0A=
var targ =3D os_getTarget(e);=0A=
var r =3D os_map[srcId];=0A=
if(r =3D=3D null)=0A=
return; // not our event=0A=
var num =3D os_getNumberSuffix(targ.id);=0A=
=0A=
os_mouse_pressed =3D true;=0A=
if(num >=3D 0){=0A=
os_mouse_num =3D num;=0A=
// os_updateSearchQuery(r,r.results[num]);=0A=
}=0A=
// keep the focus on the search field=0A=
document.getElementById(r.searchbox).focus();=0A=
=0A=
return false; // prevents selection=0A=
}=0A=
=0A=
/** Mouse button released, check for click on some row */=0A=
function os_eventMouseup(srcId, e){=0A=
var targ =3D os_getTarget(e);=0A=
var r =3D os_map[srcId];=0A=
if(r =3D=3D null)=0A=
return; // not our event=0A=
var num =3D os_getNumberSuffix(targ.id);=0A=
=0A=
if(num >=3D 0 && os_mouse_num =3D=3D num){=0A=
os_updateSearchQuery(r,r.results[num]);=0A=
os_hideResults(r);=0A=
document.getElementById(r.searchform).submit();=0A=
}=0A=
os_mouse_pressed =3D false;=0A=
// keep the focus on the search field=0A=
document.getElementById(r.searchbox).focus();=0A=
}=0A=
=0A=
/** Check if x is a valid integer */=0A=
function os_isNumber(x){=0A=
if(x =3D=3D "" || isNaN(x))=0A=
return false;=0A=
for(var i=3D0;i=3D '0' && c <=3D '9') )=0A=
return false;=0A=
}=0A=
return true;=0A=
}=0A=
=0A=
=0A=
/** When the form is submitted hide everything, cancel updates... */=0A=
function os_eventOnsubmit(e){=0A=
var targ =3D os_getTarget(e);=0A=
=0A=
os_is_stopped =3D true;=0A=
// kill timed requests=0A=
if(os_timer !=3D null && os_timer.id !=3D null){=0A=
clearTimeout(os_timer.id);=0A=
os_timer =3D null;=0A=
}=0A=
// Hide all suggestions=0A=
for(i=3D0;i /!\ Ne pas retirer cette balise=0A=
*/=0A=
=0A=
=0A=
=0A=
/*************************************************************/=0A=
/* Fonctions JavaScript : pallient les limites de JavaScript */=0A=
/* Surveiller : http://www.ecmascript.org/ */=0A=
/*************************************************************/=0A=
=0A=
/**=0A=
* insertAfter : ins=C3=A9rer un =C3=A9l=C3=A9ment dans une page=0A=
*/=0A=
function insertAfter(parent, node, referenceNode) {=0A=
parent.insertBefore(node, referenceNode.nextSibling); =0A=
}=0A=
=0A=
/**=0A=
* getElementsByClass : rechercher les =C3=A9l=C3=A9ments de la page =
dont le param=C3=A8tre "class" est celui recherch=C3=A9=0A=
*/=0A=
function getElementsByClass(searchClass, node, tag) {=0A=
if (node =3D=3D null) node =3D document;=0A=
if (tag =3D=3D null) tag =3D '*';=0A=
return getElementsByClassName(node, tag, searchClass);=0A=
}=0A=
=0A=
/**=0A=
* Diverses fonctions manipulant les classes=0A=
* Utilise des expressions r=C3=A9guli=C3=A8res et un cache pour de =
meilleures perfs=0A=
* isClass et whichClass depuis =
http://fr.wikibooks.org/w/index.php?title=3DMediaWiki:Common.js&oldid=3D1=
40211=0A=
* hasClass, addClass, removeClass et eregReplace depuis =
http://drupal.org.in/doc/misc/drupal.js.source.html=0A=
* surveiller l'impl=C3=A9mentation de .classList =
http://www.w3.org/TR/2008/WD-html5-diff-20080122/#htmlelement-extensions=0A=
*/=0A=
function isClass(element, classe) {=0A=
return hasClass(element, classe);=0A=
}=0A=
=0A=
function whichClass(element, classes) {=0A=
var s=3D" "+element.className+" ";=0A=
for(var i=3D0;i=3D0) return i;=0A=
return -1;=0A=
}=0A=
=0A=
function hasClass(node, className) {=0A=
if (node.className =3D=3D className) {=0A=
return true;=0A=
}=0A=
var reg =3D new RegExp('(^| )'+ className +'($| )')=0A=
if (reg.test(node.className)) {=0A=
return true;=0A=
}=0A=
return false;=0A=
}=0A=
=0A=
function addClass(node, className) {=0A=
if (hasClass(node, className)) {=0A=
return false;=0A=
}=0A=
node.className +=3D ' '+ className;=0A=
return true;=0A=
}=0A=
=0A=
function removeClass(node, className) {=0A=
if (!hasClass(node, className)) {=0A=
return false;=0A=
}=0A=
node.className =3D eregReplace('(^|\\s+)'+ className +'($|\\s+)', ' ', =
node.className);=0A=
return true;=0A=
}=0A=
=0A=
function eregReplace(search, replace, subject) {=0A=
return subject.replace(new RegExp(search,'g'), replace);=0A=
}=0A=
=0A=
=0A=
/**=0A=
* R=C3=A9cup=C3=A8re la valeur du cookie=0A=
*/=0A=
function getCookieVal(name) {=0A=
var cookiePos =3D document.cookie.indexOf(name + "=3D");=0A=
var cookieValue =3D false;=0A=
if (cookiePos > -1) {=0A=
cookiePos +=3D name.length + 1;=0A=
var endPos =3D document.cookie.indexOf(";", cookiePos);=0A=
if (endPos > -1)=0A=
cookieValue =3D document.cookie.substring(cookiePos, endPos);=0A=
else=0A=
cookieValue =3D document.cookie.substring(cookiePos);=0A=
}=0A=
return cookieValue;=0A=
}=0A=
=0A=
=0A=
=0A=
/************************************************************************=
**********************************/=0A=
/* Fonctions g=C3=A9n=C3=A9rales MediaWiki (pallient les limitations du =
logiciel) */=0A=
/* Surveiller : =
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/wikib=
its.js?view=3Dlog */=0A=
/************************************************************************=
**********************************/=0A=
=0A=
/*=0A=
* Fonction g=C3=A9n=C3=A9rales de lancement de fonctions ou de script=0A=
* D=C3=89PR=C3=89CI=C3=89 : utiliser addOnloadHook simplement=0A=
*/=0A=
function addLoadEvent(func) {=0A=
addOnloadHook(func);=0A=
}=0A=
=0A=
/**=0A=
* Ins=C3=A9rer un JavaScript d'une page particuli=C3=A8re, id=C3=A9e de =
Mickachu=0A=
* D=C3=89PR=C3=89CI=C3=89 : utiliser importScript qui fait partie du =
logiciel=0A=
*/=0A=
function loadJs(page) {=0A=
importScript(page);=0A=
}=0A=
=0A=
/**=0A=
* Projet JavaScript=0A=
*/=0A=
function obtenir(name) {=0A=
importScript('MediaWiki:Gadget-' + name + '.js');=0A=
}=0A=
=0A=
/**=0A=
* Transformer les pages du Bistro, du BA et les pages =
sp=C3=A9cifi=C3=A9es en page de discussion=0A=
*/=0A=
function TransformeEnDiscussion() {=0A=
if( (wgPageName.search('Wikip=C3=A9dia:Le_Bistro') !=3D -1)=0A=
|| (wgPageName.search('Wikip=C3=A9dia:Bulletin_des_administrateurs') =
!=3D -1)=0A=
|| document.getElementById('transformeEnPageDeDiscussion'))=0A=
document.body.className =3D 'ns-talk';=0A=
}=0A=
addOnloadHook(TransformeEnDiscussion);=0A=
=0A=
/**=0A=
* Transformer certaines pages en pseudo-article=0A=
* c'est raisonnable ? --Tavernier=0A=
*/=0A=
function TransformeEnArticle() {=0A=
var transformeEnA =3D document.getElementById("transformeEnArticle");=0A=
if(transformeEnA) document.body.className =3D "ns-0";=0A=
}=0A=
addOnloadHook(TransformeEnArticle);=0A=
=0A=
/**=0A=
* Ajouter un bouton =C3=A0 la fin de la barre d'outils=0A=
*/=0A=
function addCustomButton(imageFile, speedTip, tagOpen, tagClose, =
sampleText, imageId) {=0A=
mwCustomEditButtons[mwCustomEditButtons.length] =3D=0A=
{"imageId": imageId,=0A=
"imageFile": imageFile,=0A=
"speedTip": speedTip,=0A=
"tagOpen": tagOpen,=0A=
"tagClose": tagClose,=0A=
"sampleText": sampleText};=0A=
}=0A=
=0A=
=0A=
=0A=
/****************************************/=0A=
/* Applications pour l'ensemble du site */=0A=
/****************************************/=0A=
=0A=
/**=0A=
* Tout ce qui concerne la page d'=C3=A9dition=0A=
* Voir MediaWiki:Common.js/edit.js pour ces fonctions=0A=
*/=0A=
if( wgAction =3D=3D 'edit' || wgAction =3D=3D 'submit' ) {=0A=
importScript( 'MediaWiki:Common.js/edit.js' );=0A=
}=0A=
=0A=
/**=0A=
* Liens d'acc=C3=A8s directs pour la navigation au clavier=0A=
*/=0A=
function showSkipLinks() {=0A=
var jump_to_nav =3D document.getElementById('jump-to-nav');=0A=
if( !jump_to_nav ) return;=0A=
var skip_links =3D jump_to_nav.getElementsByTagName('A')[0];=0A=
jump_to_nav.className=3D'hidden';=0A=
skip_links.onfocus=3Dfunction() {=0A=
jump_to_nav.className=3D'';=0A=
}=0A=
}=0A=
addOnloadHook(showSkipLinks);=0A=
=0A=
/**=0A=
* R=C3=A9=C3=A9criture des titres=0A=
*=0A=
* Fonction utilis=C3=A9e par [[Mod=C3=A8le:Titre incorrect]]=0A=
* =0A=
* La fonction cherche un bandeau de la forme=0A=
*
=0A=
* titre=0A=
*
=0A=
*=0A=
* Un =C3=A9l=C3=A9ment comportant id=3D"DisableRealTitle" =
d=C3=A9sactive la fonction=0A=
*/=0A=
function rewritePageH1() {=0A=
var realTitleBanner =3D document.getElementById('RealTitleBanner');=0A=
if (realTitleBanner) {=0A=
if (!document.getElementById('DisableRealTitle')) {=0A=
var realTitle =3D document.getElementById('RealTitle');=0A=
var h1 =3D document.getElementsByTagName('h1')[0];=0A=
if (realTitle && h1) {=0A=
var titleText =3D realTitle.innerHTML;=0A=
if (titleText =3D=3D '') h1.style.display =3D 'none';=0A=
else h1.innerHTML =3D titleText;=0A=
realTitleBanner.style.display =3D 'none';=0A=
}=0A=
}=0A=
}=0A=
}=0A=
addOnloadHook(rewritePageH1);=0A=
=0A=
/**=0A=
* Ic=C3=B4nes de titre=0A=
* =0A=
* Cherche les ic=C3=B4nes de titre (class=3D"icone_de_titre") et les=0A=
* d=C3=A9place =C3=A0 droite du titre de la page.=0A=
* Doit =C3=AAtre ex=C3=A9cut=C3=A9 apr=C3=A8s une =C3=A9ventuelle =
correction de titre.=0A=
*/=0A=
function IconesDeTitre() {=0A=
var h1 =3D document.getElementsByTagName("h1")[0];=0A=
var icones =3D getElementsByClass( "icone_de_titre", document, "div" );=0A=
for( var j =3D icones.length; j > 0; --j ){=0A=
icones[j-1].style.display =3D "block"; /* annule display:none par =
d=C3=A9faut */=0A=
icones[j-1].style.borderWidth =3D "1px";=0A=
icones[j-1].style.borderStyle =3D "solid";=0A=
icones[j-1].style.borderColor =3D "white";=0A=
if( skin =3D=3D "modern" ){=0A=
icones[j-1].style.marginTop =3D "0em";=0A=
}=0A=
h1.parentNode.insertBefore(icones[j-1], h1); /* d=C3=A9placement de =
l'=C3=A9l=C3=A9ment */=0A=
}=0A=
}=0A=
addOnloadHook(IconesDeTitre);=0A=
=0A=
/**=0A=
* D=C3=A9placement de coordonn=C3=A9es qui apparaissent en haut de la =
page =0A=
*/=0A=
function moveCoord() {=0A=
var h1 =3D document.getElementsByTagName("h1")[0];=0A=
var coord =3D document.getElementById('coordinates');=0A=
if ( !coord || !h1 ) return;=0A=
coord.id =3D "coordinates-title";=0A=
h1.insertBefore(coord, h1.firstChild);=0A=
}=0A=
addOnloadHook(moveCoord);=0A=
=0A=
/**=0A=
* D=C3=A9placement des [modifier]=0A=
*=0A=
* Correction des titres qui s'affichent mal en raison de limitations =
dues =C3=A0 MediaWiki.=0A=
* Ce script devrait pouvoir =C3=AAtre supprim=C3=A9 lorsque le =
[[bugzilla:11555]] sera r=C3=A9solu (comportement =C3=A9quivalent)=0A=
*=0A=
* Copyright 2006, Marc Mongenet. Licence GPL et GFDL.=0A=
*=0A=
* The function looks for , and move them=0A=
* at the end of their parent and display them inline in small font.=0A=
* var oldEditsectionLinks=3Dtrue disables the function.=0A=
*/=0A=
function setModifySectionStyle() =0A=
{=0A=
=0A=
var process =3D function(list)=0A=
{=0A=
for(var i=3D0;i!=3Dlist.length;i++)=0A=
{=0A=
var span=3Dlist[i].firstChild=0A=
=0A=
if (span.className =3D=3D "editsection") =0A=
{=0A=
span.style.fontSize =3D "xx-small";=0A=
span.style.fontWeight =3D "normal";=0A=
span.style.cssFloat =3D =
span.style.styleFloat =3D "none";=0A=
=
span.parentNode.appendChild(document.createTextNode(" "));=0A=
span.parentNode.appendChild(span);=0A=
}=0A=
}=0A=
}=0A=
=0A=
try =0A=
{=0A=
if (!(typeof oldEditsectionLinks =3D=3D 'undefined' || =
oldEditsectionLinks =3D=3D false)) return;=0A=
process(document.getElementsByTagName("h2"));=0A=
process(document.getElementsByTagName("h3"));=0A=
process(document.getElementsByTagName("h4"));=0A=
process(document.getElementsByTagName("h5"));=0A=
process(document.getElementsByTagName("h6"));=0A=
=0A=
}=0A=
catch (e) { }=0A=
}=0A=
addOnloadHook(setModifySectionStyle);=0A=
=0A=
/** =0A=
* Bo=C3=AEtes d=C3=A9roulantes=0A=
*=0A=
* Pour [[Mod=C3=A8le:M=C3=A9ta palette de navigation]]=0A=
*/=0A=
var autoCollapse =3D 2;=0A=
var collapseCaption =3D '[ Enrouler ]';=0A=
var expandCaption =3D '[ D=C3=A9rouler ]';=0A=
=0A=
function collapseTable( tableIndex ) {=0A=
var Button =3D document.getElementById( "collapseButton" + tableIndex =
);=0A=
var Table =3D document.getElementById( "collapsibleTable" + tableIndex =
);=0A=
if ( !Table || !Button ) return false;=0A=
=0A=
var Rows =3D Table.getElementsByTagName( "tr" ); =0A=
=0A=
if ( Button.firstChild.data =3D=3D collapseCaption ) {=0A=
for ( var i =3D 1; i < Rows.length; i++ ) {=0A=
Rows[i].style.display =3D "none";=0A=
}=0A=
Button.firstChild.data =3D expandCaption;=0A=
} else {=0A=
for ( var i =3D 1; i < Rows.length; i++ ) {=0A=
Rows[i].style.display =3D Rows[0].style.display;=0A=
}=0A=
Button.firstChild.data =3D collapseCaption;=0A=
}=0A=
}=0A=
=0A=
function createCollapseButtons() {=0A=
var tableIndex =3D 0;=0A=
var NavigationBoxes =3D new Object();=0A=
var Tables =3D document.getElementsByTagName( "table" );=0A=
=0A=
for ( var i =3D 0; i < Tables.length; i++ ) {=0A=
if ( hasClass( Tables[i], "collapsible" ) ) {=0A=
NavigationBoxes[ tableIndex ] =3D Tables[i];=0A=
Tables[i].setAttribute( "id", "collapsibleTable" + tableIndex );=0A=
=0A=
var Button =3D document.createElement( "span" );=0A=
var ButtonLink =3D document.createElement( "a" );=0A=
var ButtonText =3D document.createTextNode( collapseCaption );=0A=
=0A=
Button.style.styleFloat =3D "right";=0A=
Button.style.cssFloat =3D "right";=0A=
Button.style.fontWeight =3D "normal";=0A=
Button.style.textAlign =3D "right";=0A=
Button.style.width =3D "6em";=0A=
=0A=
ButtonLink.setAttribute( "id", "collapseButton" + tableIndex );=0A=
ButtonLink.setAttribute( "href", "javascript:collapseTable(" + =
tableIndex + ");" );=0A=
ButtonLink.appendChild( ButtonText );=0A=
=0A=
Button.appendChild( ButtonLink );=0A=
=0A=
var Header =3D Tables[i].getElementsByTagName( "tr" =
)[0].getElementsByTagName( "th" )[0];=0A=
/* only add button and increment count if there is a header row to =
work with */=0A=
if (Header) {=0A=
Header.insertBefore( Button, Header.childNodes[0] );=0A=
tableIndex++;=0A=
}=0A=
}=0A=
}=0A=
=0A=
for (var i =3D 0; i < tableIndex; i++) {=0A=
if ( hasClass( NavigationBoxes[i], "collapsed" ) || ( tableIndex =
>=3D autoCollapse && hasClass( NavigationBoxes[i], "autocollapse" ) ) ) =
collapseTable( i );=0A=
}=0A=
}=0A=
addOnloadHook(createCollapseButtons);=0A=
=0A=
/**=0A=
* Pour [[Mod=C3=A8le:Bo=C3=AEte d=C3=A9roulante]] =0A=
*/=0A=
var NavigationBarShowDefault =3D 0;=0A=
=0A=
function toggleNavigationBar(indexNavigationBar) {=0A=
var NavToggle =3D document.getElementById("NavToggle" + =
indexNavigationBar);=0A=
var NavFrame =3D document.getElementById("NavFrame" + =
indexNavigationBar);=0A=
=0A=
if (!NavFrame || !NavToggle) return;=0A=
=0A=
// surcharge des libell=C3=A9s d=C3=A9rouler/enrouler gr=C3=A2ce a =
l'attribut title=0A=
// exemple : title=3D"[d=C3=A9roulade]/[enroulade]"=0A=
var caption =3D [expandCaption, collapseCaption];=0A=
if (NavFrame.title && NavFrame.title.length > 0) {=0A=
caption =3D NavFrame.title.split("/");=0A=
if (caption.length < 2) caption.push(collapseCaption);=0A=
}=0A=
=0A=
// if shown now=0A=
if (NavToggle.firstChild.data =3D=3D caption[1]) {=0A=
for ( var NavChild =3D NavFrame.firstChild; NavChild !=3D null; =
NavChild =3D NavChild.nextSibling ) {=0A=
if (hasClass(NavChild, 'NavPic')) NavChild.style.display =3D =
'none';=0A=
if (hasClass(NavChild, 'NavContent')) NavChild.style.display =3D =
'none';=0A=
if (hasClass(NavChild, 'NavToggle')) NavChild.firstChild.data =3D =
caption[0];=0A=
}=0A=
=0A=
// if hidden now=0A=
} else if (NavToggle.firstChild.data =3D=3D caption[0]) {=0A=
for ( var NavChild =3D NavFrame.firstChild; NavChild !=3D null; =
NavChild =3D NavChild.nextSibling ) {=0A=
if (hasClass(NavChild, 'NavPic')) NavChild.style.display =3D =
'block';=0A=
if (hasClass(NavChild, 'NavContent')) NavChild.style.display =3D =
'block';=0A=
if (hasClass(NavChild, 'NavToggle')) NavChild.firstChild.data =3D =
caption[1];=0A=
}=0A=
}=0A=
}=0A=
=0A=
// adds show/hide-button to navigation bars=0A=
function createNavigationBarToggleButton() {=0A=
var indexNavigationBar =3D 0;=0A=
var NavFrame;=0A=
// iterate over all < div >-elements=0A=
for( var i=3D0; NavFrame =3D document.getElementsByTagName("div")[i]; =
i++ ) {=0A=
// if found a navigation bar=0A=
if (hasClass(NavFrame, "NavFrame")) {=0A=
indexNavigationBar++;=0A=
var NavToggle =3D document.createElement("a");=0A=
NavToggle.className =3D 'NavToggle';=0A=
NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);=0A=
NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + =
indexNavigationBar + ');');=0A=
=0A=
// surcharge des libell=C3=A9s d=C3=A9rouler/enrouler gr=C3=A2ce a =
l'attribut title=0A=
var caption =3D collapseCaption;=0A=
if (NavFrame.title && NavFrame.title.indexOf("/") > 0) {=0A=
caption =3D NavFrame.title.split("/")[1];=0A=
}=0A=
=0A=
var NavToggleText =3D document.createTextNode(caption);=0A=
NavToggle.appendChild(NavToggleText);=0A=
=0A=
// add NavToggle-Button as first div-element =0A=
// in
=0A=
NavFrame.insertBefore( NavToggle, NavFrame.firstChild );=0A=
NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);=0A=
}=0A=
}=0A=
// if more Navigation Bars found than Default: hide all=0A=
if (NavigationBarShowDefault < indexNavigationBar) {=0A=
for( var i=3D1; i<=3DindexNavigationBar; i++ ) {=0A=
toggleNavigationBar(i);=0A=
}=0A=
}=0A=
}=0A=
addOnloadHook(createNavigationBarToggleButton);=0A=
=0A=
/**=0A=
* WikiMiniAtlas=0A=
*=0A=
* voir WP:WMA =0A=
*/=0A=
if (wgServer =3D=3D "https://secure.wikimedia.org") {=0A=
var metaBase =3D "https://secure.wikimedia.org/wikipedia/meta";=0A=
} else {=0A=
var metaBase =3D "http://meta.wikimedia.org";=0A=
}=0A=
importScriptURI(metaBase+"/w/index.php?title=3DMediaWiki:Wikiminiatlas.js=
&action=3Draw&ctype=3Dtext/javascript&smaxage=3D21600&maxage=3D86400")=0A=
=0A=
var wma_settings =3D { =0A=
buttonImage: =
'http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Geographylogo.s=
vg/18px-Geographylogo.svg.png'=0A=
}=0A=
=0A=
/**=0A=
* Utilisation du mod=C3=A8le Mod=C3=A8le:Images=0A=
*/=0A=
function toggleImage(group, remindex, shwindex) {=0A=
=
document.getElementById("ImageGroupsGr"+group+"Im"+remindex).style.displa=
y=3D"none";=0A=
=
document.getElementById("ImageGroupsGr"+group+"Im"+shwindex).style.displa=
y=3D"inline";=0A=
}=0A=
=0A=
function imageGroup(){=0A=
if (document.URL.match(/printable/g)) return;=0A=
var bc=3Ddocument.getElementById("bodyContent");=0A=
if( !bc ) bc =3D document.getElementById("mw_contentholder");=0A=
if( !bc ) return;=0A=
var divs=3Dbc.getElementsByTagName("div");=0A=
var i =3D 0, j =3D 0;=0A=
var units, search;=0A=
var currentimage;=0A=
var UnitNode;=0A=
for (i =3D 0; i < divs.length ; i++) {=0A=
if (divs[i].className !=3D "ImageGroup") continue;=0A=
UnitNode=3Dundefined;=0A=
search=3Ddivs[i].getElementsByTagName("div");=0A=
for (j =3D 0; j < search.length ; j++) {=0A=
if (search[j].className !=3D "ImageGroupUnits") continue;=0A=
UnitNode=3Dsearch[j];=0A=
break;=0A=
}=0A=
if (UnitNode=3D=3Dundefined) continue;=0A=
units=3DArray();=0A=
for (j =3D 0 ; j < UnitNode.childNodes.length ; j++ ) {=0A=
var temp =3D UnitNode.childNodes[j];=0A=
if (temp.className=3D=3D"center") units.push(temp);=0A=
}=0A=
for (j =3D 0 ; j < units.length ; j++) {=0A=
currentimage=3Dunits[j];=0A=
currentimage.id=3D"ImageGroupsGr"+i+"Im"+j;=0A=
var imghead =3D document.createElement("div");=0A=
var leftlink;=0A=
var rightlink;=0A=
if (j !=3D 0) {=0A=
leftlink =3D document.createElement("a");=0A=
leftlink.href =3D =
"javascript:toggleImage("+i+","+j+","+(j-1)+");";=0A=
leftlink.innerHTML=3D"=E2=97=80";=0A=
} else {=0A=
leftlink =3D document.createElement("span");=0A=
leftlink.innerHTML=3D" ";=0A=
}=0A=
if (j !=3D units.length - 1) {=0A=
rightlink =3D document.createElement("a");=0A=
rightlink.href =3D =
"javascript:toggleImage("+i+","+j+","+(j+1)+");";=0A=
rightlink.innerHTML=3D"=E2=96=B6";=0A=
} else {=0A=
rightlink =3D document.createElement("span");=0A=
rightlink.innerHTML=3D" ";=0A=
}=0A=
var comment =3D document.createElement("tt");=0A=
comment.innerHTML =3D "("+ (j+1) + "/" + units.length + ")";=0A=
with(imghead) {=0A=
style.fontSize=3D"110%";=0A=
style.fontweight=3D"bold";=0A=
appendChild(leftlink);=0A=
appendChild(comment);=0A=
appendChild(rightlink);=0A=
}=0A=
currentimage.insertBefore(imghead,currentimage.childNodes[0]);=0A=
if (j !=3D 0) currentimage.style.display=3D"none";=0A=
}=0A=
}=0A=
}=0A=
addOnloadHook(imageGroup);=0A=
=0A=
/**=0A=
* Ajout d'un style particulier aux liens interlangues vers un bon =
article ou=0A=
* un article de qualit=C3=A9=0A=
*/=0A=
function lienAdQouBAouPdQ() {=0A=
// links are only replaced in p-lang=0A=
if(window.disableFeaturedInterwikiLinks!=3Dundefined) return=0A=
var pLang =3D document.getElementById("p-lang");=0A=
if (!pLang) return;=0A=
var lis =3D pLang.getElementsByTagName("li");=0A=
var l =3D lis.length=0A=
=0A=
if(wgNamespaceNumber=3D=3D0)=0A=
for (var i=3D0; i' + =
div_cat.innerHTML;=0A=
}=0A=
}=0A=
addOnloadHook(movePortalToCategoryBox);=0A=
=0A=
/**=0A=
* Permet d'afficher les cat=C3=A9gories cach=C3=A9es pour les =
contributeurs enregistr=C3=A9s, en ajoutant un (+) =C3=A0 la =
mani=C3=A8re des bo=C3=AEtes d=C3=A9roulantes=0A=
*/=0A=
function hiddencat()=0A=
{=0A=
if(document.URL.indexOf("printable=3Dyes")!=3D-1) return;=0A=
var cl =3D document.getElementById('catlinks'); if(!cl) return;=0A=
if( !(hc =3D document.getElementById('mw-hidden-catlinks')) ) return;=0A=
if( hasClass(hc, 'mw-hidden-cats-user-shown') ) return;=0A=
var nc =3D document.getElementById('mw-normal-catlinks');=0A=
if( !nc )=0A=
{=0A=
var catline =3D document.createElement('div');=0A=
catline.id =3D 'mw-normal-catlinks';=0A=
var a =3D document.createElement('a');=0A=
a.href =3D '/wiki/Cat=C3=A9gorie:Accueil';=0A=
a.title =3D 'Cat=C3=A9gorie:Accueil';=0A=
a.appendChild(document.createTextNode('Cat=C3=A9gories'));=0A=
catline.appendChild(a);=0A=
catline.appendChild(document.createTextNode(' : '));=0A=
nc =3D cl.insertBefore(catline, cl.firstChild);=0A=
}=0A=
else nc.appendChild(document.createTextNode(' | '));=0A=
var lnk =3D document.createElement('a');=0A=
lnk.id =3D 'mw-hidden-cats-link';=0A=
lnk.title =3D 'Cet article contient des cat=C3=A9gories cach=C3=A9es';=0A=
lnk.style.cursor =3D 'pointer';=0A=
lnk.style.color =3D 'black';=0A=
lnk.onclick =3D toggleHiddenCats;=0A=
lnk.appendChild(document.createTextNode('[+]'));=0A=
hclink =3D nc.appendChild(lnk);=0A=
}=0A=
function toggleHiddenCats()=0A=
{=0A=
if( hasClass(hc, 'mw-hidden-cats-hidden') )=0A=
{=0A=
removeClass(hc, 'mw-hidden-cats-hidden');=0A=
addClass(hc, 'mw-hidden-cat-user-shown');=0A=
changeText(hclink, '[=E2=80=93]');=0A=
}=0A=
else=0A=
{=0A=
removeClass(hc, 'mw-hidden-cat-user-shown');=0A=
addClass(hc, 'mw-hidden-cats-hidden');=0A=
changeText(hclink, '[+]');=0A=
}=0A=
}=0A=
addOnloadHook(hiddencat);=0A=
=0A=
/**=0A=
* Script pour alterner entre deux cartes de g=C3=A9olocalisation=0A=
*/=0A=
addOnloadHook(function(){ =0A=
var cont;=0A=
if(!(wgAction=3D=3D"view")) return=0A=
=0A=
//si celui qui a col=C3=A9 =C3=A7a ici aurait l'obligence de filtrer le =
getElementsByClass sur le type de noeud cherch=C3=A9, ca serait sympa =
pour les perfs. Merci.=0A=
//En attendant, je me suis permit de modifier le script pour qu'il n'y =
ait qu'un seul appel =C3=A0 getElementsByClass, et r=C3=A9duit le scope =
=C3=A0 bodyContent, ca sera deja =C3=A7a de fait....=0A=
//Maloq.=0A=
=0A=
cont=3DgetElementsByClass('img_toogle', =
document.getElementById('bodyContent'));=0A=
if(cont.length=3D=3D0) return=0A=
=0A=
for (var i =3D 0; i < cont.length ; i++) {=0A=
cont.box =3D getElementsByClass('geobox',cont[i]);=0A=
cont.box[0].style.display=3D'none';=0A=
cont.box[1].style.borderTop=3D'0';=0A=
var toogle =3D document.createElement('a');=0A=
=
toogle.appendChild(document.createTextNode(cont.box[0].getElementsByTagNa=
me('img')[0].alt));=0A=
toogle.href=3D'#';=0A=
toogle.className=3D'a_toogle';=0A=
toogle.status =3D 1;=0A=
toogle.onclick =3D function() {=0A=
this.removeChild(this.firstChild);=0A=
div0 =3D getElementsByClass('geobox',this.parentNode)[0];=0A=
div1 =3D getElementsByClass('geobox',this.parentNode)[1];=0A=
alt0 =3D div0.getElementsByTagName('img')[0].alt;=0A=
alt1 =3D div1.getElementsByTagName('img')[0].alt;=0A=
if(this.status=3D=3D0) {=0A=
div0.style.display=3D'none';=0A=
div1.style.display=3D'';=0A=
this.status=3D1;=0A=
this.appendChild(document.createTextNode(alt0));=0A=
} else {=0A=
div0.style.display=3D'';=0A=
div1.style.display=3D'none';=0A=
this.status=3D0;=0A=
this.appendChild(document.createTextNode(alt1));=0A=
}=0A=
return false;=0A=
}=0A=
cont[i].insertBefore(toogle, cont.box[1].nextSibling);=0A=
}=0A=
});=0A=
=0A=
/**=0A=
* permet d'ajouter un petit lien (par exemple d'aide) =C3=A0 la fin du =
titre d'une page.=0A=
* known bug : conflit avec le changement de titre classique.=0A=
* Pour les commentaires, merci de contacter [[user:Plyd|Plyd]].=0A=
*/=0A=
function rewritePageH1bis() {=0A=
try {=0A=
var helpPage =3D document.getElementById("helpPage");=0A=
if (helpPage) {=0A=
var helpPageURL =3D document.getElementById("helpPageURL");=0A=
var h1 =3D document.getElementsByTagName("h1")[0];=0A=
if (helpPageURL && h1) {=0A=
h1.innerHTML =3D h1.innerHTML + '' + =
helpPageURL.innerHTML + '';=0A=
helpPage.style.display =3D "none";=0A=
}=0A=
}=0A=
} catch (e) {=0A=
/* Something went wrong. */=0A=
}=0A=
}=0A=
addOnloadHook(rewritePageH1bis);=0A=
=0A=
=0A=
/************************************************************/=0A=
/* Strictement sp=C3=A9cifiques =C3=A0 un espace de nom ou =C3=A0 une =
page */=0A=
/************************************************************/=0A=
=0A=
// ESPACE DE NOM 'ARTICLE'=0A=
if( wgNamespaceNumber =3D=3D 0 ) {=0A=
=0A=
=0A=
} // Fin du code concernant l'espace de nom 'Article'=0A=
=0A=
=0A=
// PAGE D'ACCUEIL=0A=
if( wgTitle =3D=3D 'Accueil' ) {=0A=
=0A=
/**=0A=
* Suppression du titre sur la page d'accueil, =0A=
* changement de l'onglet et lien vers la liste compl=C3=A8te des =
Wikip=C3=A9dias depuis l'accueil=0A=
*/=0A=
function mainPageTransform(){=0A=
if(wgPageName !=3D 'Accueil' && wgPageName !=3D 'Discuter:Accueil') =
return;=0A=
try {=0A=
document.getElementById('ca-nstab-main').firstChild.innerHTML =3D =
'Accueil';=0A=
} catch (e) { /* Erreur : l'apparence ne g=C3=A8re la pas les onglets =
*/ }=0A=
if(wgPageName =3D=3D 'Accueil' && wgIsArticle) =
addPortletLink('p-lang', 'http://www.wikipedia.org/', 'Liste =
compl=C3=A8te', 'interwiki-listecomplete', 'Liste compl=C3=A8te des =
Wikip=C3=A9dias');=0A=
}=0A=
addOnloadHook(mainPageTransform);=0A=
=0A=
/**=0A=
* Cache cadres de l'accueil=0A=
*=0A=
* Ajoute un lien sur la page d'accueil pour cacher facilement les cadres=0A=
* M=C3=A9moris=C3=A9 par cookie.=0A=
* Copyright 2007, fr:user:Plyd et fr:User:IAlex. Licence GFDL et GPL.=0A=
*/=0A=
var cookieCacheCadresName =3D "cacheCadresAccueil";=0A=
var CacheCadresVal =3D {};=0A=
var totalCadresAccueil =3D 0;=0A=
=0A=
function affCadreAccueil(id) {=0A=
visible =3D CacheCadresVal[id] =3D (!CacheCadresVal[id]);=0A=
getElementsByClass('accueil_contenu',null,'div')[id].style.display =3D =
visible ? 'block' : 'none';=0A=
document.getElementById('CacheCadreAccueil' + id).innerHTML =3D =
visible ? 'masquer' : 'afficher';=0A=
sauverCookieAccueil();=0A=
}=0A=
=0A=
function sauverCookieAccueil() {=0A=
var date =3D new Date();=0A=
date.setTime(date.getTime() + 30*86400*1000);=0A=
var val =3D 0;=0A=
for ( var i=3D0; i< totalCadresAccueil ; i++ ) {=0A=
if (!CacheCadresVal[i]) val =3D val | Math.pow(2,i);=0A=
}=0A=
document.cookie =3D cookieCacheCadresName + "=3D" + val + "; =
expires=3D"+date.toGMTString() + "; path=3D/";=0A=
}=0A=
=0A=
function LiensCadresAccueil() {=0A=
if (wgPageName !=3D "Accueil") return;=0A=
cookieCadresAccueil =3D getCookieVal(cookieCacheCadresName);=0A=
for ( var i=3D0; i<5; i++) { =0A=
var titre =3D getElementsByClass('headergris',document,'h2')[i];=0A=
if (!titre) break;=0A=
titre.innerHTML +=3D " [masquer]";=0A=
CacheCadresVal[i] =3D true;=0A=
totalCadresAccueil++;=0A=
}=0A=
cookieCadresAccueil =3D getCookieVal(cookieCacheCadresName);=0A=
for ( var i=3D0; i< totalCadresAccueil ; i++ ) {=0A=
n =3DMath.pow(2,i);=0A=
aff =3D !(cookieCadresAccueil & n);=0A=
if (!aff) affCadreAccueil(i);=0A=
}=0A=
}=0A=
addOnloadHook(LiensCadresAccueil);=0A=
} // Fin du code concernant la page d'accueil=0A=
=0A=
=0A=
// ESPACE DE NOM 'SPECIAL'=0A=
if( wgNamespaceNumber =3D=3D -1 ) {=0A=
=0A=
/**=0A=
* Afficher une explication au nombre de caract=C3=A8res dans la liste =
de suivi=0A=
*/=0A=
function toolTipPlusMinus() {=0A=
if(wgCanonicalSpecialPageName !=3D "Watchlist") return=0A=
var tt =3D "Nombre de caract=C3=A8res d'=C3=A9cart entre les deux =
derni=C3=A8res versions de la page";=0A=
var elmts =3D document.getElementsByTagName("span");=0A=
for(var cpt =3D 0; cpt < elmts.length; cpt++) {=0A=
if (/mw-plusminus-(pos|neg|null)/.test(elmts[cpt].className) || =
/mw-plusminus-(pos|neg|null)/.test(elmts[cpt].getAttribute("class")))=0A=
elmts[cpt].title =3D tt;=0A=
}=0A=
}=0A=
addOnloadHook(toolTipPlusMinus);=0A=
=0A=
/**=0A=
* Modifie Special:Search pour pouvoir utiliser diff=C3=A9rents moteurs =
de recherche,=0A=
* disponibles dans une bo=C3=AEte d=C3=A9roulante.=0A=
* Auteurs : Jakob Voss, Guillaume, import=C3=A9 depuis la Wiki allemande=0A=
*
=0A=
*/=0A=
=0A=
function externalSearchEngines() {=0A=
if (typeof SpecialSearchEnhanced2Disabled !=3D 'undefined') return;=0A=
if (wgPageName !=3D "Special:Recherche") return;=0A=
=0A=
var mainNode;=0A=
if (document.forms["search"]) { =0A=
mainNode =3D document.forms["search"];=0A=
} else {=0A=
mainNode =3D document.getElementById("powersearch");=0A=
if (!mainNode) return;=0A=
var mainNode =3D mainNode.lastChild;=0A=
if (!mainNode) return;=0A=
=0A=
while(mainNode.nodeType =3D=3D 3) {=0A=
mainNode =3D mainNode.previousSibling;=0A=
}=0A=
}=0A=
=0A=
var firstEngine =3D "mediawiki";=0A=
=0A=
var choices =3D document.createElement("div");=0A=
choices.setAttribute("id","searchengineChoices");=0A=
choices.style.textAlign =3D "center";=0A=
=0A=
var lsearchbox =3D document.getElementById("powerSearchText");=0A=
var initValue =3D lsearchbox.value;=0A=
=0A=
var space =3D "";=0A=
=0A=
for (var id in searchEngines) {=0A=
var engine =3D searchEngines[id];=0A=
if(engine.ShortName)=0A=
{=0A=
if (space) choices.appendChild(space);=0A=
space =3D document.createTextNode(" ");=0A=
=0A=
var attr =3D { =0A=
type: "radio", =0A=
name: "searchengineselect",=0A=
value: id,=0A=
onFocus: "changeSearchEngine(this.value)",=0A=
id: "searchengineRadio-"+id=0A=
};=0A=
=0A=
var html =3D "";=0A=
var span =3D document.createElement("span");=0A=
span.innerHTML =3D html;=0A=
=0A=
choices.appendChild( span );=0A=
var label =3D document.createElement("label");=0A=
label.htmlFor =3D "searchengineRadio-"+id;=0A=
=0A=
label.appendChild( document.createTextNode( engine.ShortName ) );=0A=
choices.appendChild( label );=0A=
}=0A=
}=0A=
mainNode.appendChild(choices);=0A=
=0A=
var input =3D document.createElement("input");=0A=
input.id =3D "searchengineextraparam";=0A=
input.type =3D "hidden";=0A=
=0A=
mainNode.appendChild(input);=0A=
=0A=
changeSearchEngine(firstEngine, initValue);=0A=
}=0A=
=0A=
function changeSearchEngine(selectedId, searchTerms) {=0A=
=0A=
var currentId =3D =
document.getElementById("searchengineChoices").currentChoice;=0A=
if (selectedId =3D=3D currentId) return;=0A=
=0A=
document.getElementById("searchengineChoices").currentChoice =3D =
selectedId;=0A=
var radio =3D document.getElementById('searchengineRadio-' + =
selectedId);=0A=
radio.checked =3D "checked";=0A=
=0A=
var engine =3D searchEngines[selectedId];=0A=
var p =3D engine.Template.indexOf('?');=0A=
var params =3D engine.Template.substr(p+1);=0A=
=0A=
var form;=0A=
if (document.forms["search"]) {=0A=
form =3D document.forms["search"];=0A=
} else {=0A=
form =3D document.getElementById("powersearch");=0A=
}=0A=
form.setAttribute("action", engine.Template.substr(0,p));=0A=
=0A=
var l =3D ("" + params).split("&");=0A=
for (var i in l) {=0A=
var p =3D l[i].split("=3D");=0A=
var pValue =3D p[1];=0A=
=0A=
if (pValue =3D=3D "{language}") {=0A=
} else if (pValue =3D=3D "{searchTerms}") {=0A=
var input;=0A=
if (document.forms["search"]) {=0A=
input =3D document.getElementById("searchText");=0A=
} else {=0A=
input =3D document.getElementById("powerSearchText");=0A=
} =0A=
=0A=
input.name =3D p[0];=0A=
} else {=0A=
var input =3D document.getElementById("searchengineextraparam");=0A=
=0A=
input.name =3D p[0];=0A=
input.value =3D pValue;=0A=
}=0A=
}=0A=
}=0A=
if (wgPageName =3D=3D "Special:Recherche") {=0A=
var searchEngines =3D {=0A=
mediawiki: {=0A=
ShortName: "Recherche interne",=0A=
Template: "/w/index.php?search=3D{searchTerms}"=0A=
},=0A=
exalead: {=0A=
ShortName: "Exalead",=0A=
Template: =
"http://www.exalead.com/wikipedia/results?q=3D{searchTerms}&language=3Dfr=
"=0A=
},=0A=
google: {=0A=
ShortName: "Google",=0A=
Template: =
"http://www.google.fr/search?as_sitesearch=3Dfr.wikipedia.org&hl=3D{langu=
age}&q=3D{searchTerms}"=0A=
},=0A=
wikiwix: {=0A=
ShortName: "Wikiwix",=0A=
Template: =
"http://fr.wikiwix.com/index.php?action=3D{searchTerms}&lang=3D{language}=
"=0A=
},=0A=
=0A=
wlive: {=0A=
ShortName: "Windows Live",=0A=
Template: =
"http://search.live.com/results.aspx?q=3D{searchTerms}&q1=3Dsite:http://f=
r.wikipedia.org"=0A=
},=0A=
yahoo: {=0A=
ShortName: "Yahoo!",=0A=
Template: =
"http://fr.search.yahoo.com/search?p=3D{searchTerms}&vs=3Dfr.wikipedia.or=
g"=0A=
},=0A=
globalwpsearch: {=0A=
ShortName: "Global WP",=0A=
Template: =
"http://vs.aka-online.de/cgi-bin/globalwpsearch.pl?timeout=3D120&search=3D=
{searchTerms}"=0A=
}=0A=
};=0A=
addOnloadHook(externalSearchEngines);=0A=
}=0A=
=0A=
} // Fin du code concernant l'espace de nom 'Special'=0A=
=0A=
=0A=
// ESPACE DE NOM 'UTILISATEUR'=0A=
if( wgNamespaceNumber =3D=3D 2 ) {=0A=
=0A=
/* En phase de test */=0A=
/* D=C3=89BUT DU CODE JAVASCRIPT DE "CADRE =C3=80 ONGLETS"=0A=
Fonctionnement du [[Mod=C3=A8le:Cadre =C3=A0 onglets]]=0A=
Mod=C3=A8le implant=C3=A9 par User:Peleguer de =
http://ca.wikipedia.org=0A=
Actualis=C3=A9 par User:Joanjoc de http://ca.wikipedia.org=0A=
Traduction et adaptation User:Antaya de http://fr.wikipedia.org=0A=
*/=0A=
function CadreOngletInit(){=0A=
// retour si ailleurs que sur l'espace utilisateur, =0A=
// sachant que c'est une horreur au niveau de l'accessibilit=C3=A9=0A=
// et qu'il est impossible de "r=C3=A9cup=C3=A9rer" ou de recycler ce =
script=0A=
// (celui-ci fonctionnant par inclusion de sous pages)=0A=
if (wgCanonicalNamespace !=3D 'User') return; =0A=
var i=3D0 =0A=
for (i=3D0;i<=3D9;i++){=0A=
var vMb =3D document.getElementById("mb"+i);=0A=
if (!vMb) break;=0A=
=0A=
var j=3D1 =0A=
var vOgIni =3D 0 =0A=
for (j=3D1;j<=3D9;j++){=0A=
var vBt =3D document.getElementById("mb"+i+"bt"+j);=0A=
if (!vBt) break;=0A=
vBt.onclick =3D CadreOngletVoirOnglet; =0A=
if (vBt.className=3D=3D"mbBoutonSel") vOgIni=3Dj; =0A=
}=0A=
=0A=
if (vOgIni =3D=3D 0) { =0A=
vOgIni =3D 1+Math.floor((j-1)*Math.random()) ;=0A=
document.getElementById("mb"+i+"og"+vOgIni).style.display =3D =
"block";=0A=
document.getElementById("mb"+i+"og"+vOgIni).style.visibility =
=3D "visible";=0A=
=
document.getElementById("mb"+i+"bt"+vOgIni).className=3D"mbBoutonSel";=0A=
} =0A=
}=0A=
}=0A=
=0A=
function CadreOngletVoirOnglet(){=0A=
var vMbNom =3D this.id.substr(0,3); =0A=
var vIndex =3D this.id.substr(5,1); =0A=
=0A=
var i=3D1=0A=
for (i=3D1;i<=3D9;i++){ =0A=
var vOgElem =3D document.getElementById(vMbNom+"og"+i);=0A=
if (!vOgElem) break;=0A=
if (vIndex=3D=3Di){ =0A=
vOgElem.style.display =3D "block";=0A=
vOgElem.style.visibility =3D "visible";=0A=
=
document.getElementById(vMbNom+"bt"+i).className=3D"mbBoutonSel";=0A=
} else { =0A=
vOgElem.style.display =3D "none";=0A=
vOgElem.style.visibility =3D "hidden";=0A=
=
document.getElementById(vMbNom+"bt"+i).className=3D"mbBouton";=0A=
}=0A=
}=0A=
return false; =0A=
}=0A=
addOnloadHook(CadreOngletInit);=0A=
/*FIN DU CODE JAVASCRIPT DE "CADRE =C3=80 ONGLETS"*/=0A=
} // Fin du code concernant l'espace de nom 'Utilisateur'=0A=
=0A=
=0A=
// ESPACE DE NOM 'R=C3=89F=C3=89RENCE'=0A=
if( wgNamespaceNumber =3D=3D 104 ) {=0A=
=0A=
/*=0A=
* Choix du mode d'affichage des r=C3=A9f=C3=A9rences=0A=
* Devraient en principe se trouver c=C3=B4t=C3=A9 serveur=0A=
* @note L'ordre de cette liste doit correspondre a celui de =
Mod=C3=A8le:=C3=89dition !=0A=
*/=0A=
=0A=
function addBibSubsetMenu() {=0A=
var specialBib =3D document.getElementById('specialBib');=0A=
if (!specialBib) return;=0A=
=0A=
specialBib.style.display =3D 'block';=0A=
menu =3D '';=0A=
specialBib.innerHTML =3D specialBib.innerHTML + menu;=0A=
=0A=
/* default subset - try to use a cookie some day */=0A=
chooseBibSubset(0);=0A=
}=0A=
=0A=
// select subsection of special characters=0A=
function chooseBibSubset(s) {=0A=
var l =3D document.getElementsByTagName('div');=0A=
for (var i =3D 0; i < l.length ; i++) {=0A=
if(l[i].className =3D=3D 'BibList') l[i].style.display =3D s =
=3D=3D 0 ? 'block' : 'none';=0A=
else if(l[i].className =3D=3D 'WikiNorme') l[i].style.display =3D s =
=3D=3D 1 ? 'block' : 'none';=0A=
else if(l[i].className =3D=3D 'BibTeX') l[i].style.display =3D s =
=3D=3D 2 ? 'block' : 'none';=0A=
else if(l[i].className =3D=3D 'ISBD') l[i].style.display =3D s =
=3D=3D 3 ? 'block' : 'none';=0A=
else if(l[i].className =3D=3D 'ISO690') l[i].style.display =3D s =
=3D=3D 4 ? 'block' : 'none';=0A=
}=0A=
}=0A=
addOnloadHook(addBibSubsetMenu);=0A=
} // Fin du code concernant l'espace de nom 'R=C3=A9f=C3=A9rence'=0A=
=0A=
if(!Array.indexOf){=0A=
Array.prototype.indexOf =3D function(obj){=0A=
for(var i=3D0; i