﻿     var IE5 = (document.getElementById && document.all) ? true : false;
     var W3C = (document.getElementById) ? true : false;
     var currID = null, preID = null; xoff = 0, yoff = 0; zctr = 0; totz = 0;

     function trackmouse(evt) {

         if ((currID != null)) {
             var x = (IE5) ? event.clientX + document.body.scrollLeft : evt.pageX;
             var y = (IE5) ? event.clientY + document.body.scrollTop : evt.pageY;
             currID.style.left = x + xoff + 'px';
             currID.style.top = y + yoff + 'px';
             return false;
         }
     }

     function stopdrag() {
         currID = null;
         NS6bugfix();
     }

     function grab_id(evt) {
         xoff = parseInt(evt.style.left) - ((IE5) ? event.clientX + document.body.scrollLeft : evt.pageX);
         yoff = parseInt(evt.style.top) - ((IE5) ? event.clientY + document.body.scrollTop : evt.pageY);
         currID = evt;

     }

     function NS6bugfix() {
         if (!IE5) {
             self.resizeBy(0, 1);
             self.resizeBy(0, -1);
         }
     }

     if (W3C) document.onmousemove = trackmouse;
     if (W3C) document.onmouseup = stopdrag;
     if (!IE5 && W3C) window.onload = NS6bugfix;


     function hiddiv(blah) {
         blah.style.display = "none";
     }
     function showdiv(blah) {
         blah.style.display = "block";
         blah.style.left = window.event.clientX - 100;
         blah.style.top = window.event.clientY - 500;

         if (preID != null && preID != blah) {
             preID.style.display = "none";
         }
         preID = blah;

     } 

