     @hideFrame("frame-id-3")
     
   showFrame: (img_id) ->
+    #console.log("Frame shifted to #{img_id}"
     @currentFrame  =  @imageSet.getFrameFromElement(img_id)
     document.getElementById(img_id).style.visibility="visible"
+
    
   hideFrame: (img_id) ->
     document.getElementById(img_id).style.visibility="hidden"

  # TODO provisional handle to frames
  elements:
    'input[name="selected-artifact"]': 'selectedArtifactRadios'
    'img.frame-id-1': 'firstFrame'
    'img.frame-id-2': 'secondFrame'
    'img.frame-id-3': 'thirdFrame'
    'img.frame-id-4': 'fourthFrame'
  
  constructor: ->

    super
   
    #this populates 4 image frames 
    @imageSet = new ImageSet()
    #TODO 
    @currentFrame  =  @imageSet.getFrameFromElement('frame-id-1')

    
    console.log  "Current frame #{@currentFrame .val}"

    # provisional default case of artifact subtype
    artifactSubtype = "other"



  populateImageSet: =>
    @imageFrames = new Array()
    for i in [0..3] by 1
      frame = new ImageFrame("frame-id-#{i}", i, "", "")
      @imageFrames[i] = frame
    #TODO 
    @imageFrames

  getFrameFromElement: (elementId) => 
    frame = _.findWhere(@imageFrames, elementId: elementId)

  getFrameSeqNumberFromElement: (elementId) => 
     debugger
     getFrameFromElement(elementId).seqNumber
        
#TODO move to model
class ImageFrame
