 var newwindow;
function popwindow(url)
{
	newwindow=window.open(url,'name','height=600,width=800');
	if (window.focus) {newwindow.focus()}
}

function isEmpty (strng, message) {
	var error = "";
	if (strng == "") {
		error = message;
	}
	return error;
}

function checkForm (formName) {
    var why = "";
	
	theForm = document.forms[formName];
	
	if (formName == "contact") {
		why += isEmpty(theForm.name.value, "Enter your name.\n");
		why += isEmpty(theForm.email.value, "Enter your email address.\n");
		why += isEmpty(theForm.comments.value, "Enter some comments.\n");
	}
	
	if (why != "") {
       alert(why);
       return false;
    }
	return true;
}