<!--
// Custom API by Danny Goodman (http://www.dannyg.com)

//functions
/**************************

	get_object() -- convert object name string or object reference 
	into valid object reference

***************************/
function get_object(obj)
{
	var the_object;
	var is_netscape_old = document.layers?1:0;
	if (typeof obj == "string")
	{
		if (is_netscape_old)
		{
			the_object = eval("document.layers" + obj);
			
			
		}
		else
		{
			the_object = document.getElementById(obj);
		}	
	}
	else
	{
		the_object = obj;
	}
	return the_object;

}

/**************************

	move_to() -- move object to specific (x,y) pixel coordinate

***************************/
function move_to(obj,x,y)
{
	var the_object = get_object(obj);
	if (is_ie)
	{
		the_object.style.pixelLeft = x;
		the_object.style.pixelTop = y;
	}	
	else
	{
		the_object.style.left = x + "px"; 
		the_object.style.top = y + "px";
	}

}

/**************************

	move_by() -- move object by specific x and/or y number of pixels

***************************/
function move_by(obj,delta_x,delta_y)
{
	var the_object = get_object(obj);
	if (is_ie)
	{

		the_object.style.pixelLeft += delta_x;
		the_object.style.pixelTop += delta_y;
	}	
	else
	{
		temp = the_object.style.left;
		curr_x = temp.substring(0, temp.indexOf("px"));
		new_x = parseInt(curr_x) + parseInt(delta_x);
		the_object.style.left = new_x + "px";
					
		temp = the_object.style.top;
		curr_y = temp.substring(0, temp.indexOf("px"));
		new_y = parseInt(curr_y) + parseInt(delta_y);
		the_object.style.top = new_y + "px";
	}

}

/**************************

	set_z_index() -- set z order of an object

***************************/
function set_z_index(obj,z)
{
	var the_object = get_object(obj);
	the_object.style.zIndex = z;

}

/**************************

	show() -- make object visible

***************************/
function show(obj)
{
	var the_object = get_object(obj);
	the_object.style.visibility = "visible";
}

/**************************

	hide() -- make object invisible

***************************/
function hide(obj)
{
	var the_object = get_object(obj);
	the_object.style.visibility = "hidden";

}

/**************************

	get_x() -- get the x coordinate (left edge) of an object

***************************/
function get_x(obj)
{
	var the_object = get_object(obj);
	if (is_ie)
	{
		return the_object.style.pixelLeft;
	}	
	else
	{
		string = the_object.style.left;
		return string.substring(0, string.indexOf("px"));
	}

}

/**************************

	get_y() -- get the y coordinate (top edge) of an object

***************************/
function get_y(obj)
{
	var the_object = get_object(obj);
	if (is_ie)
	{
		return the_object.style.pixelTop;
	}	
	else
	{
		string = the_object.style.top;
		return string.substring(0, string.indexOf("px"));
	}
}

//-->