// NeuralyS JS Library (v1.oo) 

var d = document;
var ie = document.all;
var newx = 0;
var newy = 0;
var speed = 25;

var width = ie ? d.body.offsetWidth : innerWidth;
var height = ie ? d.body.offsetHeight : innerHeight;

function bbn_center(ob, x)
 { nwidth = ie ? d.body.offsetWidth : innerWidth;
   if (ie) { ie[ob].style.left = (nwidth-x)>>1; }
   else {  d.getElementById(ob).style.left = (nwidth-x)>>1; }
 }

function tempo(i)
 { var rt = speed > 20 ? i : i<<2;
   return ie ? rt : rt << 1;
 }

function bbn_show(ob)
 { if (ie) { ie[ob].style.visibility='visible'; }
   else { d.getElementById(ob).style.visibility='visible'; }
 }

function bbn_hide(ob)
 { if (ie) { ie[ob].style.visibility='hidden'; }
   else { d.getElementById(ob).style.visibility='hidden'; }
 }

function bbn_moveTo(ob, nx, ny)
 { if (ie) { ie[ob].style.top=parseInt(ny); ie[ob].style.left=parseInt(nx); }
   else { d.getElementById(ob).style.left=nx; d.getElementById(ob).style.top=ny; }
 }

function bbn_moveBy(ob, nx, ny)
 { if (ie) { ie[ob].style.top = parseInt(ie[ob].style.top)+ny; 
 ie[ob].style.left = parseInt(ie[ob].style.left)+nx; }
   else { d.getElementById(ob).style.left= d.getElementById(ob).style.left+nx;
   d.getElementById(ob).style.top= d.getElementById(ob).style.top+ny;}
 }

function bbn_getX(ob)
 { return (ie) ? ie[ob].style.left : d.getElementById(ob).style.left;
 }
 
function bbn_getY(ob)
 { return (ie) ? ie[ob].style.top : d.getElementById(ob).style.top;
 } 

function getSpeed()
 { var ta=new Date(); var tb=new Date(); tma = ta.getTime(); 
   tmb = tb.getTime(); i=0; while((tmb-tma)<200) { 
   i++; tb = new Date(); tmb = tb.getTime(); }
   return Math.round((ie ? i : i*10)/200);
 }
 
function bbn_clip(ob, na, nb, nc, nd)
 { clp = 'rect('+nb+' '+nc+' '+nd+' '+na+')';
   if (ie) { ie[ob].style.clip = clp;  }
   else { d.getElementById(ob).style.clip = clp; }
 }
 
 function mouse(e)
  { newx = (ie) ? event.clientX+d.body.scrollLeft : e.pageX;
    newy = (ie) ? event.clientY+d.body.scrollTop  : e.pageY;
  }  
 
 function capture()
  { if (!ie) d.captureEvents(Event.MOUSEMOVE); d.onmousemove=mouse; }
