function sendMsg() {
	$('errors').update('');
	if(!$('name').present()){
		$('errors').update('Please provide your name');
		}
	else if (!isValidEmail($F('email'))) {
		$('errors').update('Please provide a valid email');
		}
	else if (!$('interests').present()) {
		$('errors').update('What\'s your style interest?');
		}
	else {
	$('contactform').request({
		onComplete: function(transport){
			if(!transport.responseText) {
				alert('Thank You, WITH STYLE.');
				$('contactform').reset();
				}
			else {
				$('errors').update(transport.responseText);
				}
			}
		});
	}
}
function isValidEmail(email){
    var regex = /^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/
    if (regex.test(email)) {
        return true;
    } else {
        return false;
    }
}

function mailToLink(person, domain, ext) {
	link = "mail" + "to:" + person + "@" + domain + "." + ext;
	location.href = link;
}