ArcGIS API for JavaScript: VSW_Test_Map_Image_Layer_Swap (MapServer)
Built using the ArcGIS API for JavaScript