﻿// JScript File

	function findPosX(obj)
	{
		var curleft = 0;
		if (obj.offsetParent)
		{
			while ((obj!=null) && (obj.offsetParent))
			{
				if (obj.style.position != 'absolute')
				{
					curleft += obj.offsetLeft;
					obj = obj.offsetParent;
				}
				else
				{
					obj = null;
				}
			}
		}
		else if (obj.x)
			curleft += obj.x;
		return curleft;
	}
	
	function findPosY(obj)
	{
		var curtop = 0;
		if (obj.offsetParent)
		{
			while ((obj!=null) && (obj.offsetParent))
			{
				if (obj.style.position != 'absolute')
				{
					curtop += obj.offsetTop
					obj = obj.offsetParent;
				}
				else
				{
					obj = null;
				}
			}
		}
		else if (obj.y)
			curtop += obj.y;
		return curtop;
	}
