<div class="show_map">{include file='map.tpl'}</div>
if (document.body.clientWidth >640) {
document.addEventListener('DOMContentLoaded', function(event) {
var elem = null;
if (window.matchMedia("(min-width: 640px)").matches) {
elem = document.querySelector('div.show_map');
elem.parentNode.removeChild(elem);
}
});