function getThing(idname) { var thing = null; if (document.getElementById) thing = document.getElementById(idname); else if (document.all) thing = document.all[idname]; else if (document.layers) thing = document.layers[idname]; return thing; }