function attachOnloadEvent( functionName )
{
    if ( window.attachEvent )
    {
        window.attachEvent( 'onload', functionName );
    }
    else if ( window.addEventListener )
    {
        window.addEventListener( 'load', functionName, false );
    }
}

function showSitemapChildren( targetname, node_id )
{
}

function abSendAJAXPostRequest( url, parameters, responseHandler, responseParameters )
{
    var xmlHttp = null;

    /* Mozilla, IE 7 */
    if( typeof XMLHttpRequest != 'undefined' )
    {
        xmlHttp = new XMLHttpRequest();
    }
    if (!xmlHttp)
    {
        /* IE 6 */
        try {
            xmlHttp  = new ActiveXObject( "Msxml2.XMLHTTP" );
        } catch(e) {
            try {
                xmlHttp  = new ActiveXObject( "Microsoft.XMLHTTP" );
            } catch(e) {
                xmlHttp  = null;
            }
        }
    }

    if (xmlHttp)
    {
        xmlHttp.open( 'POST', url, true );
        xmlHttp.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
        xmlHttp.onreadystatechange = function()
            {
                if ( xmlHttp.readyState == 4 )
                {
                    if( responseHandler === undefined )
                    {
                        debug( "Data successfuly transfered!" );
                    }
                    else
                    {
                        responseHandler( xmlHttp.responseText, responseParameters );
                    }
                }
            };
        if ( !parameters )
        {
            parameters = null;
        }
        xmlHttp.send( parameters );
    }
}

function addResultToIDTagHandler( result, targetIDString )
{
    if ( document.getElementById )
    {
        if ( document.getElementById( targetIDString ) )
        {
            document.getElementById( targetIDString ).innerHTML = result;
        }
    }
}
