
// ******************************************************************
// * You may use this code for free on any web page provided that 
// * these comment lines and the following credit remain in the code.
// * Javascript wisdom from http://www.shanit.com
// ******************************************************************
// refered by the menu (included) files in the shtml folder 
// ******************************************************************
function xch(divid,imgPath,top,left,width,height,border)
{
 obj_info = document.getElementById(divid);
// obj_info.style.backgroundImage = imgPath;
 obj_info.src = imgPath;
 Y = obj_info.style.top;
 if (top)
    obj_info.style.top = top;
 L = obj_info.style.top;
 if (left)
    obj_info.style.left = left;
 W = obj_info.style.width;
 if (width)
    obj_info.style.width = width;
 H = obj_info.style.top;
 if (height)
    obj_info.style.height = height;		
 B = obj_info.style.border;
 if (border)
 		obj_info.style.border = border;		
}
// ...end xch

// start txtbox...
var IE = document.all?true:false;

if (!IE) 
  document.captureEvents(Event.MOUSEMOVE);

document.onmousemove = getMouseXY;

var tempX = 0;
var tempY = 0;
  
function getMouseXY(e)
{
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
    tempY = e.pageY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0;}
  if (tempY < 0){tempY = 0;}  
	
  obj_info = document.getElementById("info");
	if (obj_info)
  	{
    obj_info.style.top = (tempY) + 'px';
    obj_info.style.top = (tempY - 150) + 'px';
   	obj_info.style.left = (tempX + 10) + 'px';
  	}
  return true;
}


function alert_msg(titletext,bodytext)
{
  obj_info = document.getElementById("info");
	if (obj_info)
	  {obj_info.style.display = 'block';}

  obj_imagetitle = document.getElementById("imagetitle");
 	if (obj_imagetitle)
          {obj_imagetitle.innerHTML = titletext;}
		
  obj_imagebody = document.getElementById("imagebody");
 	if (obj_imagebody)
	  {obj_imagebody.innerHTML = bodytext;}
}

function away()
{
obj_info = document.getElementById("info");
if (obj_info)
	 obj_info.style.display = 'none';
}


function alert_msgXY(titletext,bodytext,X,Y)
{
obj_info = document.getElementById("info");
if (obj_info)
  {
  obj_info.style.top =Y;
  obj_info.style.left = X;
  }
	
obj_info = document.getElementById("info");
if (obj_info)
  obj_info.style.display = 'block';

obj_imagetitle = document.getElementById("imagetitle");
if (obj_imagetitle)
  obj_imagetitle.innerHTML = titletext;

  obj_imagebody = document.getElementById("imagebody");
if (obj_imagebody)
  obj_imagebody.innerHTML = bodytext;
}


// popup window...
function opnwnd(thisUrl,ttl,features)
{
if (window.location.href == thisUrl)
 window.close();
 window.open(thisUrl,ttl,features);
}
// ...end txtbox

