retired two functions that can be replaced with esri utility function and a jquery function