function divMaker(id,ParentLay) {
    Reflay = (ParentLay) ? 'document.'+ParentLay+'.' : ''
    this.elm = is.dom?document.getElementById(id):is.ie4?document.all[id]:is.ns4?eval(Reflay+'document.'+id):0;
    this.css = is.dom?this.elm.style:is.ie4?this.elm.style:is.ns4?this.elm:0;  
    this.doc = (is.dom || is.ie4)?document:is.ns4?this.css.document:0;
    this.x = (is.dom || is.ie4)?this.elm.offsetLeft:is.ns4?this.css.left:0;
    this.y = (is.dom || is.ie4)?this.elm.offsetTop:is.ns4?this.css.top:0;		 		
    this.w = (is.dom || is.ie4)?this.elm.offsetWidth:is.ns4?this.css.clip.width:0;
    this.h = (is.dom || is.ie4)?this.elm.offsetHeight:is.ns4?this.css.clip.height:0;		 		
this.moveTo = moveTo;
this.show = show;
this.id = id;
this.moveBy = moveBy;
}
function moveTo(x,y) {
	if (x!=null) {
		this.x = x
		if (is.ie4) this.css.pixelLeft = this.x
		else this.css.left = this.x
	}
	if (y!=null) {
		this.y = y
		if (is.ie4) this.css.pixelTop = this.y
		else this.css.top = this.y
	}
}
function show() {
	this.css.visibility = (is.ns4)? "show" : "visible"
}

function browser(){
	this.ver=navigator.appVersion; 
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0; 
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1; 
	this.opera=this.agent.indexOf("Opera")>-1
	this.opera5=this.agent.indexOf("Opera 5")>-1; 
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera4)
	return this
}
var is=new browser();

function browserSave() {
	bwName = navigator.appName
	bwVer = parseInt(navigator.appVersion);
	this.ie4=((bwName==("Microsoft Internet Explorer")) && (bwVer>=4)) ? true:false;
	this.ns4=((bwName==("Netscape")) && (bwVer>=4 && bwVer<5)) ? true:false;
	this.ns5=((bwName==("Netscape")) && (bwVer>=5)) ? true:false; 
	this.dom=document.getElementById?true:false;
}
is = new browser()

function moveBy(x,y)
	{
	this.moveTo(this.x+x,this.y+y)
	}

function unblur() {
	this.blur();
} 
function blurlinks() {
	if (!document.getElementById) return;
	theLinks = document.getElementsByTagName("A");
	theAreas = document.getElementsByTagName("AREA");
	for(i=0; i<theLinks.length; i++) {theLinks[i].onfocus = unblur;}
	for(i=0; i<theAreas.length; i++) {theAreas[i].onfocus = unblur;}
  } 

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;
    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}

function verif(email) {
            var arobase = email.indexOf("@")
            var point = email.lastIndexOf(".")
            if((arobase < 3)||(point + 2 > email.length)
               ||(point < arobase+3)) return false
            return true
            }
         function testform(nom,mail) {
            if(nom.value=="") {
               alert("Vous devez indiquer votre nom - Merci !")
               nom.focus(); return false }
            if(!verif(mail.value)) {
               alert("Votre adresse E-mail n'est pas valide !"); mail.value=""
               mail.focus(); return false }
            return true
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function PopupImage(img) {
	titre="Galery Brigitte Capy - Hossegor";
	w=open("",'image','width=800,height=600,toolbar=no,scrollbars=no,resizable=yes');
	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='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</body></html>");
	w.document.close();
}

function OuvreFenetre(url,w,h,a,b,c,d,e,f,g) {
			chaine = 'location='+a+',toolbar='+b+',directories='+c+',menubar='+d+',resizable='+e+',scrollbars='+f+',status='+g+',width='+w+',height='+h;
			var laFenetre = window.open(url,'OuvreFenetre',chaine);
			laFenetre.focus();
}

function window_onload() {
	CentreFenetreEcran(); 
}