/*
	Fonction Check EMAIL
*/


function checkrequired(which){
var pass=true
if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.name.substring(0,8)=="required"){
if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
pass=false
break
}
}
}
}
if (!pass){
alert("Certains champs de ce formulaire sont obligatoires. Merci de bien vouloir les renseigner.")
return false
}
else
return true
}


/*
	Fonction Affichage date au format FR
*/


navvers = navigator.appVersion.substring(0,1);


if (navvers > 3)
	navok = true;
else
	navok = false;


today = new Date;
jour = today.getDay();
numero = today.getDate();
if (numero<10)
	numero = "0"+numero;
mois = today.getMonth();
if (navok)
	annee = today.getFullYear();
else
	annee = today.getYear();
TabJour = new Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
TabMois = new Array("janvier","février","mars","avril","mai","juin","juillet","aout","septembre","octobre","novembre","décembre");
messageDate = TabJour[jour] + " " + numero + " " + TabMois[mois] + " " + annee;


/*
	Fonction Impression de la page en cours
*/


function printpage() {
	if (window.print) {
		window.focus();
		window.print();
	} else {
		alert('Votre système ne permet pas d\'activer cette fonction. Pour imprimer, sélectionnez Imprimer dans le menu de votre Navigateur.');
	}
}


/*
	Fonction Ajouter le site aux favoris
*/


function addToFavorite(favTitle){
  if (navigator.appVersion.indexOf("Mac") > 0) {
	alert('Votre système ne permet pas d\'activer cette fonction. Pour ajouter cette page à vos favoris, cliquez sur Ctrl+D sur PC ou Pomme+D sur MAC.');
  } else {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}


/*
	Fonction POPUP revu par MC&C HP 2002
*/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*
	Fonction Affichage message dans la barre de Status
*/


function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}


function initializeDates()
{
	var thisdate = new Date();
	var thismonth = thisdate.getMonth();
	var thisday = thisdate.getDate();
	var thisyear = thisdate.getFullYear();


	document.MForm.CIMonth.value = thismonth+1;
	document.MForm.CIYear.value = thisyear;
	document.MForm.CIDay.value = thisday;


	document.MForm.COMonth.value = thismonth+1;
	document.MForm.COYear.value = thisyear;
	document.MForm.CODay.value = thisday+1;
	
	document.MForm.nuits.value = (MForm.CODay.value - MForm.CIDay.value) + ' nuitée(s)';
}


function doSelectOptions(theValue,theField) {


	var objForm = document.MForm;
	for (i=0; i< objForm[theField].options.length; i++)
		if (objForm[theField].options[i].value == theValue) {
			objForm[theField].options[i].selected = true;
		}
}


function updateBothDates(theForm)
{
	var worker	= new Date();
	calcBothDates(theForm, (worker.getYear()%1900+1900), worker.getMonth()+1, worker.getDate());
}
function calcBothDates(theForm, ty, tm, td)
{
	var today	= new Date((ty%1900+1900), tm-1, td, 0,0,0);
	var inDate	= new Date((ty%1900+1900), parseInt(document.MForm.CIMonth[document.MForm.CIMonth.selectedIndex].value)-1, document.MForm.CIDay[document.MForm.CIDay.selectedIndex].value, 0,0,0);
	var outDate	= new Date((ty%1900+1900), parseInt(document.MForm.CIMonth[document.MForm.CIMonth.selectedIndex].value)-1, parseInt(document.MForm.CIDay[document.MForm.CIDay.selectedIndex].value)+2, 0,0,0);


	if (inDate.getTime()  < today.getTime()) { // Crossed the newyear boundary
		inDate.setYear((today.getYear()%1900+1900)+1);
		outDate.setYear((today.getYear()%1900+1900)+1);
	}


	theForm.CIYear.value	= (inDate.getYear()%1900) + 1900;
	doSelectOptions(inDate.getMonth()+1, 'CIMonth');
	doSelectOptions(inDate.getDate(), 'CIDay');


	theForm.COYear.value	= (outDate.getYear()%1900) + 1900;
	doSelectOptions(outDate.getMonth()+1, 'COMonth');
	doSelectOptions(outDate.getDate(), 'CODay');
	
	var tmp1 = (outDate.getYear()%1900) + 1900;
	var monarr = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
	// check for leap year
	if (((tmp1 % 4 == 0) && (tmp1 % 100 != 0)) || (tmp1 % 400 == 0)) monarr[1] = "29";
	//Finds the First Day for the Current Month
	
	var tmp2 = monarr[theForm.CIMonth.value - 1];
	tmp2 = (tmp2 - MForm.CIDay.value);
	if (theForm.COMonth.value == theForm.CIMonth.value) {
		tmp2 = (MForm.CODay.value - MForm.CIDay.value);
	} else {
		tmp2 = tmp2 + parseInt(MForm.CODay.value);
	}

	document.MForm.nuits.value = tmp2 + ' nuitée(s)';
}


function updateCIDate(theForm)

{
	var worker	= new Date();
	calcCIDate(theForm, (worker.getYear()%1900+1900), worker.getMonth()+1, worker.getDate());
}
function calcCIDate(theForm, ty, tm, td)
{
	var today	= new Date((ty%1900+1900), tm-1, td, 0,0,0);
	var inDate	= new Date((ty%1900+1900), parseInt(document.MForm.CIMonth[document.MForm.CIMonth.selectedIndex].value)-1, document.MForm.CIDay[document.MForm.CIDay.selectedIndex].value, 0,0,0);


	if (inDate.getTime()  < today.getTime()) { // Crossed the newyear boundary
		inDate. setYear((today.getYear()%1900+1900)+1);
	}


	theForm.CIYear.value	= (inDate.getYear()%1900) + 1900;
	doSelectOptions(inDate.getMonth()+1, 'CIMonth');
	doSelectOptions(inDate.getDate(), 'CIDay');


	document.MForm.nuits.value = (MForm.CODay.value - MForm.CIDay.value) + ' nuitée(s)';


}


function updateCODate(theForm)
{
	var worker	= new Date();
	calcCODate(theForm, (worker.getYear()%1900+1900), worker.getMonth()+1, worker.getDate());
}
function calcCODate(theForm, ty, tm, td)
{
	var today	= new Date((ty%1900+1900), tm-1, td, 0,0,0);
	var outDate	= new Date((ty%1900+1900), parseInt(document.MForm.COMonth[document.MForm.COMonth.selectedIndex].value)-1, parseInt(document.MForm.CODay[document.MForm.CODay.selectedIndex].value), 0,0,0);


	if ((parseInt(theForm.CIYear.value)%1900) >(today.getYear()%1900)) {
		outDate.setYear((today.getYear()%1900+1900)+1);	// Already a year ahead for in date
	} else if (outDate.getTime() < today.getTime()) {
		outDate.setYear((today.getYear()%1900+1900)+1);	// Crossed the newyear boundary
	}


	theForm.COYear.value	= (outDate.getYear()%1900) + 1900;
	doSelectOptions(outDate.getMonth()+1, 'COMonth');
	doSelectOptions(outDate.getDate(), 'CODay');

	var tmp1 = (outDate.getYear()%1900) + 1900;
	var monarr = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
	// check for leap year
	if (((tmp1 % 4 == 0) && (tmp1 % 100 != 0)) || (tmp1 % 400 == 0)) monarr[1] = "29";
	//Finds the First Day for the Current Month
	
	var tmp2 = monarr[theForm.CIMonth.value - 1];
	tmp2 = (tmp2 - MForm.CIDay.value);
	if (theForm.COMonth.value == theForm.CIMonth.value) {
		tmp2 = (MForm.CODay.value - MForm.CIDay.value);
	} else {
		tmp2 = tmp2 + parseInt(MForm.CODay.value);
	}

	document.MForm.nuits.value = tmp2 + ' nuitée(s)';

}


function searchDebug() { alert('CIYear='+MForm.CIYear.value+', COYear='+MForm.COYear.value); }
function changeRezDebug() { alert('CIYear='+MForm.CIYear.value+', COYear='+MForm.COYear.value); }
function debugRefineLeftnav() { alert('CIYear='+MForm.CIYear.value+', COYear='+MForm.COYear.value); }

//Static Slide Menu 6.5 © MaXimuS 2000-2001, All Rights Reserved.
//Site: http://www.absolutegb.com/maximus
//E-mail: maximus@nsimail.com
//Script featured on Dynamic Drive (http://www.dynamicdrive.com)

NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")

tempBar='';barBuilt=0;ssmItems=new Array();

moving=setTimeout('null',1)
function moveOut() {
if ((NS6||NS)&&parseInt(ssm.left)<0 || IE && ssm.pixelLeft<0) {
clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed);slideMenu(10)}
else {clearTimeout(moving);moving=setTimeout('null',1)}};
function moveBack() {clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)}
function moveBack1() {
if ((NS6||NS) && parseInt(ssm.left)>(-menuWidth) || IE && ssm.pixelLeft>(-menuWidth)) {
clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);slideMenu(-10)}
else {clearTimeout(moving);moving=setTimeout('null',1)}}
function slideMenu(num){
if (IE) {ssm.pixelLeft += num;}
if (NS||NS6) {ssm.left = parseInt(ssm.left)+num;}
if (NS) {bssm.clip.right+=num;bssm2.clip.right+=num;}}

function makeStatic() {
if (NS||NS6) {winY = window.pageYOffset;}
if (IE) {winY = document.body.scrollTop;}
if (NS6||IE||NS) {
if (winY!=lastY&&winY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY - YOffset + staticYOffset);}
else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));}
else {smooth=0}
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) bssm.pixelTop+=smooth;
if (NS6||NS) bssm.top=parseInt(bssm.top)+smooth
lastY = lastY+smooth;
setTimeout('makeStatic()', 1)}}

function buildBar() {
if(barText.indexOf('<IMG')>-1) {tempBar=barText}
else{for (b=0;b<barText.length;b++) {tempBar+=barText.charAt(b)+"<BR>"}}
document.write('<td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD>')}

function initSlide() {
if (NS6){ssm=document.getElementById("thessm").style;bssm=document.getElementById("basessm").style;
bssm.clip="rect(0 "+document.getElementById("thessm").offsetWidth+" "+document.getElementById("thessm").offsetHeight+" 0)";ssm.visibility="visible";}
else if (IE) {ssm=document.all("thessm").style;bssm=document.all("basessm").style
bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";bssm.visibility = "visible";}
else if (NS) {bssm=document.layers["basessm1"];
bssm2=bssm.document.layers["basessm2"];ssm=bssm2.document.layers["thessm"];
bssm2.clip.left=0;ssm.visibility = "show";}
if (menuIsStatic=="yes") makeStatic();}

function buildMenu() {
if (IE||NS6) {document.write('<DIV ID="basessm" style="visibility:hidden;Position : Absolute ;Left : '+XOffset+' ;Top : '+YOffset+' ;Z-Index : 20;width:'+(menuWidth+barWidth+10)+'"><DIV ID="thessm" style="Position : Absolute ;Left : '+(-menuWidth)+' ;Top : 0 ;Z-Index : 20;" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS) {document.write('<LAYER name="basessm1" top="'+YOffset+'" LEFT='+XOffset+' visibility="show"><ILAYER name="basessm2"><LAYER visibility="hide" name="thessm" bgcolor="'+menuBGColor+'" left="'+(-menuWidth)+'" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS6){document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><TR><TD>')}
document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'">');
for(i=0;i<ssmItems.length;i++) {
if(!ssmItems[i][3]){ssmItems[i][3]=menuCols;ssmItems[i][5]=menuWidth-1}
else if(ssmItems[i][3]!=menuCols)ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1);
if(ssmItems[i-1]&&ssmItems[i-1][4]!="no"){document.write('<TR>')}
if(!ssmItems[i][1]){
document.write('<td bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'" WIDTH="'+ssmItems[i][5]+'" COLSPAN="'+ssmItems[i][3]+'">&nbsp;<font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+ssmItems[i][0]+'</b></font></td>')}
else {if(!ssmItems[i][2])ssmItems[i][2]=linkTarget;
document.write('<TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+ssmItems[i][5]+'" COLSPAN="'+ssmItems[i][3]+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV  ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'">&nbsp;<A HREF="'+ssmItems[i][1]+'" target="'+ssmItems[i][2]+'" CLASS="ssmItems">'+ssmItems[i][0]+'</DIV></LAYER></ILAYER></TD>')}
if(ssmItems[i][4]!="no"&&barBuilt==0){buildBar();barBuilt=1}
if(ssmItems[i][4]!="no"){document.write('</TR>')}}
document.write('</table>')
if (NS6){document.write('</TD></TR></TABLE>')}
if (IE||NS6) {document.write('</DIV></DIV>')}
if (NS) {document.write('</LAYER></ILAYER></LAYER>')}
theleft=-menuWidth;lastY=0;setTimeout('initSlide();', 1)}

<!--

/*
Configure menu styles below
NOTE: To edit the link colors, go to the STYLE tags and edit the ssm2Items colors
*/
YOffset=1; // no quotes!!
XOffset=0;
staticYOffset=0; // no quotes!!
slideSpeed=20 // no quotes!!
waitTime=100; // no quotes!! this sets the time the menu stays out for after the mouse goes off it.
menuBGColor="black";
menuIsStatic="yes"; //this sets whether menu should stay static on the screen
menuWidth=380; // Must be a multiple of 10! no quotes!!
menuCols=2;
hdrFontFamily="verdana";
hdrFontSize="1";
hdrFontColor="#ffffcc";
hdrBGColor="#CC6600";
hdrAlign="left";
hdrVAlign="center";
hdrHeight="15";
linkFontFamily="arial";
linkFontSize="1";
linkBGColor="#FFEECC";
linkOverBGColor="#FFFFDD";
linkTarget="_top";
linkAlign="Left";
barBGColor="#339999";
barFontFamily="Verdana";
barFontSize="2";
barFontColor="yellow";
barVAlign="center";
barWidth=17; // no quotes!!
barText="MENU ACCES RAPIDE"; // <IMG> tag supported. Put exact html for an image to show.

///////////////////////////

// ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
ssmItems[0]=["Plan du site"] //create header
ssmItems[1]=["Sommaire", "http://www.louviou.net/JV/sommaire.html", "_self"]
ssmItems[2]=["Ecrire vos pages Web en HTML", "http://www.allhtml.com", "_blank"]
ssmItems[3]=["Unicode les 10 000 codes", "http://www.louviou.net/JV/unicode.html", "_self"]
ssmItems[4]=["Unicode pour du vietnamien", "http://www.louviou.net/JV/vietfont.html", "_blank"]
ssmItems[5]=["Palette des couleurs Lefranc & Bourgeois", "http://www.louviou.net/JV/palette.html", "_blank"]

ssmItems[6]=["Mes albums de photos"] //create header
ssmItems[7]=["15 grandes (2048x1536) photos d'Arles", "http://perso.wanadoo.fr/jean.vichniacoff/L/15vues/15vues.html", "_blank"]
ssmItems[8]=["louviou", "http://community.webshots.com/user/louviou", "_blank"]
//ssmItems[9]=["louviou100", "http://community.webshots.com/user/louviou100", "_blank"]
ssmItems[9]=["louvioufree", "http://community.webshots.com/user/louvioufree", "_blank"]
ssmItems[10]=["vichniacoff_jean", "http://community.webshots.com/user/vichniacoff_jean", "_blank"]
ssmItems[11]=["Fleurs photographiées de près", "http://perso.wanadoo.fr/jean.vichniacoff/Fleurs/001-168b.html", "_blank"]

ssmItems[12]=["Modèles quadrillés (2x2cm) à l'atelier de peinture"] //create header
ssmItems[13]=["50M-venise", "http://louviou.net/JV/L/50M-venise/50M-venise.html", "_blank"]
ssmItems[14]=["abricots", "http://louviou.net/JV/L/abricots/abricots.html", "_blank"]
ssmItems[15]=["fraise", "http://louviou.net/JV/L/fraise/fraise.html", "_blank"]
ssmItems[16]=["grenade", "http://louviou.net/JV/L/grenade/grenade.html", "_blank"]
ssmItems[17]=["tambour", "http://louviou.net/JV/L/tambour/tambour.html", "_blank"]
ssmItems[18]=["Divers"] //create header
ssmItems[19]=["Boisy mon enfance", "http://louviou.net/JV/boisy/index.html", "_self"]
ssmItems[20]=["Faire du texte avec ombre et en relief", "http://www.louviou.net/JV/exemples/001.html", "_blank"]

buildMenu();

//-->
