// VALEUR PAR DEFAULT DES VARIABLES
	
	// Mini Moteur
	if(Object.isUndefined(IdFormMiniMoteur)) 			var IdFormMiniMoteur="IdFormMiniMoteur";	// Id Du formulaire Mini Moteur (Vide si aucun)
	if(Object.isUndefined(IdDivCacheMiniMoteur)) 	var IdDivCacheMiniMoteur="DivMiniMoteur";	// Id de la div mini moteur initialement masquée
	if(Object.isUndefined(ShowMiniMoteurEffect)) 	var ShowMiniMoteurEffect="Blind";			// Effet d'aparence du mini moteur ("Blind" ou "Slide")
	if(Object.isUndefined(IdImgPlusMoins)) 			var IdImgPlusMoins="IdImgPlusMoins";		// Id de l'image plus se transformant en moins
	if(Object.isUndefined(IdImgTexte)) 					var IdImgTexte="IdImgTexte";				// Id de l'image qui se transformant comme plus moins
	
	// Geolocalisation
	if(Object.isUndefined(IdGeoLocalisation)) 		var IdGeoLocalisation="GeoLocalisation";				// Id de l'element input de geolocalisation
	if(Object.isUndefined(IdDivAutocompletion)) 		var IdDivAutocompletion="UpdateLocalisation";			// Id de la div affichant la liste des villes d'autocompletion
	if(Object.isUndefined(FicUpdateAutocompletion)) var FicUpdateAutocompletion="../UpdateLocalisation.php";// Chemin du fichier appellé pour l'autocompletion

	// Formulaire
	if(Object.isUndefined(IdChampEmail1)) 				var IdChampEmail1="email";					// Id du champs email 1
	if(Object.isUndefined(IdChampEmail2)) 				var IdChampEmail2="email2";					// Id du champs email 2 (Vide si inexistant)
	if(Object.isUndefined(IdFormAlertEmail)) 			var IdFormAlertEmail="IdFormAlertEmail";	// Id du formaulaire d'alerte e-mail

	// Moteur de recherche
	if(Object.isUndefined(TabIdChampAVider)) 			var TabIdChampAVider = new Array();
	
	// Variable spécifiant si la page à fini de charger ou pas
	PageFiniLoad=false;
	
// EVENEMENT LOAD
	Event.observe(window, 'load', Initialisation);

// PAGE LOAD
	function Initialisation()
	{
		FixPng(); // Patch Image png
		if(Object.isElement($(IdDivCacheMiniMoteur))) MiniMoteur(); // Minimoteur
		if(Object.isElement($(IdGeoLocalisation))) CreerAutocompletion(); // Geolocalisation
		if(TabIdChampAVider.length >0) InitChampsMoteurRecherche(); // Récup les valeurs initiales des champs du moteur de recherche
//		if(Prototype.Browser.IE && Object.isElement($("SelectGrpType")) && Object.isElement($("LstGrpType")))  {
//					Event.observe($('SelectGrpType'), 'mouseover', function(event) { $("LstGrpType").show(); } );  
//					Event.observe($('SelectGrpType'), 'mouseout', function(event) { $("LstGrpType").hide(); } ); }
		if(Object.isElement($('moteur'))){  Event.observe($('moteur'), 'keypress', function(event) { if(event.keyCode==13) ValiderMoteurRecherche('moteur',1); } ); } // Valid Form si Entree
		if(Object.isElement($(IdFormMiniMoteur))){  Event.observe($(IdFormMiniMoteur), 'keypress', function(event) { if(event.keyCode==13) $(IdFormMiniMoteur).submit(); } ); } // Valid Form si Entree
		ReportVilleMotsClef();		
		PageFiniLoad=true;
	}

	
///////////////////		PNG FIX		///////////////////
	function FixPng() 
	{
		var arVersion = navigator.appVersion.split("MSIE");
		var version = parseFloat(arVersion[1]);
		if ((version >= 5.5) && (document.body.filters)) {
		   for(var i=0; i<document.images.length; i++){
			  var img = document.images[i]
			  if(img.id!="fermer" && img.id!="imgPrevLink" && img.id!="imgNextLink") {
				  var imgName = img.src.toUpperCase()
				  if (imgName.endsWith('PNG') && !imgName.startsWith('HTTP://MAPS.G')){
					 var imgID = (img.id) ? "id='" + img.id + "' " : ""
					 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
					 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
					 var imgStyle = "display:inline-block;" + img.style.cssText 
					 if (img.align == "left") imgStyle = "float:left;" + imgStyle
					 if (img.align == "right") imgStyle = "float:right;" + imgStyle
					 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
					 var strNewHTML = "<span " + imgID + imgClass + imgTitle
					 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
					 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
					 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
					 img.outerHTML = strNewHTML
					 i = i-1
				  }
			  }
		   }
		}
	}

///////////////////		CALCULATRICE		///////////////////
	function Calcul1()
	{	// Fonction qui fait le calcul 1
		var champ1=$("champ1_montant_emprunt").value;
		var champ2=$("champ2_montant_emprunt").value;
		var champ3=$("champ3_montant_emprunt").value;
	
		if(champ1!="" && champ2!="" && champ3!="")
		{ $("res_montant_emprunt").value=Math.round(((1-(Math.pow((1+(champ3/1200)),((12*champ2)*-1))))/(champ3/1200))*champ1); }
		else { alert("Les 3 champs : mensualité, durée et taux doivent être renseignés pour le calcul.");}
	}
	
	function Calcul2()
	{	// Fonction qui fait le calcul 2
		var champ1=$("champ1_montant_mensuel").value;
		var champ2=$("champ2_montant_mensuel").value;
		var champ3=$("champ3_montant_mensuel").value;
	
		if(champ1!="" && champ2!="" && champ3!="")
		{ $("res_montant_mensuel").value=Math.round(((champ1*(champ3/100)*(1/1200))*100)/(1-(Math.pow((1+(champ3/1200)),((12*champ2)*-1))))*100)/100; }
		else { alert("Les 3 champs : mensualité, durée et taux doivent être renseignés pour le calcul.");}
	}
	
	function Calcul3()
	{	// Fonction qui fait le calcul 3
		var champ1=$("champ1_duree_emprunt").value;
		var champ2=$("champ2_duree_emprunt").value;
		var champ3=$("champ3_duree_emprunt").value;
	
		if(champ1!="" && champ2!="" && champ3!="")
		{ 
			var i=1; var ninf=1;
			var nsup=40; var res1="";
			var res2=""; var result="";
			
			while(i<100)
			{
				res1=(ninf+nsup)/2;
				res2=(champ1*(champ3/1200))/(1-(Math.pow((1+(champ3/1200)),((12*((ninf+nsup)/2))*-1))));
				if(res2>champ2) { ninf=res1; } else { nsup=res1; }
				i++;		
			}
			
			if (res1>30 || res1<5)
			{ result =" Valeurs incorrectes." } else {
				var calculannee=Math.floor(res1); // Sans virgule
				var calculmois=Math.round((res1-calculannee)*12);
				result="Votre emprunt durera <span class='texte11gris'><input type='text' name='remboursement_result1'";
				result+="size='3' value='"+calculannee+"' /> ans <input type='text' name='remboursement_result2' size='3'";
				result+="value='"+calculmois+"' /> mois</span></strong>";
			}
		$("res_duree_emprunt").innerHTML=result; }
		else { alert("Les 3 champs : Emprunt, mensualité et taux doivent être renseignés pour le calcul.");}
	}

///////////////////		CHIFFRE		///////////////////
	function chiffres(event)
	{
		// N'authorise que le numérique (Pas infaillible : sous firefox tout le pavé numerique est authorisé. )
		if(((Prototype.Browser.IE) && (event.keyCode < 46 || event.keyCode > 57) && !event.ctrlKey && event.keyCode!=13 && event.keyCode!=27) || ((!Prototype.Browser.IE) && (event.which!=8 && event.which!=0 && (event.which < 46 || event.which > 57)) && !event.ctrlKey && event.keyCode!=13 && event.keyCode!=27))
		{ event.returnValue = false; event.cancelBubble = true; event.preventDefault(); event.stopPropagation(); }
	}		

///////////////////		TRIM D'UNE CHAINE DE CARACTERE	///////////////////
function trim(myString) { return myString.replace(/^\s+/g,'').replace(/\s+$/g,''); } 
	
///////////////////		AJOUT FAVORIS		///////////////////		
	function AjouterAuxFavoris(url,titre)
		{ if (document.all) window.external.AddFavorite(titre, url); 
		else if (window.sidebar) window.sidebar.addPanel(url,titre, "")}
	
///////////////////		MINI MOTEUR		///////////////////
	function MiniMoteur()
	{	// Re donne au champs leurs bonne valeur en fonction des params $_GET
		for(i=0;i<nbparam;i++)
		{	
			var variable = tab_variable[i];
			var valeur   = tab_valeur[i];
			if(document.getElementsByName(variable)[0]) // Si on trouve le paramètre existe
			{
				var objet = document.getElementsByName(variable)[0]; // On lui réattribut sa valeur
				switch (objet.type) // Selon son type
				{ case "checkbox": objet.checked=true; break;
				  case "text": objet.value=URLDecode(valeur); break;
				  case "radio":
					var radios = document.getElementsByName(objet.name);
					for (j=0; j<radios.length; j++) {
						if(document.getElementsByName(objet.name)[j].value==valeur)
							document.getElementsByName(objet.name)[j].checked="checked"; } break;
				  case "select": for (var i=0; i<objet.options.length; i++) 
					  { if (objet.options[i].value=valeur) objet.options[i].selected = true; } break;
				  default: objet.value=valeur; break; }
			} else if(variable!="page") { var hidden = document.createElement("input"); hidden.type='hidden'; hidden.name=variable; //Sinon on le creer
			hidden.id=variable; hidden.value=valeur; $(IdFormMiniMoteur).appendChild(hidden);	} }
	}
	
	function URLDecode(encoded)
	{	// Fonction De décodage Url pour MiniMoteur()
	   var HEXCHARS = "0123456789ABCDEFabcdef"; 
	   var plaintext = "";
	   var i = 0;
	   while (i < encoded.length) {
		   var ch = encoded.charAt(i);
		   if (ch == "+") { plaintext += " "; i++; }
		   else if (ch == "%") {
				if (i < (encoded.length-2) 
						&& HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 
						&& HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) {
					plaintext += unescape( encoded.substr(i,3) ); i += 3; }
				else { i++; }
			} else { plaintext += ch; i++; }
		} return plaintext;
	}

	// Ajoute les evenements de recopie des valeurs
	function ReportVilleMotsClef()
	{
		if(Object.isElement($('motclef')) && Object.isElement($('motclefvisible'))) Event.observe($('motclefvisible'), 'change', function(event) { $('motclef').value=$('motclefvisible').value; } );
		if(Object.isElement($('motclef')) && Object.isElement($('motclefvisible'))) Event.observe($('motclefvisible'), 'keyup', function(event) { $('motclef').value=$('motclefvisible').value; } );
		if(Object.isElement($('ville1')) && Object.isElement($('ville1visible'))) Event.observe($('ville1visible'), 'change', function(event) { $('ville1').value=$('ville1visible').value; } );
		if(Object.isElement($('ville1')) && Object.isElement($('ville1visible'))) Event.observe($('ville1visible'), 'keyup', function(event) { $('ville1').value=$('ville1visible').value; } );
	}

	// Calcul la valeur de liste des types pour un groupe de type
	function SetInputGrpType()
	{
		$('chbx').checked=false;
		var SelectGrpTypeValue=""; var HiddenMultitype="";
		var children = $('LstGrpType').childElements();
		children.each(function(ChBx) { 
			if(ChBx.type=="checkbox" && ChBx.checked) {
				
				// Calcul du champs text
				SelectGrpTypeValue += "," + $('SPAN' + ChBx.id).innerHTML; 
			
				// Calcul de la valeur Multitype
				HiddenMultitype += "." + ChBx.value;
			
			}
		});
		$('InputGrpType').value=SelectGrpTypeValue.substr(1);
		$('HiddenMultitype').value=HiddenMultitype.substr(1);
	}
	
	// Vide la valeur de liste des types pour un groupe de type
	function ClearInputGrpType()
	{
		// Init des valeurs
		$('HiddenMultitype').value="";
		$('InputGrpType').value=$('SPANchbx').innerHTML;
		
		// Décoche toutes les cases à cocher
		var children = $('LstGrpType').childElements();
		children.each(function(ChBx) { if(ChBx.type=="checkbox" && ChBx.checked) {	ChBx.checked= false; } });
		
		// Coche la valeur par défault
		
		$('chbx').checked=true;
	}
	
///////////////////		AFFICHER MASQUER UN ELEMENT		///////////////////
function ShowHide(element)
{
	if($(element).style.display == "none") $(element).show();
	else $(element).hide();
}

///////////////////		AFFICHER MINI MOTEUR		///////////////////
	// Fonction mise en back : Pour cause, elle ne fonctionne pas avec les images png
//	function ShowHideMM(SrcImgPlus,SrcImgMoins,SrcImgTexteOpen,SrcImgTexteClose)
//	{
//		// Show Hide et cgangement des images
//		if($(IdDivCacheMiniMoteur).getStyle('display')=='none')  {
//			if(ShowMiniMoteurEffect=="Blind") new Effect.BlindDown($(IdDivCacheMiniMoteur));
//			else new Effect.SlideDown($(IdDivCacheMiniMoteur));
//			$(IdImgPlusMoins).src=SrcImgMoins; $(IdImgTexte).src=SrcImgTexteOpen;}
//		else {
//			if(ShowMiniMoteurEffect=="Blind") new Effect.BlindUp($(IdDivCacheMiniMoteur));
//			else new Effect.SlideUp($(IdDivCacheMiniMoteur));
//			$(IdImgPlusMoins).src=SrcImgPlus; $(IdImgTexte).src=SrcImgTexteClose;}
//	}
	function ShowHideMM(SrcImgPlus,SrcImgMoins,SrcImgTexteOpen,SrcImgTexteClose)
	{
			
		if(document.getElementById(IdDivCacheMiniMoteur).style.display=='none') { 
			document.getElementById(IdDivCacheMiniMoteur).style.display='block';
			document.getElementById(IdImgPlusMoins).src=SrcImgMoins;
			document.getElementById(IdImgTexte).src=SrcImgTexteOpen; }
		else { 
			document.getElementById(IdDivCacheMiniMoteur).style.display='none';
			document.getElementById(IdImgPlusMoins).src=SrcImgPlus;
			document.getElementById(IdImgTexte).src=SrcImgTexteClose; }
	}


////////////////////	MOTEUR DE RECHERCHE		////////////////////
	// Valide le moteur de recherche
	function ValiderMoteurRecherche(IdFormulaire,Geolocalisation)
	{
		if(PageFiniLoad) {
			if(IsCheckedOneRadio("alentour") && !VilleSelectionnee && Geolocalisation) { 
				alert("Pour élargir la recherche, vous devez choisir une ville parmis celles qui vous sont proposées.");} 
			else {
				// Pour chaque champs dont l'id se trouve dans le tableau si sa valeur est égale a celle initiale Alors on le vide
				TabIdChampAVider.each(function(item) { if(Object.isElement($(item))){ if(TabInitialValue[item]==$(item).value) $(item).value=""; } } ); 
				$(IdFormulaire).submit();
			}
		}
	}

	// Récupère les valeurs Initiales des champs du moteur de recherche
	var TabInitialValue = new Array();
	function InitChampsMoteurRecherche()
	{ TabIdChampAVider.each(function(item) { if(Object.isElement($(item))) TabInitialValue[item]=($(item).value) });	}


///////////////////		VALIDER FORMULAIRE		///////////////////
	function ValiderFormulaire(IdFormulaire)
	{
		var FormulaireValide=true; 
		var MsgErreur="Certains champs du formulaire sont obligatoires.\n\n";
		// Vérifie pour chaque champ obligatoire qu'il est remplit
		eval("Tab"+IdFormulaire).each(function(item) { 
			if(item.include('|')) {
				var TempValid = false;
				eval(item.split("|")).each(function(item) {
					switch ($(item).type) {
						case "checkbox": if($(item).checked==true) TempValid=true; break;
						case "text": if(!$(item).value.empty()) TempValid=true; break;
						case "select": if($(item).selectedIndex!=0) TempValid=true; break;
						case "select-one": if($(item).selectedIndex!=0) TempValid=true; break;
						default: if(!$(item).value.empty()) TempValid=true; break; }	
				});
				if(!TempValid) { FormulaireValide=false; }
			}
			else {
				switch ($(item).type) {
					case "text": if($(item).value.empty()) FormulaireValide=false; break;
					case "select": if($(item).selectedIndex==0) FormulaireValide=false; break;
					case "select-one": if($(item).selectedIndex==0) FormulaireValide=false; break;
					default: if($(item).value.empty()) FormulaireValide=false; break; }				
			}
		});
		if(!ValiderEmail($(IdChampEmail1).value)) {  MsgErreur="Le format de l'adresse E-mail est incorrecte."; FormulaireValide=false; }
		if(IdChampEmail2!="") {
			if(!ValiderEmail($(IdChampEmail2).value)) { MsgErreur="Le format de l'adresse E-mail est incorrecte."; FormulaireValide=false; }
			else { if($(IdChampEmail1).value!=$(IdChampEmail2).value) { MsgErreur="Les deux adresses E-mail ne correspondent pas."; FormulaireValide=false; } } }
		
		if(FormulaireValide==true) $(IdFormulaire).submit();
		else alert(MsgErreur);
	}
	
	function ValiderEmail(email)
	{
   		var regex = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,3}$/;
   		return (regex.exec(email)!=null);
	}

	function ValiderAlertEmail(email)
	{
		if(ValiderEmail(email) && ( !Object.isElement($('email2')) || ( Object.isElement($('email2')) && $('email2').value==email ) ) )	$(IdFormAlertEmail).submit();		
		else if(Object.isElement($('email2')) && $('email2').value!=email) { alert("Les deux adresses E-mail ne correspondent pas."); return false; }
		else { alert("Le format de l'adresse E-mail est incorrecte."); return false; }
	}
	
	function ValiderFormulaireAnnuaire(IdFormAnnuaire,IdTextLength,Length)
	{
		if($(IdTextLength).value.length>200) ValiderFormulaire(IdFormAnnuaire); 
		else alert('Minimum '+Length+' caractères pour la description');
	}
	
	
///////////////////		AUTOCOMPLETION	////////////////////
	function CreerAutocompletion() // Creer l'objet d'autocompletion
	{new Ajax.Autocompleter (IdGeoLocalisation,IdDivAutocompletion,FicUpdateAutocompletion,{method: 'post', paramName: IdGeoLocalisation, minChars:2, tokens:',', indicator: $('loading')}); }
	
	var VilleSelectionnee = false;
	function SetAroundSearch(Latitude,Longitude)
	{
		// Creer les input hidden dans le formulaire de geolocalisation et leur ajoute les bonnes valeur 
		if(!Object.isElement($('IdLatitude')) && Latitude!="" && Longitude!="") {
			if(!Prototype.Browser.IE){
						// Formulaire
						var frmgeoloc=$(IdGeoLocalisation).getOffsetParent();
						// Latitude
						var inputlatitude = document.createElement('input');
						inputlatitude.setAttribute('name', 'latitude');
						inputlatitude.setAttribute('id', 'IdLatitude');
						inputlatitude.setAttribute('value', Latitude);
						inputlatitude.setAttribute('type', 'hidden');
						frmgeoloc.appendChild(inputlatitude);
						// Longitude
						var inputlongitude = document.createElement('input');
						inputlongitude.setAttribute('name', 'longitude');
						inputlongitude.setAttribute('id', 'IdLongitude');
						inputlongitude.setAttribute('value', Longitude);
						inputlongitude.setAttribute('type', 'hidden');
						frmgeoloc.appendChild(inputlongitude);}
			else {
				new Insertion.Before(IdGeoLocalisation, "<input type='hidden' name='latitude' id='IdLatitude' value='"+Latitude+"'");
				new Insertion.Before(IdGeoLocalisation, "<input type='hidden' name='longitude' id='IdLongitude' value='"+Longitude+"'");}
			VilleSelectionnee=true;
		}
	}

///////////////////		SLIDE MENU	////////////////////
// Lance l'initialisation d'un nouveau slide menu
	function NewSideMenu(IdDivOver, IdDivMenu)
	{ Event.observe(window, 'load', function() { if(Object.isElement($(IdDivOver)) &&Object.isElement($(IdDivMenu))) InitSideMenu(IdDivOver, IdDivMenu) } ); }

	function InitSideMenu(IdDivOver, IdDivMenu)
	{
		Event.observe(IdDivOver, 'mouseover', function(){ $(IdDivMenu).show(); } );
		Event.observe(IdDivOver, 'mouseout', function(){ $(IdDivMenu).hide(); } );
	}

///////////////////		BOUTON RADIO	////////////////////
	// Retourne la valeur d'un groupe de bouton radio
	function GetRadioValue(RadioName)
	{
		var v = "NotChecked";
		radio=document.getElementsByName(RadioName);
		for(i=0;i<radio.length;i++){ if(radio[i].checked) v=radio[i].value; }
		return v;
	}
	
	// Retourne true si au moins un bouton radio est checked
	function IsCheckedOneRadio(RadioName)
	{
		var v = false;
		radio=document.getElementsByName(RadioName);
		for(i=0;i<radio.length;i++){ if(radio[i].checked) v=true; }
		return v;
	}

	
///////////////////		SHOW PHOTO MAXI NEWS 	////////////////////

	function ShowDiapoFix(SrcPhoto,iframe) {
		if(PageFiniLoad) {
			
			// Photo //
			if(!iframe) {
				MM_preloadImages(SrcPhoto);
				Photo = new Image();
				Photo.src = SrcPhoto; 
				var PhotoDiapoFixH=Photo.height; 
				var PhotoDiapoFixW=Photo.width; }
			
			// Iframe
			else { 
				var PhotoDiapoFixH=$('PhotoDiapoFix').height; 
				var PhotoDiapoFixW=$('PhotoDiapoFix').width; }
				
			// Changement de source
			$('PhotoDiapoFix').src=SrcPhoto;
			
			// Taille de bordure
			$('DiapoDivBorder').style.height=PhotoDiapoFixH + "px";
			$('DiapoDivBorder').style.width=PhotoDiapoFixW + "px";
			
			// Positionnement vertical
			var TabBodySize = GetBodyVisibleSize();
			var Margin = ((TabBodySize[1] - PhotoDiapoFixH) /2);
			$('DiapoDivBorder').style.marginTop = Margin + "px";
			
			// Affichage
			$('DiapoDivNoir').show(); } 
	}


///////////////////		HIDE PHOTO MAXI NEWS	////////////////////
	function HideDiapoFix() { $('DiapoDivNoir').hide(); }


///////////////////		GET BODY VISIBLE SIZE	////////////////////
	function GetBodyVisibleSize() {
	  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;
	  }
	  return [myWidth,myHeight];
	}

	   
///////////////////		MACROMEDIA		///////////////////
	function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
	obj.visibility=v; }
	}
	
	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_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);
	
	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_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
	w=window.open(theURL,winName,features);
	if(winName=='diapo')  w.resizeTo(700,600);
	else if(winName=='print') w.resizeTo(640,700);
	else w.resizeTo(300,300);
	}
	
	function MM_nbGroup(event, grpName) { //v6.0
	var i,img,nbArr,args=MM_nbGroup.arguments;
	if (event == "init" && args.length > 2) {
	if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
	img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;U
	if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
	nbArr[nbArr.length] = img;
	for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
	if (!img.MM_up) img.MM_up = img.src;
	img.src = img.MM_dn = args[i+1];
	nbArr[nbArr.length] = img;
	} }
	} else if (event == "over") {
	document.MM_nbOver = nbArr = new Array();
	for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
	if (!img.MM_up) img.MM_up = img.src;
	img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
	nbArr[nbArr.length] = img;
	}
	} else if (event == "out" ) {
	for (i=0; i < document.MM_nbOver.length; i++) {
	img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
	} else if (event == "down") {
	nbArr = document[grpName];
	if (nbArr)
	for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
	document[grpName] = nbArr = new Array();
	for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
	if (!img.MM_up) img.MM_up = img.src;
	img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
	nbArr[nbArr.length] = img;
	} }
	}

	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}