// object positioning by Danny Goodman (http://www.dannyg.com)

var isIE4
var insideWindowWidth
var range = ""
var styleObj = ""
isIE4 = true
range = "all."
styleObj = ".style"

function getObject(obj) {
	var theObj
	if (typeof obj == "string") { theObj = eval("document." + range + obj + styleObj) } 
	else { theObj = obj }
	return theObj
}

function shiftTo(obj, x, y) {
	var theObj = getObject(obj)
	theObj.pixelLeft = x
	theObj.pixelTop = y
}

function shiftBy(obj, deltaX, deltaY) {
	var theObj = getObject(obj)
	theObj.pixelLeft += deltaX
	theObj.pixelTop += deltaY
}

function makeIndex(obj, zOrder) {
	var theObj = getObject(obj)
	theObj.zIndex = zOrder
}

function setBGColor(obj, color) {
	var theObj = getObject(obj)
	theObj.backgroundColor = color
}

function show(obj) {
	var theObj = getObject(obj)
	theObj.visibility = "visible"
}

function hide(obj) {
	var theObj = getObject(obj)
	theObj.visibility = "hidden"
}

function getObjectLeft(obj)  {
	var theObj = getObject(obj)
	return theObj.pixelLeft
}

function getObjectTop(obj)  {
	var theObj = getObject(obj)
	return theObj.pixelTop
}

function showProps(o, objName) {
	var result = ""
	count = 0
	for (var i in o) {
		result += o + "." + i + "=" + o[i] + "\n"
		count++
		if (count == 25) {
			alert(result)
			result = ""
			count = 0
		}
	}
	alert(result)
}
