function insertNewImage(keyInfo,img1) {

const
e      = keyInfo[0],
kC     = keyInfo[1],
cC     = keyInfo[2],
shift  = keyInfo[3],
ctrl   = keyInfo[4],
alt    = keyInfo[5];

const idSuffix = Date.now().toString();
newId = 'coin' + idSuffix.slice(idSuffix.length - 5, idSuffix.length);
let logMessage = "";

let
newCoin          = document.createElement("div"),
anchor           = document.createElement("a"),
main             = document.createElement("div"),

button      = document.createElement("button"),
div         = document.createElement("div");
img         = document.createElement("img"); img.src = img1.src;

         anchor.dataset.name  = `anchor`;
          button.dataset.name = `button`;
             div.dataset.name = `div`;
             img.dataset.name = `img`;
          main.dataset.name   = `main`;

       anchor.style = `position:absolute;z-index:200;left:0;top:0;width:100%;height:100%;border:0px;margin:0px;pointer-events:none;font-size:${utilityDivFontSize};             `;

       if (showPartName==true) {
anchor.innerText      =    newId;
} else {
anchor.innerText      =       "";
}

main.style = `position:absolute;z-index:100;overflow: hidden;left:0;top:0;width:100%;height:100%;border:none;margin:none;pointer-events:none;`;

button.style = buttonInitialStyle;
div.style = `position:absolute;z-index:200;left:0;top:0;width: 100%;height: 100%;box-sizing: border-box;border:none;text-align:justify;pointer-events:none;background-color:transparent;`;

img.style = `position:absolute;display:none;z-index:100;left:0;top:0;width:100%;height:100%;border:none;margin:none;pointer-events:none;background-color:${noImageColour};`;
img.alt = ``;
div.style.color  = `rgba(0,0,0,1)`;
div.innerText    = ``;


main.dataset.perspective           =   "1536px";
main.dataset.rotateX               =        "0";
main.dataset.rotateY               =        "0";
main.dataset.rotateZ               =        "0";
main.dataset.translateZ            =        "0";
main.style.transformOrigin         =   "center";
main.style.transform               =      "perspective(1536px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateZ(0deg)";

main.appendChild(button);
main.appendChild(div);
main.appendChild(img);

newCoin.id                            =      newId;
newCoin.dataset.jsName                =      newId;
newCoin.dataset.dragPull              =      "style.transform";
newCoin.dataset.parent                =         "";
newCoin.dataset.children              =         "";
newCoin.dataset.finishedOutline       =     "none";
newCoin.dataset.outlineColour         =     "grey";
newCoin.style.outlineOffset           =     "-" + Ws2;
newCoin.style.position                = "absolute";
newCoin.style.transformOrigin         = "top left";
newCoin.style.transform               = "scale(1)";

newCoin.style.zIndex                  =   Cur.style.zIndex;

newCoin.dataset.coinTrip=Ts2;
anchor.style.fontFamily              =        Es2;
anchor.style.color                   =        Fs2;
anchor.style.textAlign               =        Gs2;
anchor.style.backgroundColor         =        Bs2;
anchor.style.opacity                 =        Os2;

newCoin.style.userSelect              =        "none";

newCoin.style.left      =    Math.floor(parseInt(e.pageX)/T) * T + "px";
newCoin.style.top       =    Math.floor(parseInt(e.pageY)/T) * T + "px";
newCoin.style.width     =    parseInt(img.width) + "px"      ;
newCoin.style.height    =    parseInt(img.height) + "px"     ;
curFocus                =    1                                        ;
logMessage=`"N"-insertion at cursor,     jsName : "${newCoin.dataset.jsName}"`;
eM=0;modeRouter(e,5); 
logMessage=`*** mode 5 - "e" - extendEdge : right and down ***`;


/* Finalize into the datasets. */
newCoin.dataset.left    =    parseInt(newCoin.style.left  ) + "px";
newCoin.dataset.top     =    parseInt(newCoin.style.top   ) + "px";
newCoin.dataset.width   =    parseInt(newCoin.style.width ) + "px";
newCoin.dataset.height  =    parseInt(newCoin.style.height) + "px";


newCoin.dataset.scale                 =        "1";
newCoin.dataset.angle                 =        "0";
newCoin.dataset.left                  =        parseInt(newCoin.style.left) + "px";
newCoin.dataset.top                   =        parseInt(newCoin.style.top)  + "px";

newCoin.dataset.coinTrip              =        Ts2;

coinTrip.sel2[coinTrip.sel2.length] = newCoin;

newCoin.appendChild(anchor);
newCoin.appendChild(main);

newCoin.anchor = newCoin.firstElementChild;
newCoin.main   = newCoin.lastElementChild;
newCoin.button = newCoin.lastElementChild.firstElementChild;
newCoin.div    = newCoin.lastElementChild.firstElementChild.nextElementSibling;
newCoin.img    = newCoin.lastElementChild.lastElementChild;

newCoin.img.style.display = '';


/* Initialize from the template. */

div.style.background              = template.defaultIMG.background              ;
div.style.backgroundColor         = template.defaultIMG.backgroundColor         ;
div.style.color                   = template.defaultIMG.color                   ;
div.style.textShadow              = template.defaultIMG.textShadow              ;

div.style.textAlign               = template.defaultIMG.textAlign               ;
div.style.textIndent              = template.defaultIMG.textIndent              ;
div.style.fontSize                = template.defaultIMG.fontSize                ;
div.style.fontStyle               = template.defaultIMG.fontStyle               ;
div.style.fontWeight              = template.defaultIMG.fontWeight              ;
div.style.fontVariant             = template.defaultIMG.fontVariant             ;

div.style.lineHeight              = template.defaultIMG.lineHeight              ; 
div.style.wordSpacing             = template.defaultIMG.wordSpacing             ; 
div.style.letterSpacing           = template.defaultIMG.letterSpacing           ; 

div.style.textTransform           = template.defaultIMG.textTransform           ;
div.style.direction               = template.defaultIMG.direction               ;
div.style.opacity                 = template.defaultIMG.opacity                 ;

div.style.paddingLeft             = template.defaultIMG.paddingLeft             ;
div.style.paddingRight            = template.defaultIMG.paddingRight            ;
div.style.paddingTop              = template.defaultIMG.paddingTop              ;
div.style.paddingBottom           = template.defaultIMG.paddingBottom           ;





utilityLayer0.appendChild(newCoin);
curFocus  = 0;
if (coinFocus!=null) {
coinFocus.style.outlineColor = Cs2;
coinFocus.style.outlineWidth = Ws2;
coinFocus.style.outlineStyle = Ss2;


coinFocus.style.outline = fA;
coinFocus.style.outlineOffset = fAO;

coinFocus1=coinFocus;
}
coinFocus =newCoin;

coinFocus.style.outline = fB;
coinFocus.style.outlineOffset = fBO;

if (logMessage!="") {
}


}
