function makeLink(text, ma, mb, ancor, level, noBackLink) {
       var newtext = "";
       var maL = ma.length;
       var mbL = mb.length;
       while (text.length > 0) {
           var p = text.indexOf(ma + ancor);
           if (p < 0) {
               newtext += text;
               break;
           }
           var q = text.substring(p + maL).indexOf(mb);
           if (q < 0 ) { //|| (text.indexOf("/dm/sm/repository") < 0 && text.indexOf("/dm/sm/catalog"))) {
               newtext += text.substring(0, maL);
               text = text.substring(maL);
               continue;
           }
           q += p + maL;
           var pre = text.substring(0, p);
           var post = text.substring(q + mbL);
           var a = text.substring(p + maL, q);
           var b = a;
           if (_id_ != "_id_" && _id_ && b.indexOf('id=') < 0)
              b += "?id=" + _id_;
           if (_version_) {
              if (b.indexOf("?")<0)
                 b += "?"
              else
                 b += "&"
              b += _version_;   
           }
           newtext += pre + ma + "<a href='" + b + "'>" + a + "</a>&nbsp;;&nbsp;" + "<a href='javascript:peek(\"" + b + "\", " + level + ")'>[&rarr;]</a>";
           if (!noBackLink) 
              newtext += "&nbsp;;&nbsp;" + "<a href='javascript:back_peek(\"" + b + "\", " + level + ")'>[&larr;]</a>"
           newtext += mb;
           
           text = post;
       }
       return newtext;
   }
// Param noBackLink is true sets up to not create trigger to view back link. Only forward links.
Param noBackLink is true sets up to not create trigger to view back link. Only forward links.
Param noBackLink is true sets up to not create trigger to view back link . Only forward links .
function makeLink(text, ma, mb, ancor, level, noBackLink) {
       var newtext = "";
       var maL = ma.length;
       var mbL = mb.length;
       while (text.length > 0) {
           var p = text.indexOf(ma + ancor);
           if (p < 0) {
               newtext += text;
               break;
           }
           var q = text.substring(p + maL).indexOf(mb);
           if (q < 0 ) { 
               newtext += text.substring(0, maL);
               text = text.substring(maL);
               continue;
           }
           q += p + maL;
           var pre = text.substring(0, p);
           var post = text.substring(q + mbL);
           var a = text.substring(p + maL, q);
           var b = a;
           if (_id_ != "_id_" && _id_ && b.indexOf('id=') < 0)
              b += "?id=" + _id_;
           if (_version_) {
              if (b.indexOf("?")<0)
                 b += "?"
              else
                 b += "&"
              b += _version_;   
           }
           newtext += pre + ma + "<a href='" + b + "'>" + a + "</a>&nbsp;;&nbsp;" + "<a href='javascript:peek(\"" + b + "\", " + level + ")'>[&rarr;]</a>";
           if (!noBackLink) 
              newtext += "&nbsp;;&nbsp;" + "<a href='javascript:back_peek(\"" + b + "\", " + level + ")'>[&larr;]</a>"
           newtext += mb;
           text = post;
       }
       return newtext;
   }
function makeLink ( text , ma , mb , ancor , level , noBackLink ) { var newtext = "" ; var maL = ma . length ; var mbL = mb . length ; while ( text . length > 0 ) { var p = text . indexOf ( ma + ancor ) ; if ( p < 0 ) { newtext += text ; break ; } var q = text . substring ( p + maL ) . indexOf ( mb ) ; if ( q < 0 ) { newtext += text . substring ( 0 , maL ) ; text = text . substring ( maL ) ; continue ; } q += p + maL ; var pre = text . substring ( 0 , p ) ; var post = text . substring ( q + mbL ) ; var a = text . substring ( p + maL , q ) ; var b = a ; if ( _id_ != "_id_" && _id_ && b . indexOf ( 'id=' ) < 0 ) b += "?id=" + _id_ ; if ( _version_ ) { if ( b . indexOf ( "?" ) < 0 ) b += "?" else b += "&" b += _version_ ; } newtext += pre + ma + "<a href='" + b + "'>" + a + "</a>&nbsp;;&nbsp;" + "<a href='javascript:peek(\"" + b + "\", " + level + ")'>[&rarr;]</a>" ; if ( ! noBackLink ) newtext += "&nbsp;;&nbsp;" + "<a href='javascript:back_peek(\"" + b + "\", " + level + ")'>[&larr;]</a>" newtext += mb ; text = post ; } return newtext ; }
Param noBackLink is true sets up to not create trigger to view back link.
Param noBackLink is true sets up to not create trigger to view back link .
//|| (text.indexOf("/dm/sm/repository") < 0 && text.indexOf("/dm/sm/catalog"))) {