function message(text) {
	status=text;
	return true;
}


//place two elements at the same location
function alignElements(stillObj, movingObj){
	var args = alignElements.arguments;
	stillObj = getObject(args[0]);
	var x = getGrossOffsetLeft(stillObj);
	var y = getGrossOffsetTop(stillObj);
	for(var i=1; i<args.length; i++){
		movingObj = getObject(args[i]);	
		shiftTo(movingObj, x, y);
	}
}



//Determining content area properties
function getInnerHeight(){
	if(window.innerHeight) {
		return innerHeight;
	} else {
		return document.body.clientHeight;
	}
}

function getInnerWidth(){
	if(window.innerWidth) {
		return innerWidth;
	} else {
		return document.body.clientWidth;
	}
}


//Finding where elements are
function getGrossOffsetLeft(elem) {
	var offset = 0;
	while(elem) {
		offset += parseInt(elem.offsetLeft);
		elem = elem.offsetParent;
	}
	return offset;
}
function getGrossOffsetTop(elem) {
	var offset = 0;
	while(elem) {
		offset += parseInt(elem.offsetTop);
		elem = elem.offsetParent;
	}
	return offset;
}



//API for DHTML, adapted from Danny Goodman's Javascript Bible

if(!document.getElementById){
  alert("You should upgrade to Opera 5, Netscape 6, IE 5, or better.  Parts of this site may not work.");
}

//converts an id string to the corresponding object, if neccessary
function getObject(obj){
  if (typeof obj == "string"){
    return document.getElementById(obj);
  } else {
    return obj;
  }
}

//places an object at the specified coordinates
function shiftTo(obj, x, y){
  var theObj = getObject(obj);
  theObj.style.left = x;
  theObj.style.top = y;
}

//moves an object by the specified amount
function shiftBy(obj, deltaX, deltaY){
  var theObj = getObject(obj);
  theObj.style.left = parseInt(theObj.style.left) + deltaX;
  theObj.style.top = parseInt(theObj.style.top) + deltaY;
}

//Sets the z index
function setZIndex(obj, zOrder) {
  var theObj = getObject(obj);
  theObj.style.zIndex = zOrder;
}

//Sets the background color of an object
function setBGColor(obj, color) {
  var theObj = getObject(obj);
  theObj.style.backgroundColor = color;
}

//makes an object visible
function show(obj){
  var theObj = getObject(obj);
  theObj.style.visibility = "visible";
}

//makes an object invisible
function hide(obj){
  var theObj = getObject(obj);
  theObj.style.visibility = "hidden";
}

//retrieve the x coordinate of a positionable object
function getObjectLeft(obj) {
  var theObj = getObject(obj);
  return parseInt(theObj.style.left);
}

//retrieve the y coordinate of a positionable object
function getObjectTop(obj) {
  var theObj = getObject(obj);
  return parseInt(theObj.style.top);
}
	