   processForm newMessage
 
   # add the progress gif
-  if newMessage and newMessage.length <= 160
-    $("<div class=\"imsg to post-message\"></div>").text(newMessage).appendTo(".simulator-body")
-    $("#simulator textarea").val ""
-    $(".simulator-loading").css "display", "block"
-    # $(".simulator-body").css "height", $(".simulator-body").height() - 25
-    $(".simulator-body").scrollTop $(".simulator-body")[0].scrollHeight
+  if window.ussd and newMessage.length <= 182
+    appendMessage newMessage, true
+  else if newMessage.length <= 160
+    appendMessage newMessage
 
 # send new message on key press (enter)
 $("#simulator textarea").keypress (event) ->

  $(".simulator-body").html ""
  $.post(getSimulateURL(), JSON.stringify({ hangup:true })).done (data) ->


#-------------------------------------
# Event bindings

    processForm newMessage

    # add the progress gif
    if newMessage
      if window.ussd and newMessage.length <= 182
        appendMessage newMessage, true
      else if newMessage.length <= 160
        appendMessage newMessage

$("#show-simulator").hover ->
  if not moving_sim
