var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
 function getRef(id)
    {
        if (isDOM) return document.getElementById(id);
        if (isIE4) return document.all[id];
        if (isNS4) return document.layers[id];
    }
    function getStyle(id)
    {
        return (isNS4 ? getRef(id) : getRef(id).style);
    }




