
function alertWin(x, err) {
	h = eval("'height=" + (220 + (x * 10)) + ",width=240'");
	detail=open("","Alert",h);
	detail.document.writeln("<html>\n<title>Alert</title>\n<link href='http://www.ags-expo.com/style.css' rel='stylesheet' type='text/css'>");
	detail.document.writeln("\n<body>\n<div id='sidebar'>\n<h1>Don't Forget!</h1>");
	detail.document.writeln("\n<p><span class='bold'>The following fields are required:</span>\n<p>");
	detail.document.writeln("\n<p>")
		for (i = 0; i < x; i++){
			detail.document.write((i+1) + "." + err[i] + "<br>\n");
		}
	detail.document.writeln("&nbsp;<br></p>")
	detail.document.write("\n<form>\n<input type='button' class='submitBTN' value='close window'" + "onClick='self.close()'>" + "\n</form>" + "\n</div>\n</body>\n</html>");
}

function isValidForm1() {
	var err = new Array();
	var x=0;
	var ch = false;
	var name = document.emailme.name.value;
	var message = document.emailme.message.value;
	if (document.emailme.email.value == "" || 
		document.emailme.email.value.indexOf('@', 0) == -1 ||
		document.emailme.email.value.indexOf('.', 0) == -1){
		err[x] = " Need a valid email address.";
		x = x + 1;
	}
	if (name == ""){
		err[x] = " Please supply your name.";
		x = x + 1;
	}
	if (message == ""){
		err[x] = " Don't forget to send me a message.";
		x = x + 1;
	}
	if (x > 0){
		alertWin(x, err);
		return false;
	}
	return true;
}
