// JavaScript Document

Event.observe ( window, 'load', showmap_init);

function showmap_init() {
	$('showmap').observe('click', showmap.bindAsEventListener($('showmap')));
	$('map_close').observe('click', closemap.bindAsEventListener($('map_close')));
	$$('.submit_form').each( function(n) { n.observe('click',submit_form.bindAsEventListener(n)); } );
	$$('.error').each( function(n) { n.observe('keydown',error_remove.bindAsEventListener(n)); } );
}

function showmap(event) {
	Event.stop(event);
	$('map').setStyle({display:'block'});
}

function closemap(event) {
	Event.stop(event);
	$('map').setStyle({display:'none'});
}

function submit_form(event) {
	Event.stop(event);
	$('frmContacts').submit();
}

function error_remove(event) {
	this.setStyle({border:'solid #333333 1px'});
}
