<!-- Need to be special for the view side -->

function setSelectedDate(baseName, theMonth, theDate, theYear)
{
    var dateItem = document.getElementById(baseName + "_year");
    
    if (dateItem)
    {
        selectOption(dateItem, theYear + ".0");
    }
    
    dateItem = document.getElementById(baseName + "_month");
    
    if (dateItem)
    {
        selectOption(dateItem, theMonth + ".0");
    }
    
    dateItem = document.getElementById(baseName + "_date");
    
    if (dateItem)
    {
        selectOption(dateItem, theDate);
    }

    hideCalendar();
}

function getOffsetTop(input)
{
    var totOffset = 0;
    
    do 
    {
        if (input.tagName.toLowerCase() != "tr")
        {
            totOffset += input.offsetTop;
        }
        
        input = input.parentNode;
    }
    while (input.tagName.toLowerCase() !="body")
    
    return totOffset;
}

function getOffsetLeft(input)
{
    var totOffset = 0;
    
    do 
    {
        if (input.tagName.toLowerCase() != "tr")
        {
            totOffset += input.offsetLeft;
        }
        
        input = input.parentNode;
    }
    while (input.tagName.toLowerCase() != "body")
    
    return totOffset;
}

<!-- end -->