function CheckEmail(emailField){
	var passedVal = emailField.value;
	var goAhead = true;

	if (passedVal.length < 1) goAhead = confirm("You are about to add a comment without an email address. This will result in your message being attributed to 'Anonymous'.\r\rTo post as 'Anonymous', click 'OK'.\r\rTo go back and add your email address, click 'Cancel'.");

	if (goAhead && passedVal.length>0){
		notValid = passedVal!=passedVal.match(/^[^@ ]+@[^@ ]+\.[^@ .]+/);
		if (notValid) goAhead = confirm("You are about to add a comment with an invalid email address. This will result in your message being attributed to 'Anonymous'.\r\rTo post as 'Anonymous', click 'OK'.\r\rTo go back and add your correct email address, click 'Cancel'.");
	}

	if (!goAhead) emailField.focus();
	return (goAhead);
}

function TogglePictures(btn,elID){
	var el;
	if (document.getElementById) el = document.getElementById(elID);
	if (!el && document.all) el = document.all[elID];
	if (!el && document.layers) el = document.layers[elID];
	if (!el){
		alert('Sorry, you cannot currently see the pictures with your browser. Try using Internet Explorer.');
		btn.disabled=true;
		return;
	}

	if (el.style) el.style.display=(btn.value=="Hide")?"none":"";
	btn.value = (btn.value=="Hide")?"Show":"Hide";
}
