function envoi_courriel(nom,objet) { 
	var adresse_courriel = nom + "@mcq.org";
	location = "mailto:" + adresse_courriel + "?subject=" + objet + "&cc=webmestre@mcq.org";

 }

function PageVignette(leURL){
	largeur = "750";
	hauteur = "450";
	if (screen.availWidth > 900){
		largeur = "800";
		hauteur = "550";
	}
	
	mafen = window.open(leURL,"FenVignette","width="+largeur+",height="+hauteur+",menubar=yes,resizable,scrollbars,status=yes,toolbar=no");

	mafen.focus();

//	mafen.location = leURL

}



function PageRessources(leURL) {

	mafen = window.opener;

	mafen.focus();

	mafen.location = leURL;

}



//

function PageJeu(leURL){

	mafen = window.open("","FenJeu",'width=640,height=480 menubar="no",resizable="no",scrollbars="no",status="no",toolbar="no"');

	mafen.focus();

	mafen.location = leURL

}

//



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_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_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 MM_openBrWindow(theURL,winName,features) { //v2.0

    newContenu = window.open("",winName,features);

	newContenu.focus();

	newContenu.location = theURL

}

//



//



function EnteteRocNiveau1(){
	section = EnteteRocNiveau1.arguments[0];
	lalangue = EnteteRocNiveau1.arguments[1];
	pathsection = 'img_' + section + '/';
	lgspacer = lalangue=='fr'?"13":"59";
	chaine = '';
	function AfficheBtnNiv1(nbtn,altfr,alten){
		AltTxt = lalangue=='fr'?altfr:alten;
		ch = '';

		if (nbtn != 'vide') {

			ch += '<a href="' + nbtn + '.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'' + nbtn + '\',\'\',\'img_langue/bt_' + nbtn + '_on.gif\',1)">';
			ch += '<img name="' + nbtn + '" border="0" src="img_langue/bt_' + nbtn + '.gif" alt="' + AltTxt + '">';
			ch += '</a>';
			if (nbtn != 'courriel') { 
				ch += '<img src="img_langue/separation.gif">';
			}
		} else {
			ch += '<img name="' + nbtn + '" border="0" src="img_langue/bt_' + nbtn + '.gif" alt="' + AltTxt + '">';
			
		}		
		return(ch);
	}
	chainetemp = '<tr><td><br></td></tr>'
	//ph: exception pour le premier niveau, afin de recherche le bon fichier index

	var niveauAcces = "../../";

	

	switch(section){
		case "honneur":

		case "inscription":

		case "confirmation":

		case "identification":

		case "motpasseoublie":
			nombkgn = "bk_bleu";
			niveauAcces = "../";

			break;
		case "jadis" :
			nombkgn = "bk_jadis";

			

			niveauAcces = "../";

			break;
		case "carnetdejeu" :
			nombkgn = "bk_carnetdejeu";

		

			niveauAcces = "../";

			

			chainetemp = '';
			break;
		default :
			

			nombkgn = "bk_vert";
			niveauAcces = "../";

			

			break;
	}
	chaine += '<body bgcolor=#FFFFFF leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="black" vlink="#878787" background="img_langue/' + nombkgn + '.gif">';
	chaine += '<map name="Map2">';
	chaine += '<area shape="rect" coords="624,1,757,23" href="http://www.museevirtuel.ca" target="FRoc">';
	chaine += '</map>';
	chaine += '<map name="Map">';
	chaine += '<area shape="rect" coords="33,1,160,17" href="http://www.museevirtuel.ca" target="FRoc">';
	chaine += '</map>';
	chaine += '<table width="760" border="0" cellpadding="0" cellspacing="0">'
	chaine += '<tr>';
	chaine += '<td bgcolor="#000000">';

	

	// ph: modification pour les langues car le fichier le index anglais ne porte pas le meme nom..

	chaine += lalangue=='fr'?'<a href="' + niveauAcces + 'index.html">':'<a href="' + niveauAcces + 'index_eng.html">';
	AltTxt = lalangue=='fr'?"Roc au m&eacute;tal":"Rock'n metal";
	chaine += '<img src="img_langue/t_rocaumetal.gif" border="0" alt="' + AltTxt + '">';
	chaine += '</a>';
	
	chaine += AfficheBtnNiv1("carnetgeologue","Vers la page Carnet","Notebook");

	chaine += AfficheBtnNiv1("plan","Vers la page Plan de site","Map");

	chaine += AfficheBtnNiv1("glossaire","Vers la page Glossaire","Glossary");

	chaine += AfficheBtnNiv1("jadis","Vers la page Jadis","Formerly");

	chaine += AfficheBtnNiv1("references","Vers la page R&eacute;f&eacute;rences","References");

	chaine += AfficheBtnNiv1("liens","Vers la page Liens","Links");

	chaine += AfficheBtnNiv1("credits","Vers la page Cr&eacute;dits","Credits");

	chaine += AfficheBtnNiv1("courriel","Vers la page Courriel","E-mail");

	
	//chaine += AfficheBtnNiv1("echange","Vers la page &Eacute;change","Exchanges");
	chaine += AfficheBtnNiv1("vide","","");	
	
	chaine += '<img src="img_langue/spacer.gif" width="' + lgspacer + '" height="20">';
	
	AltTxt = lalangue=='fr'?'Vers le site du Mus&eacute;e virtuel du Canada':'To the Virtual Museum of Canada';
	//IL FAUT LE  bande_mvc.jpg  et non le gif dans cette fonction
	chaine += '<img src="img_langue/bande_mvc.jpg" border="0" usemap="#Map" alt="' + AltTxt + '">';
	chaine += '</td>';
	chaine += '</tr>';
	chaine += '<tr>';
	chaine += '<td>';
	AltTxt = lalangue=='fr'?EnteteRocNiveau1.arguments[2]:EnteteRocNiveau1.arguments[3];
	chaine += '<img src="img_langue/t_' + section + '.jpg" border="0" alt="' + AltTxt + '" usemap="#Map2">';
	chaine += '</td>';
	chaine += '</tr>';
	chaine += chainetemp; //vide si carnet du g»ologue
	chaine += '</table>';
	document.write(chaine);
}
//
function EnteteRoc(){
	pathsection = 'img_' + EnteteRoc.arguments[0] + '/';
	lgspacer = EnteteRoc.arguments[2]=='fr'?"94":"115";
	chaine = '';
	//ph modification recuperer la langue courrante.

	lalangue = EnteteRoc.arguments[2];

	

	function AfficheBtn(nbtn,altfr,alten){
		AltTxt = EnteteRoc.arguments[2]=='fr'?altfr:alten;
		ch = '';
		
		
		if (nbtn != 'vide') {

			ch += '<a href="../' + nbtn + '.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'' + nbtn + '\',\'\',\'../img_langue/bt_' + nbtn + '_on.gif\',1)">';
			ch += '<img name="' + nbtn + '" border="0" src="../img_langue/bt_' + nbtn + '.gif" alt="' + AltTxt + '">';
			ch += '</a>';
			if (nbtn != 'courriel') { 
				ch += '<img src="../img_langue/separation.gif">';
			}
		} else {
			ch += '<img name="' + nbtn + '" border="0" src="../img_langue/bt_' + nbtn + '.gif" alt="' + AltTxt + '">';

		}	
		
		return(ch);
	}
	
	
	function AfficheInterface(noimg,altfr,alten){
		AltTxt = EnteteRoc.arguments[2]=='fr'?altfr:alten;
		ch = '<img src="' + pathsection + EnteteRoc.arguments[1] + '_' + noimg + '.jpg" border="0" alt="' + AltTxt + '">';

		ch += '';
		ch += '';
		return(ch);
	}
	chaine += '<body bgcolor=#FFFFFF leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="black" vlink="#878787" background="' + pathsection + 'background.gif">';
	chaine += '<map name="Map2">';
	chaine += '<area shape="rect" coords="55,0,200,19" href="http://www.museevirtuel.ca" target="FRoc">';
	chaine += '</map>';
	chaine += '<map name="Map">';
	chaine += '<area shape="rect" coords="2,2,84,19" href="http://www.museevirtuel.ca" target="FRoc">';
	chaine += '</map>';
	chaine += '<table width="760" border="0" cellpadding="0" cellspacing="0">'
	chaine += '<tr>';
	chaine += '<td bgcolor="#000000">';
	chaine += lalangue == "fr"?'<a href="../../index.html">':'<a href="../../index_eng.html">';
	chaine += AfficheInterface("1","Roc au m&eacute;tal","Rock'n metal");
	chaine += '</a>';

	
	chaine += AfficheBtn("carnetgeologue","Vers la page Carnet","Notebook");	chaine += AfficheBtn("plan","Vers la page Plan de site","Map");

	chaine += AfficheBtn("glossaire","Vers la page Glossaire","Glossary");

	chaine += AfficheBtn("jadis","Vers la page Jadis","Formerly");

	chaine += AfficheBtn("references","Vers la page R&eacute;f&eacute;rences","References");
	
	chaine += AfficheBtn("liens","Vers la page Liens","Links");

	chaine += AfficheBtn("credits","Vers la page Cr&eacute;dits","Credits");

	chaine += AfficheBtn("courriel","Vers la page Courriel","E-mail");

	//chaine += AfficheBtn("echange","Vers la page &Eacute;change","Exchanges");
	chaine += AfficheBtn("vide","","");	
	
	
	chaine += '<img src="' + pathsection + 'spacer.gif" width=' + lgspacer + ' height="20">';
	AltTxt = EnteteRoc.arguments[2]=='fr'?'Vers le site du Mus&eacute;e virtuel du Canada':'To the Virtual Museum of Canada';
	chaine += '<img src="' + pathsection + 'bande_mvc.gif" width="90" height="20" border="0" usemap="#Map" alt="' + AltTxt + '">';
	chaine += '</td>';
	chaine += '</tr>';
	chaine += '<tr>';
	chaine += '<td>';
	chaine += AfficheInterface("2","Roc au m&eacute;tal","Rock'n metal");
	chaine += AfficheInterface("3","Roc au m&eacute;tal","Rock'n metal");
	chaine += AfficheInterface("4","Roc au m&eacute;tal","Rock'n metal");
	AltTxt = EnteteRoc.arguments[2]=='fr'?'Vers le site du Mus&eacute;e virtuel du Canada':'To the Virtual Museum of Canada';
	chaine += AfficheInterface("5","Roc au m&eacute;tal","Rock'n metal");
	chaine += '</td>';
	chaine += '</tr>';
	chaine += '<tr>';
	chaine += '<td>';
	chaine += AfficheInterface("6","Roc au m&eacute;tal","Rock'n metal");
	chaine += AfficheInterface("7","Roc au m&eacute;tal","Rock'n metal");
	chaine += '</td>';
	chaine += '</tr>';
	chaine += '</table>';
	document.write(chaine);
}
//

function EnteteJadis(nom_section){
	chaine = '';
	chcar = String(top.location);

	rech_en = "/en/";

	rech_fr = "/fr/";

 

	if  (chcar.match(rech_fr)) {

		chaine += '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top">';
		chaine += '<img src="../../img_rm/jadis/shim.gif" width="20" height="2" border="0" alt=" "></td>';
		chaine += '<td valign="top" align="center"></td>';
		chaine += '<td width="31"><img src="../../img_rm/jadis/shim.gif" width="2" height="2" border="0" alt=" "></td></tr>';
		chaine += '<tr><td valign="top"><img src="../../img_rm/jadis/shim.gif" width="20" height="2" border="0" alt=" "></td>';
		chaine += '<td valign="top"  colspan="2" ><img src="../img_langue/jadis_' + nom_section + '_tit.jpg" border="0" alt="Entete de section JADIS" height="79" width="760" usemap="#Map">';
		chaine += '<map name="Map"><area shape="rect" coords="611,0,769,46" href="http://www.museevirtuel.ca" target="_blank" alt="Mus&eacute;e virtuel du Canada"></map></td>';
		chaine += '</tr></table>';

	}

	

	else

	

	{

		chaine += '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top">';
	chaine += '<img src="../../img_rm/jadis/shim.gif" width="20" height="2" border="0" alt=" "></td>';
	chaine += '<td valign="top" align="center"></td>';
	chaine += '<td width="31"><img src="../../img_rm/jadis/shim.gif" width="2" height="2" border="0" alt=" "></td></tr>';
	chaine += '<tr><td valign="top"><img src="../../img_rm/jadis/shim.gif" width="20" height="2" border="0" alt=" "></td>';
	chaine += '<td valign="top"  colspan="2" ><img src="../img_langue/jadis_' + nom_section + '_tit.jpg" border="0" alt="FORMERLY" height="79" width="760" usemap="#Map">';
	chaine += '<map name="Map"><area shape="rect" coords="611,0,769,46" href="http://www.museevirtuel.ca" target="_blank" alt="Virtual Museum Canada"></map></td>';
	chaine += '</tr></table>';

	

	}
	document.write(chaine);

}

//

function PiedRoc(){

	chaine = '';

	chaine += '<table width=760><tr><td>';

	chaine += '<br><div class="vignette_geologie" align=center><a href="javascript:ouvrir_copyright();">&copy;Mus&eacute;e de la civilisation</a>, 2002</div>';

	chaine += '</td></tr></table>';

	document.write(chaine);

}


function PiedRocBleu(){

	chaine = '';

	chaine += '<table width=760><tr><td>';

	chaine += '<br><div class="texteaccueillien" align=center><a href="javascript:ouvrir_copyright();"><span class="texteaccueillien" align=center>&copy;Mus&eacute;e de la civilisation</span></a>, 2002</div>';

	chaine += '</td></tr></table>';

	document.write(chaine);

}



//
function PiedVignette(){

	chaine = '';
	chcar = String(top.location);

	rech_en = "/en/";

	rech_fr = "/fr/";

 

	if  (chcar.match(rech_fr)) {
		chaine += '<br><a href="http://www.mcq.org/roc/" target="_blank">DU ROC AU METAL</a><br>';
		chaine += '&copy;<a href="javascript:ouvrir_copyright();">Mus&eacute;e de la civilisation</a>';
		chaine += ' - <a href="../credits.html" target="_top">CR&Eacute;DITS</a>';
	}

	

	else

	

	{

	chaine += '<br><a href="http://www.mcq.org/roc/index_eng.html" target="_blank">ROCK\'N METAL</a><br>';
	chaine += '&copy;<a href="javascript:ouvrir_copyright();">Mus&eacute;e de la civilisation</a>';
	chaine += ' - <a href="../credits.html" target="_top">CREDITS</a>';

	}

	

	document.write(chaine);

}

//

function ouvrir_copyright() {
	loc_car = String(top.location);

	rech_en = "/en/";
	rech_en_accueil = "roc/index_eng.html";

	rech_fr = "/fr/";

if  (loc_car.match(rech_en) || loc_car.match(rech_en_accueil)) {
	clang_mcq = "http://www.mcq.org/english/index.html";
	clang_copyright = "/en/";
} else {
	clang_mcq = "http://www.mcq.org/";
	clang_copyright = "/fr/";
}

newContenu2=window.open("","mcq","WIDTH=785,status,resizable,copyhistory,scrollbars,menubar,toolbar");
	newContenu2.moveTo(0, 0);
	newContenu2.location = clang_mcq;
	newContenu2.focus();


	newContenu =window.open("","copyright","width=500,height=200");
	newContenu.moveTo(140, 180);
	newContenu.location = "http://www.mcq.org/roc"+clang_copyright+"copyright.html";
	newContenu.focus();
}
