﻿// JScript File


function Trim(strText) { 
	if (strText != null) {
		// this will get rid of leading spaces 
		while (strText.substring(0,1) == ' ') 
		    strText = strText.substring(1, strText.length);

		// this will get rid of trailing spaces 
		while (strText.substring(strText.length-1,strText.length) == ' ')
			strText = strText.substring(0, strText.length-1);
	}
	return strText;
}


//This function will find the left and top absolute position of a control
function findPos(obj)
{
    var curleft = curtop = 0;
    if (obj.offsetParent) 
    {
        do 
        {
            curleft += obj.offsetLeft;
            curtop += obj.offsetTop;
        }   while (obj = obj.offsetParent);
    }
    return [curleft,curtop];
}
