﻿function resetPosition(object, args)
{	
    var tb = object._element;	
    var tbposition = findPositionWithScrolling(tb);
    var xposition = tbposition[0] + 3;	
    var yposition = tbposition[1] - 193;	// 25 = textbox height + a few pixels spacing
    var ex = object._completionListElement;	if (ex)
    {		
        $common.setLocation(ex, new Sys.UI.Point(xposition, yposition));
    }
}
function findPositionWithScrolling( oElement )
{	
if( typeof( oElement.offsetParent ) != 'undefined' )
    {	
        var originalElement = oElement;
        for( 
        var posX = 0, posY = 0; 
        oElement; 
        oElement = oElement.offsetParent )
        {			
        posX += oElement.offsetLeft;			
        posY += oElement.offsetTop;			
        if( oElement != originalElement && oElement != document.body && oElement != document.documentElement )
            {				
            posX -= oElement.scrollLeft;				
            posY -= oElement.scrollTop;			
            }		
        }		
        return [ posX, posY ];
    } else {
    return [ oElement.x, oElement.y ];
    }
}


