Common Custom tasks
Common_CustomTasks_CSharp\EmbeddedResourcesTask_CSharp\Resources\JavaScript\CustomJavaScript.js
 Copyright 2010 ESRI
 
 All rights reserved under the copyright laws of the United States
 and applicable international laws, treaties, and conventions.
 
 You may freely redistribute and use this sample code, with or
 without modification, provided you include the original copyright
 notice and use restrictions.
 
 See <a href="http://help.arcgis.com/en/sdk/10.0/usageRestrictions.htm">the use restrictions</a>.
 

var _imageIndex;

// Changes the image displayed on the task interface
function changeImage(){
    // Toggle _imageIndex from 0 to 1 or vice versa
    _imageIndex = (_imageIndex == 0) ? 1 : 0;
    
    // Set the source of the task's image element to the URL stored
    // in the array at _imageIndex.  Note that _imageElement and
    // _imageArray are initialized via script registered in the 
    // server-side task's OnPreRender method.
    _imageElement.src = _imageArray[_imageIndex];
}