isDOM = document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isMSIE = document.all && document.all.item //Microsoft Internet Explorer 4+
isNetscape4 = document.layers //Netscape 4.*
isOpera = window.opera //Opera
isOpera5 = isOpera && isDOM //Opera 5+
isMSIE5 = isDOM && isMSIE && !isOpera //MSIE 5+
isMozilla = isNetscape6 = isDOM && !isMSIE && !isOpera

var obj;

function getDiv( layerName , parentLayerName ){
  if(isDOM){ return document.getElementById(layerName); }
  if(isMSIE){ return document.all[layerName]; }
  if(isNetscape4){ return eval('document.layers[layerName]'); }
  return false;
}

function ts( e , what , align , x ){
  mousex = e.clientX;
  mousey = e.clientY;
  pagexoff = 0;
  pageyoff = 0;
  if( isMSIE5 ){
    pagexoff = document.body.scrollLeft;
    pageyoff = document.body.scrollTop;
  }
  else{
	pagexoff = window.pageXOffset;
	pageyoff = window.pageYOffset;
  }
  if( getDiv( what ) ){
    if( isNetscape4 )
      obj = getDiv( what );
    else
      obj = getDiv( what ).style;
 	
  	if(obj){
	    leftoff = mousex - pagexoff;
		if( align=='left' )
	    	obj.left = mousex + pagexoff;
		else
			obj.left = mousex + pagexoff - x;

  
	    topoff = mousey-pageyoff;
    	  obj.top = (mousey+pageyoff) - 20;
   		
	    if(isNetscape4)
    	  obj.visibility = 'show';
	    else
    	  obj.visibility = 'visible';
	  }
   }
  return true;
}

function ts_rel( e , what , align , x ){
  mousex = e.clientX;
  mousey = e.clientY;

  pagexoff = 0;
  pageyoff = 0;
  if( isMSIE5 ){
    pagexoff = document.body.scrollLeft;
    pageyoff = document.body.scrollTop;
  }
  else{
	pagexoff = window.pageXOffset;
	pageyoff = window.pageYOffset;
  }

  if( getDiv( what ) ) {
    if( isNetscape4 )
      obj = getDiv( what );
    else
      obj = getDiv( what ).style;

  	if(obj) {
	    leftoff = mousex - pagexoff;
		if( align=='left' )
	    	obj.left = mousex + pagexoff;
		else
			obj.left = mousex + pagexoff - x;

  
	    topoff = mousey-pageyoff;
    	  obj.top = (mousey+pageyoff) - 20;
   		
	    if(isNetscape4)
    	  obj.visibility = 'show';
	    else
    	  obj.visibility = 'visible';
	  }
   }
  return true;
}

function tc(){
  if(obj){
    if(isNetscape4)
      obj.visibility = 'hide';
    else
      obj.visibility='hidden';
  }
  return true;
} 
