/**
* JS - getElementById
* funktion : setzt funktion getElementById wenn im momentanen browser nicht standardmaessig unterstuetzt
*
* @author kristof lipfert
* @copyright 2001 2002 kristof lipfert duesseldorf all rights reserved kl@
* @version $Id: getelementbyid.js,v 1.2 2006/04/22 08:15:52 erik Exp $
*
*/
if( !document.getElementById ){

    function getElementById(id_var){
        if( document.all )
            return document.all[id_var];
        else if( document.ids ){
            if( !getLayerById[id_var] ) doLayerArray();
            return getLayerById[id_var];
        }
    }

    document.getElementById = window.getElementById;

    if( document.ids ){
        var getLayerById = [];

        function doLayerArray(){ 
            with( [window.document] ){
                while( length ){
                    with( shift() ){
                        for( i=0; i<layers.length; i++){
                            getLayerById[layers[i].id] = layers[i].style = layers[i];
                            unshift(layers[i].document);
                        }
                    }
                }
            }
        }
        window.onload = function(){
            doLayerArray();
        }
    }
}
