function Fermer() {
	opener = window.self;
	window.self.close();
}

function windowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  var Size = Array();
  Size[0] = myWidth;
  Size[1] = myHeight;
  return Size;
}

function thisMovie(movieName) {
	  // IE and Netscape refer to the movie object differently.
	  // This function returns the appropriate syntax depending on the browser.
	  if (navigator.appName.indexOf ("Microsoft") !=-1) {
	    return window[movieName]
	  } else {
	    return document[movieName]
	  }
}

function entree() {
	var Size = Array();
	Size = windowSize();
	if (window.screen.height - Size[1] <35) {
		document.location.href = 'index2.htm?';
	}

}

function fullscreen(lien) {
	var Size = Array();
	Size = windowSize();
	if (window.screen.height - Size[1] >35) {
		Fermer();
		window.open('/index2.htm?url='+lien,'','left=0,top=0,fullscreen=yes,toolbar=0,location=0,directories=0,status=0');
	} else {
		document.location.href = '/index2.htm?url='+lien;
	}
}

function getQueryVariable(variable) {
  var query = top.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
  return '';
  //alert('Query Variable ' + variable + ' not found');
}

function setmenu(id) {
	var Mgauche = new Array('accueil','bio','solo','contact','disco','pro','presse');
	var Mdroite = new Array('crea','sensi');
	var Mdroitecrea = new Array('crea','cyber','duo','triolaid','beat','mutin','sensi');
	var Mdroitesensi = new Array('crea','sensi','abrac','canaill','polart','enfant');
	var Mmaj = new Array('credits','liens');
	var Mmenu = new Array('interactif');
	var Dest = 'rien';
	var crea = new Array('cyber','duo','triolaid','beat','mutin');
	var sensi = new Array('abrac','canaill','polart','enfant');
	var Ssmenu = 'rien';
	var Ssmenudest = 'rien';
	
	for(j=0;j<crea.length;j++) {
		if(id == crea[j]) {
			Ssmenu = 'crea';
			Ssmenudest = 'droite';
		}
	}
	for(j=0;j<sensi.length;j++) {
		if(id == sensi[j]) {
			Ssmenu = 'sensi';
			Ssmenudest = 'droite';
		}
	}
	
	for(j=0;j<Mgauche.length;j++) {
		top.frames['gauche'].document.getElementById(Mgauche[j]).style.backgroundColor="transparent";
		if(id == Mgauche[j]) {
			Dest = 'gauche';
		}
	}
	if(Ssmenu == 'rien') {
		//top.frames['droite'].location = '/droite.htm';
		for(j=0;j<Mdroite.length;j++) {
			top.frames['droite'].document.getElementById(Mdroite[j]).style.backgroundColor="transparent";
			if(id == Mdroite[j]) {
				Dest = 'droite';
			}
		}
	}
	if(Ssmenu == 'crea') {	
		for(j=0;j<Mdroitecrea.length;j++) {
			top.frames['droite'].document.getElementById(Mdroitecrea[j]).style.backgroundColor="transparent";
			if(id == Mdroitecrea[j]) {
				Dest = 'droite';
			}
		}
	}
	if(Ssmenu == 'sensi') {
		for(j=0;j<Mdroitesensi.length;j++) {
			top.frames['droite'].document.getElementById(Mdroitesensi[j]).style.backgroundColor="transparent";
			if(id == Mdroitesensi[j]) {
				Dest = 'droite';
			}
		}
	}
	for(j=0;j<Mmaj.length;j++) {
		top.frames['bas'].document.getElementById(Mmaj[j]).style.backgroundColor="transparent";
		if(id == Mmaj[j]) {
			Dest = 'bas';
		}
	}
	for(j=0;j<Mmenu.length;j++) {
		top.frames['haut'].document.getElementById(Mmenu[j]).style.backgroundColor="transparent";
		if(id == Mmenu[j]) {
			Dest = 'haut';
		}
	}
	if(Dest != 'rien') {
		top.frames[Dest].document.getElementById(id).style.backgroundColor="FF9933";
	}
	if(Ssmenu != 'rien') {
		top.frames[Ssmenudest].document.getElementById(Ssmenu).style.backgroundColor="FF9933";
	}
	

}

function loadpage(id) {
	setmenu(id);
}
