if (!window.XMLHttpRequest)
 window.XMLHttpRequest = function() {
  return new ActiveXObject('Microsoft.XMLHTTP');
 }

window.onload = function() {
 ass = document.getElementsByTagName('a');
 for (i=0; i<ass.length; i++)
  ass[i].onfocus = function() {
   this.blur();
  }

}

var dayBox = {

  b1: false,
  b2: false,
  ct: false,

 init: function() {
  dayBox.b1 = new Element('div',{id:'dayBoxFrame'});
  dayBox.b1.hide();
  dayBox.b1.onclick = function() { dayBox.close(); }
  document.body.appendChild(dayBox.b1);

  dayBox.b2 = new Element('div',{id:'dayBox'});
  dayBox.b2.hide();
  document.body.appendChild(dayBox.b2);

  dayBox.ct = new Element('iframe',{frameBorder:'none',scrolling:'no'});
  dayBox.ct.hide();
  dayBox.b2.update(dayBox.ct);

  return false;
 },

 make: function(uri) {

  dayBox.b1.appear({from:0.0,to:0.5,duration:0.2});
  dayBox.ct.hide();
  dayBox.b2.show();

  dayBox.ct.src = uri;
  dayBox.ct.appear({from:0.0,to:1.0,duration:0.2,delay:0.2});

  return false;
 },

 close: function() {

  dayBox.b1.fade({from:0.5,to:0.0,duration:0.2,afterFinish:function(){dayBox.b1.hide();}});
  dayBox.b2.fade({from:1.0,to:0.0,duration:0.4,afterFinish:function(){dayBox.b2.hide();}});
  dayBox.ct.hide();
  dayBox.ct.src = '';

  return false;
 },

 ver: 0.1
};
