/*******************************************************************/
//fonction barre statut
function msg(txt) {
	top.status=txt;
}
/*******************************************************************/

/*******************************************************************/
	// Fonction de rollover
	function rollover(nom,src) {	
	// nom est le nom de l'image
	// src est l'adresse du fichier d'image
	document.images[nom].src=src;
	}
/*******************************************************************/

/*******************************************************************/
	// Fonction de verification du mail de la newsletter
   function ValiderMail(formulaire) {
      if (formulaire.mail.value.indexOf("@",0)<0) {alert("Adresse mail saisie invalide.")}
      else {formulaire.submit();}
   }
/*******************************************************************/

/*******************************************************************/
	// Fonction du pop up taille de l'image
    function PopupImage(img) {
	titre="Auberge de la Munia";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='images/"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
	}
/*******************************************************************/

/*******************************************************************/
// Fonction popup
   function popup(URL,winName,options) 
{ //v2.0
	var top=(screen.height-200)/2;
	var left=(screen.width-200)/2;
	window.open(URL,winName,"top="+top+",left="+left+","+options);
	//window.open(URL,winName,options);
}
/*******************************************************************/

/*******************************************************************/
// Fonction popup galerie photos
   function popupgalerie(URL) 
{ //v2.0	
	window.open(URL,"photo","top=70,left=100,width=500,height=550,toolbar=no,scrollbars=no,resizable=no");
	//window.open(URL,winName,options);
}
/*******************************************************************/

/*******************************************************************/
// preload des images
function load() {
	if (document.images) {
		this.length=preload.arguments.length;
		for (var i=0;i<this.length;i++) {
			this[i+1]=new Image();
			this[i+1].src=preload.arguments[i];
		}
	}
}
function preload() {
// Cette fonction charge dans le cache toutes les images passées en paramètre
	var temp=new load("images/munia4_01.jpg","munia4_02_02.jpg","photohome1.jpg","photohome.jpg","photohome2.jpg","munia4_02_14.jpg","munia4_02_19.jpg","munia4_02_20.jpg","munia4_03_02.jpg","munia4_04_04.jpg","munia4_04_05.gif","munia4_04_05bis.gif","munia4_04_07.jpg","munia4_04_10.jpg","munia4_04_13.gif","munia4_04_13bis.gif","munia4_04_17.jpg","munia4_04_19.jpg","munia4_04_20.gif","munia4_04_20bis.gif","munia4_04_22.jpg","munia4_04_25.jpg","munia4_04_27.jpg","munia4_04_29.gif","munia4_04_29bis.gif","munia4_04_32.jpg","munia4_04_33.jpg","munia4_04_35.gif",	"munia4_04_35bis.gif","munia4_04_37_01.jpg","munia4_04_37_02.jpg","munia4_04_37_03.gif")
}
/*******************************************************************/

/*******************************************************************/
// fonctions des fleches

// begin absolutely positioned scrollable area object scripts 
// Extension developed by David G. Miles 
// Original Scrollable Area code developed by Thomas Brattli 
function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=50 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 
var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
} 
// end absolutely positioned scrollable area object scripts 

/*******************************************************************/


