// JavaScript Document

function checkEmail() {
		var problem = 'No'
		
		if (document.emailform.fname.value.length <= 0) {
			document.emailform.fname.value = "** First Name **"
			document.emailform.fname.focus()
			problem = 'Yes'	
		} else if (document.emailform.fname.value == "** First Name **") {
		    document.emailform.fname.value = "** First Name **"
			document.emailform.fname.focus()
			problem = 'Yes'
		}

		if (document.emailform.lname.value.length <= 0) {
			document.emailform.lname.value = "** Last Name **"
			document.emailform.lname.focus()
			problem = 'Yes'	
		} else if (document.emailform.lname.value == "** Last Name **") {
		    document.emailform.lname.value = "** Last Name **"
			document.emailform.lname.focus()
			problem = 'Yes'
		}
		
		if (document.emailform.email.value.length <= 0) {
			document.emailform.email.value = "** Email **"
			document.emailform.email.focus()
			problem = 'Yes'	
		} else if (document.emailform.email.value == "** Email **") {
		    document.emailform.email.value = "** Email **"
			document.emailform.email.focus() 
			problem = 'Yes'
		}		
		
		if (document.emailform.email2.value.length <= 0) {
			document.emailform.email2.value = "** Email **"
			document.emailform.email2.focus()
			problem = 'Yes'	
		} else if (document.emailform.email2.value == "** Email **") {
		    document.emailform.email2.value = "** Email **"
			document.emailform.email2.focus()
			problem = 'Yes'
		}
		
		/*if (document.emailform.subject.value.length <= 0) {
			document.emailform.subject.value = "** Subject **"
			document.emailform.subject.focus()
			problem = 'Yes'	
		} else if (document.emailform.subject.value == "** Subject **") {
		    document.emailform.subject.value = "** Subject **"
			document.emailform.subject.focus()
			problem = 'Yes'
		}
		
		if (document.emailform.message.value.length <= 0) {
			document.emailform.message.value = "** Message **"
			document.emailform.message.focus()
			problem = 'Yes'	
		} else if (document.emailform.message.value == "** Message **") {
		    document.emailform.message.value = "** Message **"
			document.emailform.message.focus()
			problem = 'Yes'
		}
		*/
	
		
		if (document.emailform.email.value != document.emailform.email2.value) {
			problem = 'Email'	
		}
		
		
		if (problem == 'No') {
			return true;
		} else if (problem == 'Yes') { 
			alert ("Please be sure to complete all require fields.")
			return false;
		} else if (problem == 'Email') {
		    alert ("The e-mail confirmation does not match. Please double check the e-mail fields.")
			return false;
		}
		alert('hello');
	}		



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

