function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// checkData2() is for the form in the left sidebar column on every page named "SideBarForm". Only an e-mail address is "required", but a question or comment is also necessary to submit the form.
function checkData2(SideBarForm) {
	var strErrMsg = "";
	
	if (SideBarForm.question.value == '') {
		strErrMsg += " Please include your question or comment.\n\n"
	}

	if (SideBarForm.email.value == '') {
				strErrMsg += " Your e-mail address is required.\n\n"
				}
	else {	
		// test if valid email address, must have @ and .
		var checkEmail = "@.";
		var checkStr = SideBarForm.email.value;
		var EmailValid = false;
		var EmailAt = false;
		var EmailPeriod = false;
		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkEmail.length;  j++)
			{
				if (ch == checkEmail.charAt(j) && ch == "@")
				EmailAt = true;
				if (ch == checkEmail.charAt(j) && ch == ".")
				EmailPeriod = true;
			  	if (EmailAt && EmailPeriod)
					break;
			  	if (j == checkEmail.length)
					break;
			}
			// if both the @ and . were in the string
			if (EmailAt && EmailPeriod)
			{
				EmailValid = true
				break;
			}
		}
		if (!EmailValid)
		{
			strErrMsg += " Your e-mail address must contain an \"@\" symbol and a period.\n\n"
		}	
	}

	if (strErrMsg != '') {
		alert("The following omissions occured:\n\n" + strErrMsg);
		return false;
	}
	else {			
		return true;
	}				
}



