function boutonMagique(nomImage,nomFichier) {
	document.images[nomImage].src=nomFichier;
}
function popup(page,nomF) {
	if(screen.width == 800) {
		largeur=645;
		hauteur=400;
		position=100;
	}
	else {
		if (screen.width==1280) {
				largeur=640;
				hauteur=935;
				position=610;
		}
		else {
			if (screen.width==1152) {
				largeur=640;
				hauteur=800;
				position=450;
			}
			else {                // 1024 par défaut
				largeur=645;
				hauteur=710;
				position=365;
			}
		}
	}
	//window.document.write(hauteur);
	var w=window.open(page,nomF,'width=' + largeur + ', height=' + hauteur + ', toolbar=no, scrollbars=yes, resizable=yes, top=15, left=' + position);
	w.document.close();
	w.focus();
}

function popup_carte(haut,large,nomF) {
//	popUp=fenetreCreer(haut,large,nomF);
//alert ("width= " + large + ", height= "+ haut);
//if (nomF.closed==false) alert("OUVERTE");
//else alert("FERMEE");
popUp = window.open ("",nomF, 
		"width=" + large + ",height="+ haut + ",scrollbars=no, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no");
popUp.resizeTo(large,haut+60);
//popUp.resizeTo(50,100);
	var x=(screen.width-large)/2;
	var y=(screen.height-haut-60)/2;
	popUp.moveTo(x,y);
	popUp.focus();
}

//------------------------------------------------------------------
function screen_55() {
	self.moveTo(5,5);
	hauteur= screen.height-25
	//largeur=835;
	//largeur= Math.min(835,hauteur * 1.33); PJC
/*  if(screen.width == 800) hauteur=500;
  else {
	  if (screen.width==1280) hauteur=980;
	  else {
			if (screen.width==1152) hauteur=710;
			else hauteur=730;             // 1024 par défaut
		}
 	}
 */
	//window.resizeTo(largeur,hauteur);PJC
}
function precharging() { 
  var doc=document; 
  if(doc.images){
    if(!doc.precharg) doc.precharg=new Array();
    var i,j=doc.precharg.length,x=precharging.arguments;
    for(i=0; i<x.length; i++) {
      if (x[i].indexOf("#")!=0){
        doc.precharg[j]=new Image; doc.precharg[j++].src=x[i];
      }
    }
  }
}

//------------------------------------------------------------------
function couleur(obj) {
     obj.style.backgroundColor = "#D5FFD5";
}

function check() {
	var msg = "";

		if (document.formulaire.mail.value != "")	{
		indexAroba = document.formulaire.mail.value.indexOf('@');
		indexPoint = document.formulaire.mail.value.indexOf('.');
		if ((indexAroba < 0) || (indexPoint < 0))		{
		document.formulaire.mail.style.backgroundColor = "#FF0000";
			msg += "Adresse mail non-conforme.\n";
		}
	}
	else	{
		document.formulaire.mail.style.backgroundColor = "#FF0000";
		msg += "Veuillez saisir votre @mail.\n";
	}

if (document.formulaire.nom.value == "")	{
		msg += "Veuillez saisir votre Nom.\n";
		document.formulaire.nom.style.backgroundColor = "#FF0000";
  }

if (document.formulaire.prenom.value == "")	{
		msg += "Veuillez saisir votre Prénom.\n";
		document.formulaire.prenom.style.backgroundColor = "#FF0000";
	}

	if (msg == "") return(true);
	else	{
		alert(msg);
		return(false);
	}
}

//------------------------------------------------------------------
function cherch(form) {var adres = "http://www.google.com/search?hl=fr&ie=UTF-8&oe=UTF-8&q="+form.q.value +"+site%3Amondeasie.com&btnG=Recherche+Google&lr="
window.open(adres,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}
