var im= new Array()//set your pictures here as an array


/*This is where we add photos for the Rotating Pictures on the Homepage
Step 1.) Copy and Paste--> im[0] = 'images/picture_name.jpeg';  and put it below the last
	picture array.
Step 2.) Change the number in im[0] to the next number in line
Step 3.) Change the 'images/picture_name.jpg' to the name of the photos you want to use.
Step 4.) Save your work and re-upload the image and this file using FTP.
*/

im[0] = 'images/kids_4.png';
im[1] = 'images/lagoon.png';
im[2] = 'images/tadpols.png';
im[3] = 'images/bananna_boat.png';
im[4] = 'images/gazebo.png';

//add as many as you want, ie: im[3] = '03.jpg'; and so on
var time = 10000; // set delay in miliseconds
var q=1;
function slideI(){
document.getElementById('ima').setAttribute('src',im[q]);
q++;
if(q==im.length){q=0}
setTimeout('slideI()',time);
}
onload=function()
{setTimeout('slideI()',time)
document.getElementById("email").value = "email address";
}

function emailValidator()
{
  var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.getElementById("email").value;
	  if(reg.test(address) == false) 
	  {
      alert('Invalid Email Address');
      return false;
	  }
	  else
	  {
	  alert(address + " has been submitted.  Thank You!");
	  }
}

function fieldsPop()
{
document.getElementById("email").value = "<div id='email'>email address</div>";
}

stuHover = function() {
	var cssRule;
	var newSelector;
	for (var i = 0; i < document.styleSheets.length; i++)
		for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
			{
			cssRule = document.styleSheets[i].rules[x];
			if (cssRule.selectorText.indexOf("LI:hover") != -1)
			{
				 newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
				document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
			}
		}
	var getElm = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<getElm.length; i++) {
		getElm[i].onmouseover=function() {
			this.className+=" iehover";
		}
		getElm[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", stuHover);

