code: function writeImageTag(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {
  
          var whole_match = m1;
          var alt_text   = m2;
          var link_id	 = m3.toLowerCase();
          var url		= m4;
          var title	= m7;
  
          if (!title) {
              title = "";
          }
  
          if (url == "") {
              if (link_id == "") {
                  link_id = alt_text.toLowerCase().replace(/ ?\n/g," ");
              }
              url = "#"+link_id;
  
              if (urls[link_id] != undefined) {
                  url = urls[link_id];
                  if (titles[link_id] != undefined) {
                      title = title[link_id];
                  }
              }
              else {
                  return whole_match;
              }
          }
  
          alt_text = alt_text.replace(/"/g,"&quot;");
          url = escapeCharacters(url,"*_");
          var result = "<img src=\"" + url + "\" alt=\"" + alt_text + "\"";
  
          title = title.replace(/"/g,"&quot;");
          title = escapeCharacters(title,"*_");
          result +=  " title=\"" + title + "\"";
  
          result += " />";
  
          return result;
      }
docs: }}} {{{ writeImageTag