/* 
Function List:
   xCoord(id)
      Returns the x-coordinate of the object with id with the value id

   yCoord(id)
      Returns the y-coordinate of the object with id with the value id

   placeIt(id, x, y)
      Places the id object at the coordinates (x,y)

   shiftIt(id, dx, dy)
      Moves the id object dx pixels to the right and dy pixels down

   winWidth()
      Returns the width of the interior browser window in pixels

   winHeight()
      Returns the height of the interior browser window in pixels

*/

function xCoord(id) {
	object=document.getElementById(id);
	xc=parseInt(object.style.left);
	return xc;
}

function yCoord(id) {
	object=document.getElementById(id);
	yc=parseInt(object.style.top);
	return yc;
}

function placeIt (id, x, y) {
	object=document.getElementById(id);
	object.style.left=x+"px";
	object.style.top=y+"px";
}

function shiftIt(id, dx, dy) {
	object=document.getElementById(id);
	object.style.left=xCoord(id)+dx+"px";
	object.style.top=yCoord(id)+dy+"px";
}

function winWidth() {
	if (window.innerWidth) return window.innerWidth;
	else if (document.documentElement) return document.documentElement.offsetWidth;
	else if (document.boy.clientWidth) return document.body.clientWidth;
}

function winHeight() {
	if (window.innerHeight) return window.innerHeight;
	else if (document.documentElement) return document.documentElement.offsetHeight;
	else if (document.boy.clientHeight) return document.body.clientHeight;
}
