function doOnload ()
{
}


function doSelectByOption (_objSelect, _szValue)
{
    var nOptions = _objSelect.options.length;
    var i;

    for (i = 0; i < nOptions; i++)
    {
        if (_objSelect.options[i].value == _szValue)
        {
            _objSelect.selectedIndex = i;
            break;
        }
    }
}

function fnGetPageOffset (_objElement)
{
    var nLeft = 0;
    var nTop  = 0;
    do
    {
        nLeft += _objElement.offsetLeft;
        nTop  += _objElement.offsetTop;
    }
    while(_objElement = _objElement.offsetParent);

    return [nLeft, nTop];
}

function fnGetAbsoluteCoords (_objElement)
{
    if (g_isMSIE || g_isMozilla || g_isOpera)
    {
        return [fnGetPageOffset (_objElement)[0], fnGetPageOffset (_objElement)[1]];// - pageLeft;
    }

    if (g_isNetscape4)
    {
        return [_objElement.pageX, _objElement.pageY];// - pageLeft;
    }
}

function fnGetWindowSize()
{
    if (g_isMSIE)
    {
        return [document.body.parentNode.offsetWidth, document.body.parentNode.offsetHeight];
    }
    if (g_isNetscape4 || g_isOpera || g_isMozilla)
    {
        return [window.innerWidth, window.innerHeight];
    }
}

function fnGetWindowScroll()
{
    if (g_isMSIE || g_isOpera7)
    {
        return [document.body.parentNode.scrollLeft, document.body.parentNode.scrollTop];
    }
    if (g_isNetscape4 || g_isOpera || g_isMozilla)
    {
        return [window.pageXOffset, window.pageYOffset];
    }
}

function doConvertLatinCyrillic (_szString)
{
    var nStringLength = _szString.length;
    var p_cIn = _szString.split('');
    var szOut = '';

    var i, cChar;
    for (i=0; i < nStringLength; i++)
    {        //c0 259
        cChar = p_cIn[i].charCodeAt(0);

        if (cChar >= 0xc0 && cChar <= 0x259)
        {
            szOut += String.fromCharCode (cChar + 0x350);
        }
        else
        {
            szOut += p_cIn[i];
        }
    }

    return szOut;
}


