
var framb = new Array();
framb[0]="image/framb1.jpg";
framb[1]="image/framb2.jpg";
framb[2]="image/framb3.jpg";
var indexF = 0;

var baron = new Array();
baron[0]="image/baron1.jpg";
baron[1]="image/baron2.jpg";
baron[2]="image/baron3.jpg";
baron[3]="image/baron4.jpg";
baron[4]="image/baron5.jpg";
baron[5]="image/baron6.jpg";
var indexB = 0;

var cesar = new Array();
cesar[0]="image/cesar1.jpg";
cesar[1]="image/cesar2.jpg";
cesar[2]="image/cesar3.jpg";
cesar[3]="image/cesar4.jpg";
cesar[4]="image/cesar5.jpg";
cesar[5]="image/cesar6.jpg";
//cesar[6]="img/cesar7.jpg";
var indexC = 0;


function popup(page, w, h) {
    var newwindow = window.open(page,"myWin","width=" + w + ", height=" + h + ", titlebar=no, toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
    newwindow.focus();
}

function changePhoto(tab, ref, sens) {
	
	if(sens == "next" && indexF < (eval(tab).length-1)) {
		indexF++; }
	if(sens == "prev" && indexF>0) {
		indexF--; }
		
	document.images["ph"].src = eval(tab)[indexF]; 
}

function changePhotoMe(tab, ref, sens) {
	
	if(sens == "next" && indexB < (eval(tab).length-1)) {
		indexB++; }
	if(sens == "prev" && indexB>0) {
		indexB--; }
		
	document.images["ph"].src = eval(tab)[indexB]; 
}

function changePhotoMe2(tab, ref, sens) {
	
	if(sens == "next" && indexC < (eval(tab).length-1)) {
		indexC++; }
	if(sens == "prev" && indexC>0) {
		indexC--; }
		
	document.images["ph"].src = eval(tab)[indexC]; 
}

function changePhotoCha1(tab, ref, sens) {
	
	if(sens == "next" && indexCh1 < (eval(tab).length-1)) {
		indexCh1++; }
	if(sens == "prev" && indexCh1>0) {
		indexCh1--; }
		
	document.images["ph"].src = eval(tab)[indexCh1]; 
}

function changePhotoCha2(tab, ref, sens) {
	
	if(sens == "next" && indexCh2 < (eval(tab).length-1)) {
		indexCh2++; }
	if(sens == "prev" && indexCh2>0) {
		indexCh2--; }
		
	document.images["ph"].src = eval(tab)[indexCh2]; 
}

function picture(pictureURL) {
    var newwindow = window.open("","myWin","width=200, height=300, titlebar=no, toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no");
    with (newwindow)
    {
        var contents="<HTML><HEAD><TITLE>PictureGallery</TITLE></HEAD><BODY BGCOLOR='#FFFFFF' TEXT='#99CC00' LEFTMARGIN=0 TOPMARGIN=0> \
        <IMG SRC='" + pictureURL + "'onLoad='javascript:window.resizeTo(this.width+10,this.height+30);'> \
        </BODY></HTML>";
        document.open("text/html");
        document.write(contents);
        document.close();
    }
    newwindow.focus();
}

function pop(pictureURL) {
    var newwindow = window.open(pictureURL,"myWin","width=800, height=600, titlebar=no, toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function popOnly(pictureURL) {
    var newwindow = window.open(pictureURL,"myWin","width=650, height=480, titlebar=no, toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function popVert(pictureURL) {
    var newwindow = window.open(pictureURL,"myWin","width=600, height=700, titlebar=no, toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function popVertOnly(pictureURL) {
    var newwindow = window.open(pictureURL,"myWin","width=480, height=650, titlebar=no, toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function popVideo(pictureURL) {
    var newwindow = window.open(pictureURL,"myWin","width=500, height=360, titlebar=no, toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
}

function verifMail() {
	
	if(document.forms["newsletter"].email.value == "") {
		alert("Merci de saisir votre email.");
	}
	else {
		if(document.forms["newsletter"].antispam.value == "") {
			alert("Merci de saisir le code affiché dans l'image afin de bloquer les spams.");
		}
		else {
			document.forms["newsletter"].submit();
		}
	}
}

function verifMess() {
	
	if(document.forms["cont"].emailMess.value == "") {
		alert("Merci de saisir votre email pour vous repondre.");
	}
	else {
		if(document.forms["cont"].antispam.value == "") {
			alert("Merci de saisir le code affiché dans l'image afin de bloquer les spams.");
		}
		else {
			document.forms["cont"].submit();
		}
	}
}

function verifSoiree(f) {
	
	if(f.desc.value == '' || f.libelle.value == '' || f.jour.selectedIndex == 0 || f.mois.selectedIndex == 0 || f.annee.selectedIndex == 0) {
			alert("Merci de saisir tous les champs obligatoires svp"); }
	else f.submit();
	
}
function addSaut() {
	document.forms["planning"].desc.value=document.forms["planning"].desc.value+'<br />'
}



