var preloadFlag = false;
var movieName = "soundPlay";
var msgWindow = null;
var currentImageName = "";

document.writeln("	<LINK REL=\"icon\" HREF=\"/favicon.ico\" TYPE=\"image/x-icon\">");
document.writeln("	<LINK REL=\"SHORTCUT ICON\" HREF=\"/favicon.ico\" TYPE=\"image/x-icon\">");


function thisMovie(movieName) {
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  }	else {
    return document[movieName]
  }
}

function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}

function clickSound(soundName) {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).TGotoLabel("_level0/"+soundName,"stopSound");
    thisMovie(movieName).TGotoLabel("_level0/"+soundName,"playSound");
  }
}


function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document.getElementById(changeImages.arguments[i]).src = changeImages.arguments[i+1];
		}
	}
}

function mapCtrl(imgNum, overState) {
	if (document.images && (preloadFlag == true)) {
		imgSrc = "n" + imgNum;
		if (overState == "on"){
			document.getElementById(imgSrc).src = eval('pre_n'+imgNum).src;
		} else {
			document.getElementById(imgSrc).src = "/images/controls/n" + imgNum + ".gif";
		}
	}
}

function frameImage(blockType, imgName, imgWidth, imgHeight, tM, rM, bM, lM, alignLCR, figCap, frameType, iLink){
  var tWidth=imgWidth+20;
  var tHeight=imgHeight+20;
  if (blockType == "div") {tailBreak="<br clear=all>"} else {tailBreak=""};
  if (frameType == "noborder") {fT="photos"} else {fT="images"};
  if (iLink != "") {linkStart="<A href=\""+iLink+"\">"; linkEnd="</A>"} else {linkStart=""; linkEnd=""};
  document.writeln("<"+blockType+" style=\"\"><table align=\""+alignLCR+"\"width="+tWidth+" border=0 cellpadding=0 cellspacing=0 style=\"margin: 0px; margin-right:"+rM+"px; margin-left:"+lM+"px; margin-top:"+tM+"px; margin-bottom:"+bM+"px;\">");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t11.gif');\"><img src=\"images/"+fT+"/t11.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t12.gif');\"><img src=\"images/"+fT+"/t12.gif\" width= \"1\"  height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t13.gif');\"><img src=\"images/"+fT+"/t13.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t21.gif');\"><img src=\"images/"+fT+"/t21.gif\" width=\"10\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\">"+linkStart+"<img src=\""+imgName+"\" width="+imgWidth+" height="+imgHeight+" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\">"+linkEnd+"</td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t23.gif');\"><img src=\"images/"+fT+"/t23.gif\" width=\"10\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t31.gif');\"><img src=\"images/"+fT+"/t31.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t32.gif');\"><img src=\"images/"+fT+"/t32.gif\" width=\"1\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('images/"+fT+"/t33.gif');\"><img src=\"images/"+fT+"/t33.gif\" width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td colspan=3 style=\"padding: 8px; padding-top: 0px; padding-bottom: 10px;\"><span class=\"figcaption\">"+figCap+"</span></td>");
  document.writeln("	</tr>");
  document.writeln("</table></"+blockType+">"+tailBreak);
};


function frameAlternate(blockType, imgName, imgWidth, imgHeight, tM, rM, bM, lM, alignLCR, figCap, frameType, iLink, bSize, bColor){
  var tWidth=imgWidth+20;
  var tHeight=imgHeight+20;
  if (frameType == "2") {ysType="ys2"} else {ysType="ys"};
  if (blockType == "div") {tailBreak="<br clear=all>"} else {tailBreak=""};
  if (iLink != "") {linkStart="<A href=\""+iLink+"\">"; linkEnd="</A>"} else {linkStart=""; linkEnd=""};
  document.writeln("<"+blockType+"><table align=\""+alignLCR+"\"width="+tWidth+" border=0 cellpadding=0 cellspacing=0 style=\"margin: 0px; margin-right:"+rM+"px; margin-left:"+lM+"px; margin-top:"+tM+"px; margin-bottom:"+bM+"px;\">");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "11.gif');\"><img src=\"/images/" + ysType + "11.gif\"   width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "12.gif');\"><img src=\"/images/" + ysType + "12a.gif\" width= \"130\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "13.gif');\"><img src=\"/images/" + ysType + "13.gif\"   width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\"    align=\"left\" style=\"background: url('/images/" + ysType + "21.gif');\"><img src=\"/images/" + ysType + "21a.gif\" width=\"10\" height=\"130\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\"    align=\"left\">"+linkStart+"<img src=\""+imgName+"\" width="+imgWidth+" height="+imgHeight+" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\" style=\"border: " + bSize + "px solid #" + bColor +";\">"+linkEnd+"</td>");
  document.writeln("		<td width= 10 valign=\"bottom\" align=\"left\" style=\"background: url('/images/" + ysType + "23.gif');\"><img src=\"/images/" + ysType + "23a.gif\" width=\"10\" height=\"130\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\"  style=\"background: url('/images/" + ysType + "31.gif');\"><img src=\"/images/" + ysType + "31.gif\"  width= \"10\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width=220 valign=\"top\" align=\"right\" style=\"background: url('/images/" + ysType + "32.gif');\"><img src=\"/images/" + ysType + "32a.gif\" width=\"130\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" align=\"right\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\"  style=\"background: url('/images/" + ysType + "33.gif');\"><img src=\"/images/" + ysType + "33.gif\"  width= \"10\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td colspan=3 style=\"padding-bottom: 6px; padding-top: 0px; padding-left: 10px; padding-bottom: 10px;\"><span class=\"figcaption\">"+figCap+"</span></td>");
  document.writeln("	</tr>");
  document.writeln("</table></"+blockType+">"+tailBreak);
};


function frameAlternate2(blockType, tM, rM, bM, lM, alignLCR, stickyNote, sNsize){
  myHeight = 0;
  if (blockType == "div") {tailBreak="<br clear=all>"} else {tailBreak=""};
  if (sNsize > 130) {myWidth = sNsize} else {myWidth=130};
  if (myWidth > 150) {myHeight = myWidth-150} else {myHeight=0};
  ysType="ys2";
  document.writeln("<"+blockType+"><table align=\""+alignLCR+"\" width="+(myWidth+20)+" border=0 cellpadding=0 cellspacing=0 style=\"margin: 0px; padding: 0px; margin-right:"+rM+"px; margin-left:"+lM+"px; margin-top:"+tM+"px; margin-bottom:"+bM+"px;\">");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "11.gif');\"><img src=\"/images/" + ysType + "11.gif\"   width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= " + myWidth + " valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "12.gif');\"><img src=\"/images/" + ysType + "12a.gif\" width= \"130\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "13.gif');\"><img src=\"/images/" + ysType + "13.gif\"   width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\"    align=\"left\" style=\"background: url('/images/" + ysType + "21.gif');\"><img src=\"/images/" + ysType + "21a.gif\" width=\"10\" height=\"130\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"><br><img src=\"/images/spacer.gif\" width= \"10\" height=\""+myHeight+"\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= " + myWidth + " valign=\"top\"    align=\"left\" style=\"background: #ffffcc;\"><div style=\"width: "+myWidth+"px;\"><div class=\"stickyNoteIn\">"+stickyNote+"</div></div></td>");
  document.writeln("		<td width= 10 valign=\"bottom\" align=\"left\" style=\"background: url('/images/" + ysType + "23.gif');\"><img src=\"/images/" + ysType + "23a.gif\" width=\"10\" height=\"130\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\"  style=\"background: url('/images/" + ysType + "31.gif');\"><img src=\"/images/" + ysType + "31.gif\"  width= \"10\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= " + myWidth + " valign=\"top\" align=\"right\" style=\"background: url('/images/" + ysType + "32.gif');\"><img src=\"/images/" + ysType + "32a.gif\" width=\"130\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\" align=\"right\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\"  style=\"background: url('/images/" + ysType + "33.gif');\"><img src=\"/images/" + ysType + "33.gif\"  width= \"10\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10></td>");
  document.writeln("		<td width= 10><img src=\"/images/spacer.gif\" width= \""+myWidth+"\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10</td>");
  document.writeln("	</tr>");
  document.writeln("</table></"+blockType+">"+tailBreak);
};


function yellowSticky(blockType, tM, rM, bM, lM, alignLCR, stickyNote, sNsize){
  myHeight = 0;
  if (blockType == "div") {tailBreak="<br clear=all>"} else {tailBreak=""};
  if (sNsize > 130) {myWidth = sNsize} else {myWidth=130};
  if (myWidth > 150) {myHeight = myWidth-150} else {myHeight=0};
  ysType="ys2";
  document.writeln("<"+blockType+"><table align=\""+alignLCR+"\" width="+(myWidth+20)+" border=0 cellpadding=0 cellspacing=0 style=\"margin: 0px; padding: 0px; margin-right:"+rM+"px; margin-left:"+lM+"px; margin-top:"+tM+"px; margin-bottom:"+bM+"px;\">");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "11.gif');\"><img src=\"/images/" + ysType + "11.gif\"   width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= " + myWidth + " valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "12.gif');\"><img src=\"/images/" + ysType + "12a.gif\" width= \"130\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\" style=\"background: url('/images/" + ysType + "13.gif');\"><img src=\"/images/" + ysType + "13.gif\"   width= \"10\" height=\"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\"    align=\"left\" style=\"background: url('/images/" + ysType + "21.gif');\"><img src=\"/images/" + ysType + "21a.gif\" width=\"10\" height=\"130\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"><br><img src=\"/images/spacer.gif\" width= \"10\" height=\""+myHeight+"\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= " + myWidth + " valign=\"top\"    align=\"left\" style=\"background: #ffffcc;\"><div style=\"width: "+myWidth+"px;\"><div class=\"stickyNoteIn\">"+stickyNote+"</div></div></td>");
  document.writeln("		<td width= 10 valign=\"bottom\" align=\"left\" style=\"background: url('/images/" + ysType + "23.gif');\"><img src=\"/images/" + ysType + "23a.gif\" width=\"10\" height=\"130\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\"  style=\"background: url('/images/" + ysType + "31.gif');\"><img src=\"/images/" + ysType + "31.gif\"  width= \"10\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= " + myWidth + " valign=\"top\" align=\"right\" style=\"background: url('/images/" + ysType + "32.gif');\"><img src=\"/images/" + ysType + "32a.gif\" width=\"130\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\" align=\"right\"></td>");
  document.writeln("		<td width= 10 valign=\"top\" align=\"left\"  style=\"background: url('/images/" + ysType + "33.gif');\"><img src=\"/images/" + ysType + "33.gif\"  width= \"10\" height= \"10\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("	</tr>");
  document.writeln("	<tr>");
  document.writeln("		<td width= 10></td>");
  document.writeln("		<td width= 10><img src=\"/images/spacer.gif\" width= \""+myWidth+"\" height=\"1\" hspace=\"0\" vspace=\"0\" border=\"0\" alt=\"\"></td>");
  document.writeln("		<td width= 10</td>");
  document.writeln("	</tr>");
  document.writeln("</table></"+blockType+">"+tailBreak);
};



if (document.images) {
	spacerLoad = newImage("images/spacer.gif");
}

function windowOpener(currentPage, currentImage) {
	currentImageName = 'pics/pic'+currentImage+'.jpg'
	if (msgWindow) {
		if (msgWindow.closed) {
			makeIt(currentPage, currentImage, currentImageName)
		} else {
			msgWindow.frames[0].document['photo'].src=currentImageName
			msgWindow.focus()
		}
	} else {
		makeIt(currentPage, currentImage, currentImageName)
	}
	msgWindow.currentImageName = currentImageName
}

function makeIt(currentPage, currentImage, currentImageName) {
	myWidth=790;
	myHeight=540;
	myPosX=(screen.width-myWidth)/2;
	myPosY=(screen.height-myHeight)/2;
	myProps='toolbar=no, status=no,scrollbars=no,resizable=no,left='+myPosX+',top='+myPosY+',width='+myWidth+',height='+myHeight;
	msgWindow=window.open('/album.asp?pageID=' + currentPage + '&photoID=' + currentImage, 'photos',myProps);
}


function preloadImages() {
//alert(window.location.pathname.substring(1,3));
	pre_n1 = newImage("/images/controls/n1on.gif");
	pre_n2 = newImage("/images/controls/n2on.gif");
	pre_n3 = newImage("/images/controls/n3on.gif");
	pre_n4 = newImage("/images/controls/n4on.gif");
	pre_n5 = newImage("/images/controls/n5on.gif");
	pre_n6 = newImage("/images/controls/n6on.gif");
	pre_n7 = newImage("/images/controls/n7on.gif");
	pre_n8 = newImage("/images/controls/n8on.gif");
	pre_n9 = newImage("/images/controls/n9on.gif");
	pre_n10 = newImage("/images/controls/n10on.gif");
	pre_n11 = newImage("/images/controls/n11on.gif");
	pre_n12 = newImage("/images/controls/n12on.gif");
	pre_n13 = newImage("/images/controls/n13on.gif");
	pre_n14 = newImage("/images/controls/n14on.gif");
	bobscopyOn = newImage("/images/bobscopyon.gif");
	bobscopyOff = newImage("/images/bobscopyoff.gif");
	rogersOn = newImage("/images/rogerson.gif");
	rogersOff = newImage("/images/rogersoff.gif");
	bigdataOn = newImage("/images/bigdataon.gif");
	bigdataOff = newImage("/images/bigdataoff.gif");
	rcOn = newImage("/images/rcon.gif");
	rcOff = newImage("/images/rcoff.gif");
	lbOn = newImage("/images/lbon.gif");
	lbOff = newImage("/images/lboff.gif");
	pageLockOn = newImage("images/l1.gif");
	pageLockOff = newImage("images/l0.gif");
	myLangButtonP = newImage("images/lang.gif");
	myLangButtonOnP = newImage("images/langon.gif");
	logButtonP = newImage("images/log.gif");
	logButtonOnP = newImage("images/logon.gif");
	logButtonClickP = newImage("images/logclick.gif");
	goButtonP = newImage("images/go.gif");
	goButtonOnP = newImage("images/goon.gif");
	goButtonClickP = newImage("images/goclick.gif");
	fron = newImage("images/fron.gif");
	froff = newImage("images/froff.gif");
	enon = newImage("images/enon.gif");
	enoff = newImage("images/enoff.gif");
	midbacken = newImage("images/en/midback.jpg");
	midbackfr = newImage("images/fr/midback.jpg");
  	preloadFlag = true;
  	if (window.location.pathname.substring(1,3)) {
		setCookie("myLanguage", window.location.pathname.substring(1,3), 365);
	}
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function dummyF() {
}

function goBackClear() {
  history.back();
}

wwwCookieName = "";

function getCookie(name){
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0) {
    begin = dc.indexOf(cname);
    if (begin != -1) {
      begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    }
  }
  return null;
}

function setCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString() + ";path="+"/";
}

function changeButton(imgSrc, overState) {
	if (document.images && (preloadFlag == true)) {
		if ((overState == "On") || (overState == "Click") ){
			document.getElementById(imgSrc+'Button').src = eval(imgSrc+'Button'+overState+'P').src;
		} else {
			document.getElementById(imgSrc+'Button').src = eval(imgSrc+'Button'+'P').src;
		}
	}
}

function changeImages2(imgSrc, overState) {
	if (document.images && (preloadFlag == true)) {
		document.getElementById(imgSrc).src = eval(imgSrc+overState).src;
	}
}

function switchLanguage(newLang) {
	setCookie("myLanguage", newLang, 365);
	myURL = "http://" + window.location.hostname + "/" + newLang + window.location.pathname.substring(3,window.location.pathname.length);
	window.location.href=myURL;
}

function tabOnEnter (field, evt, nextfield) {
	var keyCode = document.layers ? evt.which : document.all ? evt.keyCode : evt.keyCode;
	if ((keyCode != 13) && (keyCode != 9))
		return true;
	else {
		if (nextfield == "soumettre") {document.getElementById("checpassword").submit()} else {document.getElementById(nextfield).focus()};
		return false;
	}
}
function focusField () {
	if (document.getElementById("email")) {
		document.getElementById("email").value = document.getElementById("email").value;
		document.getElementById("email").focus();
	};
}

function checkNewPassword (myLanguage) {
	if (myLanguage == 'fr') {
		message00 = "Votre mot de passe a été changé.";
		message01 = "SVP réessayez. Les deux entrées du mot de passe ne sont pas identiques.";
		message02 = "SVP réessayez. Votre mot de passe doit contenir au moins 5 charactères.";
		message03 = "SVP réessayez. Votre mot de passe contient des caractères non permis (seuls des chiffres et des lettres sont permis).";
	} else {
		message00 = "Your password has been changed.";
		message01 = "Please try again. The two password values do not match.";
		message02 = "Please try again. Your password must contain at least 5 characters.";
		message03 = "Please try again. Your password contains illegal characters (only letters and numbers are allowed).";
	}
	
	var illegalChars = /[\W_]/;
	if (illegalChars.test(document.getElementById("pwd1").value)) {
		alert(message03);
	} else {
		if (document.getElementById("pwd1").value == document.getElementById("pwd2").value) {
			if (document.getElementById("pwd1").value.length < 5) {
				alert(message02);
			} else {
				alert(message00);
				document.getElementById('changepassword').submit();
			};
		} else {
			alert(message01);
		};
	};
};


