// JavaScript Document
var hiddenlayers=Array();

function MM_displayStatusMsg(msgStr) { //v1.0
  	status=msgStr;
  	document.MM_returnValue = true;
}

function Launch(page, width, height, menu, scrollbars) {
	if (menu== "undefined") menu = "no";
	if (scrollbars== "undefined") scrollbars = "no";
	
	OpenWin = this.open(page, "_blank", "toolbar=no, menubar="+ menu +" ,location=no, scrollbars="+ scrollbars +", resizable=yes, width=" + width + ", height=" + height + ", top=" + (screen.height/2 - height/2) + ", left=" + (screen.width/2 - width/2) + "\""); 
}
function toggleLayer(whichLayer) {
	if (document.getElementById) {
// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
		
		hiddenlayers[whichLayer]=parseInt(document.getElementById(whichLayer).offsetHeight);
		totalheight=0;
		for (x in hiddenlayers)
		{
			totalheight+=hiddenlayers[x];
		}
		document.getElementById('div3_content').style.height=totalheight+520;
	}
	else if (document.all) {
// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
		parseInt(document.all[whichLayer].offsetHeight);
	}
	else if (document.layers) {
// this is the way nn4 works
	var style2 = document.layers[whichLayer].style;
	style2.display = style2.display? "":"block";
	}
}
function jstoflash(label,URL,textSousSect){
	var movie = window.document.movie
	movie.SetVariable("_root:textSousSect", textSousSect);
	movie.SetVariable("_root:jstoflash_b", URL);
	movie.TCallLabel("_level0.js_control_mc", label);
}

function getValue(varname){
  // First, we load the URL into a variable
  var url = window.location.href;

  // Next, split the url by the ?
  var qparts = url.split("?");

  // Check that there is a querystring, return "" if not
  if (qparts.length == 0)
  {
    return "";
  }

  // Then find the querystring, everything after the ?
  var query = qparts[1];

  // Split the query string into variables (separates by &s)
  var vars = query.split("&");

  // Initialize the value with "" as default
  var value = "";

  // Iterate through vars, checking each one for varname
  for (i=0;i<vars.length;i++)
  {
    // Split the variable by =, which splits name and value
    var parts = vars[i].split("=");
    
    // Check if the correct variable
    if (parts[0] == varname)
    {
      // Load value into variable
      value = parts[1];

      // End the loop
      break;
    }
  }
  
  // Convert escape code
  value = unescape(value);

  // Convert "+"s to " "s
  value.replace(/\+/g," ");

  // Return the value
  return value;
}
//function setsaison(saison) {
//	var movie = window.document.movie
//	var saison = getValue("id");
//	movie.SetVariable("_root:saison", saison);
//}

function makeSmallText() {   
//alert("small");
	divs = document.getElementById("maincontent");
	document.getElementById("maincontent").className="mainfontclasssmall";	
  }
function makeNormalText() {   
	divs = document.getElementById("maincontent");
	document.getElementById("maincontent").className="mainfontclass";	
  }   
function makeBigText() {   
	divs = document.getElementById("maincontent");
	document.getElementById("maincontent").className="mainfontclassbig";	
  }     
  
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
 

function SendDataToFlashMovie()
{
     var flashMovie=getFlashMovieObject("movie");
     flashMovie.SetVariable("/:reinit", true);
}
/*function resizeText(multiplier) {   
  if (document.getElementById("maincontent").style.fontSize == "") {   
    document.getElementById("maincontent").style.fontSize = "1.0";   
  }   
  document.getElementById("maincontent").style.fontSize = parseFloat(document.getElementById("maincontent").style.fontSize) + (multiplier * 0.2) + "em";   
}*/

