function jbb_remote(){};

jbb_remote.addEvent = function( obj, type, fn ){
  try{
    if (obj.addEventListener)
      obj.addEventListener( type, fn, false );
    else if (obj.attachEvent)
    {
      obj["e"+type+fn] = fn;
      obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
      obj.attachEvent( "on"+type, obj[type+fn] );
    }
  }catch(e){}
}

jbb_remote.addEvent(window,'load',init);

function init(){
  document.getElementById('_price').innerHTML     = jbb_remote.price;
  document.getElementById('_duration').innerHTML  = jbb_remote.duration;
}

function put_price(d){
  try{
  jbb_remote.price = d.price;
  jbb_remote.duration = d.duration;
  }catch(e){}
}
