function verifyRequired() {
	var msg='';
	if (document.addSurvey.firstName.value == "") {
		msg +="The First Name field is required.\n";
	}
	if (document.addSurvey.lastName.value == "") {
		msg +="The Last Name field is required.\n";
	}
	if (document.addSurvey.title.value == "") {
		msg +="The Title field is required.\n";
	}
	if(!isEmail(document.addSurvey.email.value)) {
		msg +="The Email field is invalid.\n";
	}
	if (document.addSurvey.company.value == "") {
		msg +="The Company field is required.\n";
	}
	if(msg != '') {
		alert(msg);
		return false;
	}
	return true;
}

function verifyRequiredNewsletter() {
	var msg='';
	if (document.theform.firstName.value == "") {
		msg +="The First Name field is required.\n";
	}
	if (document.theform.lastName.value == "") {
		msg +="The Last Name field is required.\n";
	}
	if(!isEmail(document.theform.email.value)) {
		msg +="The Email field is invalid.\n";
	}
	if(msg != '') {
		alert(msg);
		return false;
	}
	return true;
}

function isEmail(email) {
	var format = /^[0-9a-zA-Z]+([-_.\&]?[0-9a-zA-Z])*@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4}$)/;
	return format.test(email);
}

function swapImage(imgName,imgSrc) {
	document.images[imgName].src=imgSrc;
}

