// JavaScript Document

<!-- EMAIL FORM VALIDATION BEGIN
function verify() {
var themessage = "You are required to complete the following fields: ";
if (document.form.firstname.value=="") {
themessage = themessage + "*First Name* ";
}
if (document.form.lastname.value=="") {
themessage = themessage + "*Last Name* ";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form.submit();
}
else {
alert(themessage);
return false;
   }
}
//  EMAIL FORM VALIDATION END -->

<!-- POP UP BEGIN
function showPopUp(el) {
var cvr = document.getElementById("cover")
var dlg = document.getElementById(el)
cvr.style.display = "block"
dlg.style.display = "block"
if (document.body.style.overflow = "visible") {
cvr.style.width = "100%"
cvr.style.height = "100%"
}
}
function closePopUp(el) {
var cvr = document.getElementById("cover")
var dlg = document.getElementById(el)
cvr.style.display = "none"
dlg.style.display = "none"
document.body.style.overflowY = "visible"
}
//  POP UP END -->


<!-- CHANGE FONT SIZE BEGIN
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 h1 = document.getElementsByTagName('h1');
   for(i=0;i<h1.length;i++) {
 
      if(h1[i].style.fontSize) {
         var s = parseInt(h1[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 24;
      }
      if(s!=max) {
 
         s += 1;
      }
      h1[i].style.fontSize = s+"px"
 
   }
   
   var h2 = document.getElementsByTagName('h2');
   for(i=0;i<h2.length;i++) {
 
      if(h2[i].style.fontSize) {
         var s = parseInt(h2[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 14;
      }
      if(s!=max) {
 
         s += 1;
      }
      h2[i].style.fontSize = s+"px"
 
   }
   
   var ul = document.getElementsByTagName('ul');
   for(i=0;i<ul.length;i++) {
 
      if(ul[i].style.fontSize) {
         var s = parseInt(ul[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 12;
      }
      if(s!=max) {
 
         s += 1;
      }
      ul[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 h1 = document.getElementsByTagName('h1');
   for(i=0;i<h1.length;i++) {
 
      if(h1[i].style.fontSize) {
         var s = parseInt(h1[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 24;
      }
      if(s!=min) {
 
         s -= 1;
      }
      h1[i].style.fontSize = s+"px"
 
   }
   
   var h2 = document.getElementsByTagName('h2');
   for(i=0;i<h2.length;i++) {
 
      if(h2[i].style.fontSize) {
         var s = parseInt(h2[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 14;
      }
      if(s!=min) {
 
         s -= 1;
      }
      h2[i].style.fontSize = s+"px"
 
   }
   
   var ul = document.getElementsByTagName('ul');
   for(i=0;i<ul.length;i++) {
 
      if(ul[i].style.fontSize) {
         var s = parseInt(ul[i].style.fontSize.replace("px",""));
      } else {
 
         var s = 12;
      }
      if(s!=min) {
 
         s -= 1;
      }
      ul[i].style.fontSize = s+"px"
 
   }
}
//  CHANGE FONT SIZE END -->
