// pages that open using this function will open up in the same window and will prompt the new window to go in front of the parent window. 
function popUp(strPage) {
 	var strURL;
	strURL=strPage;
	newwindow=window.open(strURL,"popUpWindow","width=700px,height=500px,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,location=yes,menubar=yes");
	if (window.focus) {newwindow.focus()}
}
// form validation 
function checkFields() {
	missinginfo = "";
	if(document.contact.name.value == "") {
	missinginfo += "\n Le champs suivant est vide: Nom";
	}
	if (document.contact.company.value == "") {
	missinginfo += "\n Le champs suivant est vide: Companie";
	}
	if (document.contact.phone.value == "") {
	missinginfo += "\n Le champs suivant est vide: Numero de telephone";
	}
	if (document.contact.email.value == "") {
	missinginfo += "\n Le champs suivant est vide: Adresse courriel";
	}
	if (document.contact.message.value == "") {
	missinginfo += "\n You have not entered: Message";
	}
	if(missinginfo != "") {
		missinginfo ="_____________________________\n" +
		missinginfo + "\n_____________________________" +
		"\nS.V.P. Completez le formulaire et soumettez-le de nouveau.";
		alert(missinginfo);
		return false;
		}

	}
// text size
var min=8;
var max=18;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
   var q = document.getElementsByTagName('li');
   for(i=0;i<q.length;i++) {
      if(q[i].style.fontSize) {
         var s = parseInt(q[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      q[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
   var q = document.getElementsByTagName('li');
   for(i=0;i<q.length;i++) {
      if(q[i].style.fontSize) {
         var s = parseInt(q[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      q[i].style.fontSize = s+"px"
   }   
}
function defaultFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=12) {
         s = 12;
      }
      p[i].style.fontSize = s+"px"
   }
   var q = document.getElementsByTagName('li');
   for(i=0;i<q.length;i++) {
      if(q[i].style.fontSize) {
         var s = parseInt(q[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=12) {
         s = 12;
      }
      q[i].style.fontSize = s+"px"
   }
}