/**
 * Counter updater
 * count letter and check if more then maximum
 * @param text
 * @param output
 * @param max text length
 */

function updateCounter(aText, aMonitor, aMaxTextLength)
{
    var counter = aMaxTextLength - aText.length;

    if( aMonitor != undefined ){
        aMonitor.innerHTML = counter;
	
        if (counter < 0) 
            aMonitor.className = " red";
        else 
            aMonitor.className = "";
    }
}

function showExpertInfoBox(aParent, aBox)
{
    var position = aParent.offset();
    var left = position.left;
    var top = position.top;

    left = left - aBox.width() - 20;

    aBox.css('top', top +'px');
    aBox.css('left', left +'px');
   
    aBox.show();
}

function hideExpertInfoBox(aParent, aBox)
{
    aBox.hide();
}
