function formButtonFever(formName,action){
	var myString = "document."+formName+"."+action+"();";
	eval(myString);
	}
	
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 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 MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && (typeof IM_Mnu_D != 'undefined') && (typeof IM_Mnu_Do != 'undefined')) {MM_nbGroup('over',IM_Mnu_D,IM_Mnu_Do,'',1)}
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img; } 
		}
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
      if ((typeof IM_Mnu_D != 'undefined') && (typeof IM_Mnu_Do != 'undefined')) {MM_nbGroup('over',IM_Mnu_D,IM_Mnu_Do,'',1)}
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function tmt_DivAlign(theDiv,h,v,hPx,vPx){
	var obj,fun,dw,dh,lw,lh,x,y;
	fun = (document.getElementById) ? "document.getElementById" : "MM_findObj";
	obj = (document.getElementById) ? document.getElementById(theDiv) : MM_findObj(theDiv);
	obj.click();
	if(obj){if(document.all){
	dw = document.body.clientWidth;dh = document.body.clientHeight;}
	else{dw = innerWidth;dh = innerHeight;}
	if(document.layers){lw = obj.clip.width;lh = obj.clip.height;}else{
	lw = obj.style.width.replace("px","");lh = obj.style.height.replace("px","");}
	x = (document.layers) ? ".left" : ".style.left";
	y = (document.layers) ? ".top" : ".style.top";
	if(h == "l"){eval(fun+"('"+theDiv+"')"+x+"="+hPx);}
	if(h == "c"){eval(fun+"('"+theDiv+"')"+x+"="+dw+"/2-"+lw+"/2");}
	if(h == "r"){eval(fun+"('"+theDiv+"')"+x+"="+dw+"-"+lw+"-"+hPx);}
	if(v == "t"){eval(fun+"('"+theDiv+"')"+y+"="+vPx);}
	if(v == "m"){eval(fun+"('"+theDiv+"')"+y+"="+dh+"/2-"+lh+"/2");}
	if(v == "b"){eval(fun+"('"+theDiv+"')"+y+"="+dh+"-"+lh+"+"+vPx);}}
	obj.click();
}


//
// Monitor scrolling in the web page, by setting a ScrollSpy
// Version 0.9.2
// By Willem Broekema, <willem@pastelhorn.com>
//
// More info and latest release:
// <http://pastelhorn.com/project/js/scrollspy>
//
// Licensed under the GNU LGPL
// <http://www.gnu.org/copyleft/lesser.html>
//
//// if you want to strip the comments, please keep the lines above /////
//
// License:
//
//  This script is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//
//  See <http://www.gnu.org/copyleft/lesser.html> for the license.
//
//
//
// Inspired by:
//
//   "Drifting Layers:  Keeping Important Elements Visible"
//   -- Michael Bostock
//      http://developer.netscape.com/docs/technote/dynhtml/drift/
//
// History:
//
//  version 0.9.3, November 4, 2002
//   - Added fix for IE4/MacOS (thanks Jeroen Visser)
//
//  January 24, 2002
//   - Licensed under the LGPL (it had no license)
//
//  version 0.9.2, November 12, 2001
//   - Added "document.documentElement.scrollTop", used by IE 6.
//     (thanks Peter Zagler)
//
//  version 0.9.1, January 13, 2001:
//   -  Added conditional code for Opera to work around
//      "Anchor - setInterval bug"
//      (see <http://pastelhorn.com/project/js/scrollspy/operabug>).
//
//  version 0.9.0 -- January 5, 2000:
//   - First release.
//


// Part of browser detection script copied from 
// http://developer.netscape.com/docs/examples/javascript/browser_type.html
//
// This following Opera detection code is used to work around the
// "Anchor - setInterval" bug in (at least) Opera 5 
// -- see <http://pastelhorn.com/project/js/scrollspy/operabug>

var agt = navigator.userAgent.toLowerCase();
var isOperaSpy = (agt.indexOf("opera") != -1) ? 1 : 0;

/// the following browser detection code is not currently used, but
/// appears to be working:
//
// var isNav4Spy = (document.layers && !isOperaSpy) ? 1 : 0;
// var isIE4Spy  = (document.all && !isOperaSpy) ? 1 : 0;
// var isMozSpy  = (document.getElementById && !(isNav4Spy || isIE4Spy || isOperaSpy)) ? 1 : 0;
// var isOpera5IE5Spy = (document.all && (window.pageYOffset || window.pageYOffset == 0) ) ? 1 : 0;
//
// window.alert('op: ' + isOperaSpy + '; nav4: ' + isNav4Spy + '; isIE4: ' + isIE4Spy + '; moz: ' + isMozSpy + '; O5IE5: ' + isOpera5IE5Spy);

//
/// If (isMozSpy == 1), assume it's one of:
///  - Mozilla;
///  - Opera 5, set to be identified as 'Mozilla X',
///    with X one of (5.0; 4.76; 3.0).
//
/// If (isOpera5IE5Spy == 1), then assume browser is Opera set to
/// identify as 'MSIE 5' although it does not support all properties of it
//



function scrollSpy(theFunction) {

//
// First, set window.RANDOMNAME to this Spy object, so the outside world
// can refer to it.
//
// Although ugly, it's needed, if we want "setInterval()" to apply a method
// on our object:  when using "setInterval("this...", ..)", the
// "this" will refer to the window, because that's the object running
// the function "setInterval".
//
// Another solution would be, passing the object's name as parameter to
// the constructor:
//
//   S = new scrollSpy('S', func)
//
// and use the first parameter to build the "setInterval()" command line.
//

  var NameOfThisSpy = generateSpyInternalName();
  
  eval('window.' + NameOfThisSpy + ' = this;'); // window.RANDOMNAME = <this_spy>
  eval('this.name = "' + NameOfThisSpy + '";'); // <this_spy>.name = "RANDOMNAME"

  this.changeFunction = theFunction;
  this.intervalTime = 200;   // by default 200 milliseconds
  this.enabled = 0;
  this.monitor = monitorScrolling;

  this.getWindowYOffset = getWindowYOffsetSpy;
  this.prevWindowYOffset = 0;
  this.prevWindowHeight = 0;

 /// public interface:  

  this.start = startSpy;
  this.stop = stopSpy;
  this.isRunning = isRunningSpy;
  
  this.getIntervalTime = getIntervalTimeSpy;
  this.setIntervalTime = setIntervalTimeSpy;

 /////
}

function startSpy() {
  if (!this.enabled) { // not already running?

    var cmdstring = 'window.' + this.name + '.monitor()';
    
    if (!isOperaSpy)
      this.interval = window.setInterval( cmdstring, this.intervalTime );
    else // work around bug
      this.interval = window.setTimeout( cmdstring, this.intervalTime );

    this.enabled = 1;
  }
}

function stopSpy() {
  if (this.enabled) { // really running?
    window.clearInterval(this.interval);
    this.enabled = 0;
  }
}

function isRunningSpy() {
  return this.enabled;
}

    

function getIntervalTimeSpy() {
  return this.intervalTime;
}

function setIntervalTimeSpy(newValue) {
  var wasRunning = (this.enabled) ? 1 : 0;
  this.stop();
  this.intervalTime = newValue;
  if (wasRunning)
    this.start();
}

function getWindowHeightSpy() {
  if(document.all){
	return document.body.clientHeight;}
	else{
	return innerHeight;}
}
	

function getWindowYOffsetSpy() {
  
  if ( window.pageYOffset || window.pageYOffset == 0 )
    return window.pageYOffset;

  if ( document.body ) {
    if ( document.body.scrollTop || document.body.scrollTop == 0 ) {

      if ( document.documentElement && document.documentElement.scrollTop ) {
          // IE 6 uses document.documentElement.scrollTop instead of
          // document.body.scrollTop. Has to do with viewpoints -
          // see some w3 spec ;-)
          return document.body.scrollTop + document.documentElement.scrollTop;
      } else {
        return document.body.scrollTop;
      }
    }
  }
}
  
function monitorScrolling() {
  var newWinYOffset = getWindowYOffsetSpy();
  var newWinHeight = getWindowHeightSpy();
  var Scrolled = (newWinYOffset != this.prevWindowYOffset);
  var Changed = (newWinHeight != this.prevWindowHeight);

  this.prevWindowYOffset = newWinYOffset;
  this.prevWindowHeight = newWinHeight;

  if (Scrolled || Changed) {
    //alert('ok'+this.prevWindowYOffset+'+'+newWinYOffset);
    eval( 'this.changeFunction(' + newWinYOffset + ')' );
}

  if (isOperaSpy) {  // work around bug
    var cmdstring = 'window.' + this.name + '.monitor()';
    this.interval = window.setTimeout( cmdstring, this.intervalTime);
  } 
}

function generateSpyInternalName() {
  var now = new Date();
  var rand = Math.floor(  1000000 * Math.random(now.getTime())  );
  return ('spy' + rand + 's');
}

function update(scrollPos) {
  tmt_DivAlign('Langue','l','b','0',scrollPos);
}

var S;
  
function initSpy() {  
  S = new scrollSpy(update);
  S.start();
}