function divGetPosX(objectId)
{
	var the_style = getStyleObject(objectId);
	return parseInt(the_style.left);
} // divGetPosX

function divGetPosY(objectId)
{
	var the_style = getStyleObject(objectId);
	return parseInt(the_style.top);
} // divGetPosY

function divSetPos(objectId, the_left, the_top)
{
	var the_style = getStyleObject(objectId);
  if (document.layers)
  {
    the_style.left = the_left;
    the_style.top = the_top;
  }
  else 
  {
    the_style.left = the_left + "px";
    the_style.top = the_top + "px";  
  }
} // divSetPos

function divSetPosY(objectId, the_top)
{
	var the_style = getStyleObject(objectId);
  if (document.layers)
  {
    the_style.top = the_top;
  }
  else 
  {
    the_style.top = the_top + "px";  
  }
} // divSetPosY

function divSetWidth(objectId, w)
{
	var the_style = getStyleObject(objectId);
  if (document.layers)
  {
    the_style.width = w;
  }
  else 
  {
    the_style.width = w + "px";  
  }
} // divSetWidth

function divGetWidth(objectId, w)
{
	var the_style = getStyleObject(objectId);
  return the_style.width;
} // divGetWidth

function divMove(objectId, dx, dy)
{
	var the_style = getStyleObject(objectId);
  var the_left = parseInt(the_style.left) + dx;
  var the_top = parseInt(the_style.top) + dy;
  if (document.layers)
  {
    the_style.left = the_left;
    the_style.top = the_top;
  }
  else 
  {
    the_style.left = the_left + "px";
    the_style.top = the_top + "px";  
  }
} // divMove

function divGetContent(objectId,content)
{
	if (document.layers)
	{
		return false;
	}
	else if (document.getElementById && document.getElementById(objectId))
	{
		return document.getElementById(objectId).innerHTML;
	}
	else
	{
		return document.all[objectId].innerHTML;
  }
} // divGetContent

function divSetContent(objectId,content)
{
	if (document.layers)
	{
		var lyr = document.layers[objectId].document;
		lyr.open();
		lyr.write(content);
		lyr.close();
	}
	else if (document.getElementById && document.getElementById(objectId))
	{
		document.getElementById(objectId).innerHTML = content;
	}
	else
	{
		document.all[objectId].innerHTML = content;
  }
} // divSetContent

function divShow(objectId)
{
	var the_style = getStyleObject(objectId);
	the_style.visibility = 'visible';
} // divShow

function divHide(objectId)
{
	var the_style = getStyleObject(objectId);
	the_style.visibility = 'hidden';
} // divHide

function getStyleObject(objectId)
{
	// cross-browser function to get an object's style object given its
  if(document.getElementById && document.getElementById(objectId))
  {
		// W3C DOM
		return document.getElementById(objectId).style;
  } 
  else if (document.all && document.all(objectId))
  {
		// MSIE 4 DOM
		return document.all(objectId).style;
  } 
  else if (document.layers && document.layers[objectId])
  {
		// NN 4 DOM.. note: this won't find nested layers
		return document.layers[objectId];
  }
  else
  {
		return false;
  }
} // getStyleObject