1 [
<link rel=
"stylesheet" href=
"(#CHEMIN{css/slidernav.css})" type=
"text/css" media=
"projection, screen, tv" />]
2 [
<link rel=
"stylesheet" href=
"(#CHEMIN{css/style_maparaan.css}|direction_css)" type=
"text/css" media=
"projection, screen, tv" />]
4 <script type=
"text/javascript">
6 // author : erational
<http://www.erational.org
>
7 $(document).ready(function(){
8 $(
".formulaire_menu_lang").hide(); // on cache le menu_lang
10 $(
".cookie_lang").click( function() { // sur les liens qui possedent la classe cookie_lang, on pose le cookie de leur attribut rel.
11 var lang = $(this).attr(
"rel");
12 $(
".formulaire_menu_lang form option").removeAttr(
"selected");
13 $(
".formulaire_menu_lang form option[@value='"+lang+
"']").attr(
"selected",
"selected");
14 $(
".formulaire_menu_lang form").submit();
21 <script type=
"text/javascript">
23 // JavaScript Document
24 /* Smooth scrolling */
27 fixAllLinks: function() {
28 // Get a list of all links in the page
29 var allLinks = document.getElementsByTagName('a');
30 // Walk through the list
31 for (var i=
0;i
<allLinks.length;i++) {
32 var lnk = allLinks[i];
33 if ((lnk.href && lnk.href.indexOf('#') != -
1) &&
34 ( (lnk.pathname == location.pathname) ||
35 ('/'+lnk.pathname == location.pathname) ) &&
36 (lnk.search == location.search)) {
37 // If the link is internal to the page (begins in #)
38 // then attach the smoothScroll function as an onclick
40 ss.addEvent(lnk,'click',ss.smoothScroll);
45 smoothScroll: function(e) {
46 // This is an event handler; get the clicked on element,
47 // in a cross-browser fashion
49 target = window.event.srcElement;
54 // Make sure that the target is an element, not a text node
56 if (target.nodeName.toLowerCase() != 'a') {
57 target = target.parentNode;
60 // Paranoia; check this is an A tag
61 if (target.nodeName.toLowerCase() != 'a') return;
63 // Find the
<a name
> tag corresponding to this href
64 // First strip off the hash (first character)
65 anchor = target.hash.substr(
1);
66 // Now loop all A tags until we find one with that name
67 var allLinks = document.getElementsByTagName('a');
68 var destinationLink = null;
69 for (var i=
0;i
<allLinks.length;i++) {
70 var lnk = allLinks[i];
71 if (lnk.name && (lnk.name == anchor)) {
72 destinationLink = lnk;
77 // If we didn't find a destination, give up and let the browser do
79 if (!destinationLink) return true;
81 // Find the destination's position
82 var destx = destinationLink.offsetLeft;
83 var desty = destinationLink.offsetTop;
84 var thisNode = destinationLink;
85 while (thisNode.offsetParent &&
86 (thisNode.offsetParent != document.body)) {
87 thisNode = thisNode.offsetParent;
88 destx += thisNode.offsetLeft;
89 desty += thisNode.offsetTop;
92 // Stop any current scrolling
93 clearInterval(ss.INTERVAL);
95 cypos = ss.getCurrentYPos();
97 ss_stepsize = parseInt((desty-cypos)/ss.STEPS);
99 setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',
"'+anchor+'")',
10);
101 // And stop the actual click happening
103 window.event.cancelBubble = true;
104 window.event.returnValue = false;
106 if (e && e.preventDefault && e.stopPropagation) {
112 scrollWindow: function(scramount,dest,anchor) {
113 wascypos = ss.getCurrentYPos();
114 isAbove = (wascypos < dest);
115 window.scrollTo(
0,wascypos + scramount);
116 iscypos = ss.getCurrentYPos();
117 isAboveNow = (iscypos < dest);
118 if ((isAbove != isAboveNow) || (wascypos == iscypos)) {
119 // if we've just scrolled past the destination, or
120 // we haven't moved from the last scroll (i.e., we're at the
121 // bottom of the page) then scroll exactly to the link
122 window.scrollTo(
0,dest);
123 // cancel the repeating timer
124 clearInterval(ss.INTERVAL);
125 // and jump to the link directly so the URL's right
126 location.hash = anchor;
130 getCurrentYPos: function() {
131 if (document.body && document.body.scrollTop)
132 return document.body.scrollTop;
133 if (document.documentElement && document.documentElement.scrollTop)
134 return document.documentElement.scrollTop;
135 if (window.pageYOffset)
136 return window.pageYOffset;
140 addEvent: function(elm, evType, fn, useCapture) {
141 // addEvent and removeEvent
142 // cross-browser event handling for IE5+, NS6 and Mozilla
144 if (elm.addEventListener){
145 elm.addEventListener(evType, fn, useCapture);
147 } else if (elm.attachEvent){
148 var r = elm.attachEvent(
"on"+evType, fn);
151 alert(
"Handler could not be removed");
158 ss.addEvent(window,
"load",ss.fixAllLinks);