function ajaxify(frm) {
	frm.addEvent('submit', function(e) {
		new Event(e).stop();		
		modalbox.open();
		this.set('send', {
			url: this.action,
			method: 'get',
			evalScripts: true,
			onRequest: function() {
					modalbox.open();
				},
			onSuccess: function(responseText, responseXML) {
					modalbox.setcontent(responseText);
				}
		})
		this.send();
	});
}
function initforms() {
	// redirect form action to ajax
	$('emailfrm').action  = "/contact/ajax.asp";
	// ajaxify form submission and add modal box response
	ajaxify($('emailfrm'));
}
function resetfrm(frm) {
	document.forms[frm].reset();
}
window.addEvent('domready', initforms);