// JavaScript Document

// maximize the browser
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height);



// makes the details box follow the mouse around
function updatebox(evt) {
  mouseX = evt.pageX?evt.pageX:evt.clientX;
  mouseY = evt.pageY?evt.pageY:evt.clientY;
  var obj = MM_findObj('details').style;
  obj.left = mouseX;
  obj.top = mouseY;
}



/* function to popup a detail box when the mouse is placed over
a detail. The arguments are the details to be displayed */
function showEvent(name, time, phone, email, website, desc) {
  MM_findObj('detail_name').innerHTML = name;
  MM_findObj('detail_time').innerHTML = time;
  MM_findObj('detail_phone').innerHTML = phone;
  MM_findObj('detail_email').innerHTML = email;
  MM_findObj('detail_website').innerHTML = website;
  MM_findObj('detail_desc').innerHTML = desc;
  var obj = MM_findObj('details').style;
  obj.visibility = 'visible';
}



// hides the detail box
function hideEvent() {
  var obj = MM_findObj('details').style;
  obj.visibility = 'hidden';
}



// macromedia's functions to find an object. works great!!!
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
