if(typeof Prototype == 'undefined') {
document.write('');
}
mpb_title_1 = typeof mpb_title_1 == 'string' ? mpb_title_1 : '';
mpb_title_2 = typeof mpb_title_2 == 'string' ? mpb_title_2 : '';
mpb_title_color = typeof mpb_title_color == 'string' ? mpb_title_color : '#ffffff';
mpb_title_bg_color = typeof mpb_title_bg_color == 'string' ? mpb_title_bg_color : '#71b5cf';
mpb_text_color = typeof mpb_text_color == 'string' ? mpb_text_color : '#575757';
mpb_border_color = typeof mpb_border_color == 'string' ? mpb_border_color : '#bddce2';
mpb_background_color = typeof mpb_background_color == 'string' ? mpb_background_color : '#fffbef';
mpb_font = typeof mpb_font == 'string' ? mpb_font : "Times New Roman";
mpb_width = typeof mpb_width == 'string' ? mpb_width : '170px';
mpb_count = typeof mpb_count == 'string' ? mpb_count : '10';
document.write("
");
function mpb_widget() {
if (!$('mpb_box')) setTimeout(function() { mpb_widget(); }, 200);
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
$('mpb_box').style.width = mpb_width;
$('mpb_box').style.border = "1px solid "+mpb_border_color;
$('mpb_box_2').style.border = "2px solid "+mpb_border_color;
$('mpb_widget').style.color = mpb_text_color;
$('mpb_footer').style.color = mpb_title_color;
$('mpb_widget').innerHTML = '';
$('mpb_widget').insert(""+mpb_title_1+"
"+mpb_title_2+"
");
$('mpb_widget').insert("");
var cur_month = null;
var month = 99;
sliced_reasons = reasons.slice(0,mpb_count);
sliced_reasons.each(function(reason){
var date = new Date(reason['calendar_date']);
var human_date = date.getDate();
cur_month = date.getMonth();
if(cur_month != month) {
$('mpb_reasons').down('tbody').insert("| "+months[cur_month]+" |
");
}
$('mpb_reasons').down('tbody').insert("");
$$('.mpb_tr').last().insert(" | ");
$$('.mpb_tr').last().insert("" + human_date + " | ");
$$('.mpb_tr').last().insert("" + reason['event_title'].truncate(19, '..') + " | ");
month = date.getMonth();
});
}
// setTimeout(function() {
// mpb_widget();
// }, 500);