document.write("<style type='text/css'>.bmp{ padding: 1px; border: 1px solid #b6b6b6; margin: .6em 0 .6em 0 !important;} .bmp a{ color: #466A8E !important; border: 0 !important; text-decoration: none !important;} .bmp a:hover{ color: #165d91 !important; border: 0 !important; text-decoration: none !important;} .bmp_header{ font-size: .9em; font-weight: bold; position: relative;} .bmp_header_text{ background: #BFCDDA !important; padding: 1em 1em 1em 1em !important;} .bmp_header_toggle{ display: block; position: absolute; top: 1em; right: 1em; font-weight: bold; cursor: pointer;} .bmp_subheader{ padding: .7em .7em .5em .7em !important; border: 0 !important; margin: 0 !important; font-size: 1.2em !important; background: #BFCDDA !important; font-weight: bold;} .bmp_subcontent{ font-size: 0.95em; line-height: 1.2em !important; margin: .15em 0 .15em 0 !important; padding: .7em !important; background: white !important; border-top: 2px solid #BFCDDA !important; border-bottom: 2px solid #BFCDDA !important; overflow: hidden; height: auto;} .bmp_subcontent p{ margin: .45em .15em .45em .15em !important; padding: 0 !important;} .bmp_subcontent_left{ float: right !important; margin: 0 0 .5em .5em !important;} .bmp img{ max-width: 150px !important; max-height: 150px !important; border: 0 !important; padding: 0 !important;} .bmp img:hover, .bmp_subcontent_left a:hover{ border: 0 !important;} .bmp_subcontent_right{ } .bmp_subcontent table{ width: auto !important;} .bmp_subcontent td{ padding: .15em !important; vertical-align: top !important;} .bmp_subcontent .td_left{ width: 10px !important; font-weight: bold !important;} .bmp_footer{ padding: .8em !important; font-size: .9em !important; text-align: right !important; background: #BFCDDA !important;} .bmp_footer a{ font-weight: bold; }</style>");

function bmp_toggle(start)
{
  var date = new Date();
  date.setTime(date.getTime()+(30*24*60*60*1000));
  var expires = "; expires="+date.toGMTString();

  var content = getNextSibling(start.parentNode);
  var header_text = getNextSibling(start);

  if(start.innerHTML == 'open')
  {
    content.style.display = 'block';
    start.innerHTML = 'close';
		header_text.style.display = 'none';
    document.cookie = "bmp_widget=true"+expires+"; path=/";
  }
  else
  {
    content.style.display = 'none';
    start.innerHTML = 'open';
		header_text.style.display = 'block';
    document.cookie = "bmp_widget=false"+expires+"; path=/";
  }
}

function getNextSibling(n){	
  var x=n.nextSibling;
  while(x.nodeType!=1){
    x=x.nextSibling;
  }
  return x;
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) {
      return c.substring(nameEQ.length,c.length);
    }
  }
  return null;
}

var bmp_widget = readCookie('bmp_widget');
if(bmp_widget == 'false')
{
  document.write('<style type=\"text/css\"> .bmp_content { display: none; } </style>'+'<a class="bmp_header_toggle" onClick="bmp_toggle(this)">open</a>');
}
else
{
  document.write('<style type=\"text/css\"> .bmp_header_text { display: none; } </style>'+'<a class="bmp_header_toggle" onClick="bmp_toggle(this)">close</a>');
}