var cont = {
	overlay: false,	
	init: function() {				
		this.map_button = document.getElementById('map_button');
		this.map_close = document.getElementById('map_close');
		this.map_button.onclick = function() {
			cont.showBox(this.id);
			return false;
		};
		if(/MSIE 6/.test(navigator.userAgent)) {
			this.map_close.src = 'templates/tpl_site/images/blank.gif';
			this.map_close.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=templates/tpl_site/images/cont_close.png,sizingMethod=image)';
		}
		this.map_close.onclick = cont.hideBox;										
	},
	showBox: function(id) {
		
		this.box = document.getElementById('map_box');
		this.overlay = showOverlay();
		this.box.style.display = 'block';
		centerAbsolute(this.box);
		this.overlay.onclick = cont.hideBox;

		
	},
	callback: function(data) {
		cont.succes.style.width = cont.succes.offsetWidth + 'px';
		cont.succes.innerHTML = 'Ваше сообщение успешно отправлено';
		$(cont.form).slideUp();
	},
	hideBox: function() {
		document.body.removeChild(cont.overlay);
		cont.box.style.display = 'none';
	}
};
