function be() {

$(document).ready(calcpos); $(window).resize(calcpos);

}

function calcpos() {

if (this.busy) {alert('reentry detected'); return;} this.busy=1;
$("#d").css("left",Math.max(0,Math.floor(50*($("#d").offsetParent().width())/100-($("#d").width())*50/100+0.5+(0)))+"px");


$("#m").css("left",Math.max(0,Math.floor(50*($("#m").offsetParent().width())/100-($("#m").width())*50/100+0.5+(0)))+"px");


$("#m").css("top",Math.floor($("#d").position().top+100*($("#d").height())/100+0.5+(0))+"px");


this.busy=0;

}
