/*****************************************************************************
Function	:	getRealTop
Description	:	Permet d'extraire la position absolue d'un element dans la page
Author		:	Choi Tran
Create date	:	2005-12-14
******************************************************************************/
function getRealTop(pThis) {
    var xPos = pThis.offsetTop;
    var tempEl = pThis.offsetParent;
    
    while (tempEl != null) {
        xPos += tempEl.offsetTop;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

/*****************************************************************************
Function	:	getRealLeft
Description	:	Permet d'extraire la position absolue d'un element dans la page
Author		:	Choi Tran
Create date	:	2005-12-14
******************************************************************************/
function getRealLeft(pThis) {
    var xPos = pThis.offsetLeft;
    var tempEl = pThis.offsetParent;

    while (tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

function RetrieveNbSelectedItemInList(poList)
{
	var vlInd	= 0
	var vlNb	= 0
	
	for (vlInd = 0; vlInd < poList.options.length; vlInd++)
	{	
		if (poList.options[vlInd].selected)
		{
			vlNb += 1
		}
	}
	
	return(vlNb);
}

function ItemExistInList(poList, pSearchValue)
{
	var vlExist = false;
	var vlInd = 0;

	for(vlInd=0; vlInd < poList.options.length; vlInd++)
	{
		if(poList.options[vlInd].value == pSearchValue)
		{
			vlExist = true;
			break;
		}
	}
	
	return(vlExist);
}
