var mavar="asdf"
//
function OuvreTestSW(lepath){
	lepath = "http://www.eps.mcgill.ca/mars/" + lepath;
	//alert(lepath);
	FenMars = window.open(lepath,'Mars','resizable=yes,scrollbars="yes",status="yes",toolbar="no",width=700,height=550');
}
////
function OuvreFenSW(lepath){
	//lepath = "http://www.eps.mcgill.ca/mars/" + lepath;
	//alert(lepath);
	FenMars = window.open(lepath,'Mars','resizable=yes,scrollbars="yes",status="yes",toolbar="no",width=700,height=550');
}
//
function fermetexteMarsf()
{
	chaine = "<PRE> <br><br> <br><br>"
	chaine += "<b>Contenu de la recherche : </b><br>Pierre Hudon PhD, NASA (Jonhson Space Center, Houston)<br> <br>"
	chaine += "<br>"
	chaine += "<b>Sc&eacute;narisation : </b><br>Pierre Hamon, Les Productions &Ocirc; Marius<br> <br>"
	chaine += "<br>"
	chaine += "<b>Charge de projet : </b><br>Luc Bienvenue, <a href=\"http://www.bw.qc.ca\" target=\"fenBW\">Bienvenue Welcome multim&eacute;dia</a><br> <br>"
	chaine += "<br>"
	chaine += "<b>R&eacute;alisation et programmation : </b><br>Bienvenue Welcome design multim&eacute;dia Inc.<br><u><a href=\"http://www.bw.qc.ca\" target=\"fenBW\">http://www.bw.qc.ca</a></u>"
	chaine += "<br> <br>"
	chaine += "&copy; 2000-2002 Toutes reproductions interdites sans notre permission (merci!)<br> <br>"
	chaine += "<br><i>Courriel :</i> <a href=\"mailto:destination-mars@bw.qc.ca\">destination-mars@bw.qc.ca</a><br> <br>"
	chaine += "<br> <br>"
	chaine += "Derni&egrave;re modification de cette page : " + dernieremodif()
	chaine += "</H5><br><br>"
	document.write(chaine)
}
//
function fermetexteMarsa()
{
	chaine = "<PRE> <br><br> <br><br>"
	chaine += "<b>Research content : </b><br>Pierre Hudon PhD, NASA (Jonhson Space Center, Houston)<br> <br>"
	chaine += "<br>"
	chaine += "<b>Screenplay : </b><br>Pierre Hamon, Les Productions &Ocirc; Marius<br> <br>"
	chaine += "<br>"
	chaine += "<b>Project managing : </b><br>Luc Bienvenue, <a href=\"http://www.bw.qc.ca\" target=\"fenBW\">Bienvenue Welcome multim&eacute;dia</a><br> <br>"
	chaine += "<br>"
	chaine += "<b>Programming : </b><br>Bienvenue Welcome design multim&eacute;dia Inc.<br><u><a href=\"http://www.bw.qc.ca\" target=\"fenBW\">http://www.bw.qc.ca</a></u>"
	chaine += "<br> <br>"
	chaine += "&copy; 2000-2002 All rights reserved<br> <br>"
	chaine += "<br><i>Email :</i> <a href=\"mailto:destination-mars@bw.qc.ca\">destination-mars@bw.qc.ca</a><br> <br>"
	chaine += "<br> <br>"
	chaine += "Last modified : " + dernieremodif()
	chaine += "</H5><br><br>"
	document.write(chaine)
}
//
function ouvretexteMarsf()
{
	//fonduecran(14,9,86,255,255,255,30);
}
//
function ouvretexteMarsa()
{
	//fonduecran(14,9,86,255,255,255,30);
}
//
function dernieremodif()
{ 
	upd =  new Date(document.lastModified);
	jour = upd.getDate();
	mois = upd.getMonth() + 1;
	an = upd.getFullYear();
	return jour + "/" + mois + "/" + an;
}
//
function afficheMartien(NomImage,LargHaut)
	{
		var nompage= "imgB/" + NomImage + ".html"
		var attributs = LargHaut + 'menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"'
		window.open(nompage,"GuidzMoutt",attributs)
	}
//

function afficheTest(NomImage,LargHaut)
	{
		var nompage= NomImage + ".html"
		var attributs = LargHaut + 'menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"'
		window.open(nompage,"Test",attributs)
	}
//

function afficheFlash(NomImage,LargHaut)
	{
		var nompage= "imgB/" + NomImage + ".html"
		var attributs = LargHaut + 'menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"'
		window.open(nompage,"Animation",attributs)
	}
//
function afficheJeu(NomJeu,LargHaut)
	{
		var nompage= "../jeux_Mars/" + NomJeu + "/index.html"
		var attributs = LargHaut + 'menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"'
		window.open(nompage,"Jeu",attributs)
	}
//
function afficheSavoir()
	{
    window.open('savoir.html', 'Savoir','width=400,height=400,scrollbars=yes')
	} 
//
function afficheGlossaire() 
	{
		var nompage= "../general/glossaire/index.html"
		var attributs = 'width=400,height=400,scrollbars=yes'
		window.open(nompage,"glossaire",attributs)
	} 
//
function afficheCredits(ancre)
	{
	var chaine= '../../credits.html#'+ ancre
    window.open(chaine, 'Savoir','width=400,height=60,scrollbars=yes')
	}
//
function resizeIndex()
{						
		top.resizeTo(660,450);
		top.moveTo(0,0);
}
//
function retour(lapage)
{
	var nompage= "../" + lapage + ".html";
	var attributs = 'width=650,height=500 menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"';
	top.location = nompage;
	//lafen = window.open(nompage,"Objectif_Mars",attributs);	
	//lafen.moveTo(40,40);
}
//
function afficheAccueil()
{
	var nompage= "introMars.html" 
	var attributs = 'width=650,height=500 menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"'
	//
	//	top.location="inter.html"
	//	top.resizeTo(700,500);
	//	top.moveTo(0,0);
	//
		lafen = window.open(nompage,"Objectif_Mars",attributs);	
		lafen.moveTo(40,40);
}
//----------- fonduecran ---//
function makearray(n) {
  this.length = n;
  for(var i = 1; i <= n; i++)
    this[i] = 0;
  return this;
}
hexa = new makearray(16);
function fonduecran(drouge,dvert,dbleu,finrouge,finvert,finbleu,inc) {
  for(var i = 0; i < 10; i++)
    hexa[i] = i;
  	hexa[10]="a";
  	hexa[11]="b";
  	hexa[12]="c";
	hexa[13]="d";
  	hexa[14]="e";
  	hexa[15]="f";
  	for(var i = 0; i <= inc; i++) {
    	setbgColor(
    	Math.floor(drouge * ((inc-i)/inc) + finrouge * (i/inc)),
    	Math.floor(dvert * ((inc-i)/inc) + finvert * (i/inc)),
    	Math.floor(dbleu * ((inc-i)/inc) + finbleu * (i/inc)));
  	}
}
//
function hex(i) {
  if (i < 0)
    return "00";
  else if (i > 255)
    return "ff";
  else return "" + hexa[Math.floor(i/16)] + hexa[i%16];
}
//
function setbgColor(rouge, vert, bleu) {
  var hexr = hex(rouge), hexv = hex(vert), hexb = hex(bleu);
  document.bgColor = "#"+hexr+hexv+hexb;
}
