// JavaScript Document
//checks to see if email entered is the same as the confirm email entered
function confirmEmail(one, two)
{
  var answer = true;
  //window.alert ("In confirmEmail():");
  lengthOne=one.length;
  //window.alert ("Length of one is: " + lengthOne);
  lengthTwo=two.length;
  //window.alert ("Length of two is: " + lengthTwo); 
  if (lengthOne != lengthTwo)
  {
	  answer = false;
  }
  else  // they are the same length
  {
	  // if characters are equal return true
	  // if any character not the same, return false
	  theLoop:
	  for (var i = 0; i < lengthOne-1; i++)
	  {
		  if (one.charAt(i) != two.charAt(i) ) // are they different
		  {
			   answer = false;
			   break theLoop;
		  }
	  }

  }
  return answer;
}
