Edit in JSFiddle

hs = new zScope.HostSurfer();
hs.register({
    id: 'cics',
    match: [{ text: "CICS", row: 5, col: 1 }],
    apply: {
        handler: function (hs) {
            if (hs.screens.length == 1) { hs.send.senter(); }
        }
    }
});
hs.register({
    id: 'bluecardLogin',
    match: [
      { text: "USERNAME", row: 19, col: 55 },
      { text: "PASSWORD", row: 20, col: 55 }
    ],
    apply: {
        fields: [
          { name: 'username', row: 19, col: 67, len: 6 },
          { name: 'password', row: 20, col: 67, len: 6 }
        ],
        render: {
            view: { template: "#loginForm" }
        },
        actions: {
            main: function (hs) { hs.send.enter(); },
            account: function (hs) { hs.send.enter(); },
            exit: function (hs) { hs.send.pf1(); }
        }
    }
});
hs.register({
    id: 'mainMenu',
    match: [{ text: "MAIN MENU", row: 1, col: 35 }],
    apply: {
    	actions: {
      	account: function(hs) { hs.data.R18C63 = "01"; hs.send.enter(); }
      }
    }
});
hs.register({
    id: 'accountMenu',
    match: [{ text: "CARDS / ACCOUNT INQUIRY", row: 1, col: 29 }],
    apply: {
    	actions: {
      	account: function(hs) { hs.data.R16C20 = "01"; hs.send.enter(); }
      }
    }
});
hs.register({
    id: 'accountInfo',
    match: [
      { text: "GENERAL ACCOUNT INFORMATION", row: 1, col: 27 },
      { text: "INQUIRY", row: 2, col: 37 }
    ],
    apply: {
      fields: [
          { name: 'address', row: 9, col: 36, len: 15 },
          { name: 'city', row: 10, col: 36, len: 15 }
      ],
      render: { view: { template: "#mapView" } },
      handler: function(hs){
        loadMap(hs.data);
      }
    }
});

// map panel functions
function loadMap(fields) {
  if (fields.address && typeof google != "undefined") {
    new google.maps.Geocoder().geocode(
      { 'address': fields.address + " " + fields.city },
      function (results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
          new google.maps.Marker({
            map: new google.maps.Map(
              document.getElementById('mapcontainer'),
              { zoom: 15, center: results[0].geometry.location }
            ),
            position: results[0].geometry.location
          });
        } else {
         document.getElementById('mapcontainer').innerHTML = '<span>Geocode was not successful for the following reason: ' + status + '</span>';
        }
      });
  }
}

swapMap = function() {
  var mapcont = document.getElementById("mapcontainer");
  var winbtn = document.getElementById("winbtn");
  if (mapcont.className == "") {
    mapcont.className = "hidden";
    winbtn.className = "closed";
  }else{
    mapcont.className = "";
    winbtn.className = "";    
  }
}
<div id="hs-view"></div>
<div class="emu">
<iframe id="term" src="https://zanywhere.cybelesoft.com/hsdemo/?menu=0" frameborder=0>
</iframe></div>
<div style="display:none">

  <div class="wrapper" id="loginForm">
    <div class="apppnl form-signin">
      <h3 class="form-signin-heading">Sign In</h3>
        <input type="text" class="form-control" name="username" placeholder="Username" required="" maxlength="6" hs-field="hs.data.username"/>
	      <input type="password" class="form-control" name="password" placeholder="Password" maxlength="6" hs-field="hs.data.password"/><br/>
        <div class="pull-right">
        <button class="btn btn-primary" tabindex="0" onclick="hs.navigate('account')">Go to account</button>
        <button class="btn btn-primary" tabindex="0" onclick="hs.navigate('main')">Go</button>
        <button class="btn btn-primary" tabindex="0" onclick="hs.navigate('exit')">Exit</button>        
        </div>
    </div>
  </div>
  
  <div id="mapView">
    <div class="map-panel container" id="mappanel">
    <div id="headbar">
    <b>Address:</b> {{ hs.data.address }} {{ hs.data.city }} <span id="winbtn" onclick="swapMap()">&#94;</span>
    </div>
      <div id="mapcontainer">
      </div>
    </div>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDdvYxfGqnug5m_QGvJRQ9-zErhiFLGRe4" async defer></script>
  </div>
  
</div>