﻿<html>
  <head></head>
  <body style="word-wrap: break-word; width=1810px; height=250px;">
    <title></title>
    <style type="text/css">
      body  {
        font-family: Segoe UI, Arial, sans-serif;
        font-size: 12px;
        color: #000;
        overflow: hidden;
        padding: 0px;
        margin: 0px;
        width: 650px;
        height: 150px;
      }

      .main-div  {
        border: 1px solid #ccc;
        overflow: hidden;
      }

      .header-div  {
        border-bottom: 1px solid #ccc;
        padding: 7px;
        overflow: hidden;
      }

      .body-content  {
        display: none;
        padding: 0;
        display: inline-block;
        height: 172px;
        overflow: auto;
        width: 100%;
      }

      .inner-body  {
        padding: 10px 0 0 10px;
      }

      .image-div  {
        border: 1px solid #ccc;
        width: 150px;
        height: 150px;
        float: left;
        position: relative;
        margin-right: 10px;
        margin-bottom: 10px;
      }

      .image-div input[type="checkbox"]  {
        position: absolute;
        margin-top: 2px;
      }

      .icon_button  {
        color: #444;
        font-size: 12px;
        text-transform: uppercase;
        margin-right: 0px;
        cursor: pointer;
        padding: 4px 5px 4px 24px;
        background-color: transparent;
        border: none;
        background-repeat: no-repeat;
        background-position: 4px 3px;
        margin-right: 15px;
        float: left;
        text-decoration: none;
      }

      .icon_button:hover  {
        background-color: #D7E8F9;
      }

      .Add  {
        background-image: url(add_icon.png);
      }

      .delete  {
        background-image: url(delete.png);
      }

      .image-upload > input  {
        display: none;
      }

    </style>
    <script src="../../../ClientGlobalContext.js.aspx" type="text/javascript"></script>
    <script src="../javascripts/jquery" type="text/javascript"></script>
    <script src="../javascripts/xrmsvctoolkit" type="text/javascript"></script>
    <script type="text/javascript">
// JavaScript source code
var _0x66e2 = ["\x69\x6D\x61\x67\x65\x73\x42\x69\x6E\x64\x69\x6E\x67\x41\x72\x65\x61", "\x64\x72\x6F\x70", "\x6C\x6F\x61\x64\x69\x6E\x67", "\x67\x65\x74\x45\x6E\x74\x69\x74\x79\x4E\x61\x6D\x65", "\x65\x6E\x74\x69\x74\x79", "\x64\x61\x74\x61", "\x50\x61\x67\x65", "\x58\x72\x6D", "", "\x61\x63\x63\x6F\x75\x6E\x74", "\x63\x6F\x6E\x74\x61\x63\x74", "\x63\x6F\x6D\x70\x65\x74\x69\x74\x6F\x72", "\x6C\x65\x61\x64", "\x70\x72\x6F\x64\x75\x63\x74", "\x73\x79\x73\x74\x65\x6D\x75\x73\x65\x72", "\x73\x61\x6C\x65\x73\x6F\x72\x64\x65\x72", "\x69\x6E\x63\x69\x64\x65\x6E\x74", "\x63\x61\x6D\x70\x61\x69\x67\x6E", "\x63\x6F\x6E\x74\x72\x61\x63\x74", "\x69\x6E\x76\x6F\x69\x63\x65", "\x73\x68\x6F\x77", "\x23\x77\x65\x62\x43\x61\x6D", "\x23\x73\x65\x74\x49\x6D\x61\x67\x65", "\x68\x69\x64\x65", "\x23\x6C\x6F\x61\x64\x69\x6E\x67", "\x23\x64\x72\x6F\x70", "\x7D", "\x72\x65\x70\x6C\x61\x63\x65", "\x7B", "\x67\x65\x74\x49\x64", "\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C", "\x23", "\x61\x70\x70\x65\x6E\x64", "\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72", "\x67\x65\x74\x46\x6F\x72\x6D\x54\x79\x70\x65", "\x75\x69", "\x73\x74\x61\x74\x75\x73", "\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64", "\x59\x6F\x75\x72\x20\x62\x72\x6F\x77\x73\x65\x72\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x74\x68\x65\x20\x48\x54\x4D\x4C\x35\x20\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72\x2E", "\x2E\x6D\x61\x69\x6E\x2D\x64\x69\x76", "\x2E\x68\x65\x61\x64\x65\x72\x2D\x64\x69\x76", "\x62\x6F\x64\x79", "\x61\x70\x70\x65\x6E\x64\x54\x6F", "\x72\x65\x61\x64\x79", "\x23\x73\x74\x61\x74\x75\x73", "\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74", "\x64\x72\x61\x67\x6F\x76\x65\x72", "\x64\x72\x61\x67\x65\x6E\x74\x65\x72", "\x65\x76\x65\x6E\x74", "\x64\x61\x74\x61\x54\x72\x61\x6E\x73\x66\x65\x72", "\x66\x69\x6C\x65\x73", "\x6C\x65\x6E\x67\x74\x68", "\x72\x65\x61\x64\x41\x73\x44\x61\x74\x61\x55\x52\x4C", "\x6C\x6F\x61\x64\x65\x6E\x64", "\x62\x69\x6E\x64\x54\x6F\x45\x76\x65\x6E\x74\x48\x61\x6E\x64\x6C\x65\x72", "\x23\x4E\x6F\x41\x74\x74\x61\x63\x68\x65\x6D\x65\x6E\x74\x73", "\x66\x69\x6E\x64", "\x73\x69\x7A\x65", "\x3B", "\x73\x70\x6C\x69\x74", "\x3A", "\x2C", "\x72\x65\x73\x75\x6C\x74", "\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65", "\x2E", "\x6E\x61\x6D\x65", "\x6A\x70\x67", "\x67\x69\x66", "\x70\x6E\x67", "\x74\x69\x66", "\x69\x6D\x67", "\x6D\x74\x63\x63\x70\x5F\x64\x72\x6F\x70\x70\x65\x64\x69\x6D\x61\x67\x65", "\x26\x24\x66\x69\x6C\x74\x65\x72\x3D\x6D\x74\x63\x63\x70\x5F\x52\x65\x6C\x61\x74\x65\x64\x52\x65\x63\x6F\x72\x64\x49\x44\x20\x65\x71\x20\x27", "\x27", "\x6D\x74\x63\x63\x70\x5F\x64\x72\x6F\x70\x70\x65\x64\x69\x6D\x61\x67\x65\x49\x64", "\x6D\x74\x63\x63\x70\x5F\x52\x65\x6C\x61\x74\x65\x64\x52\x65\x63\x6F\x72\x64\x49\x44", "\x72\x65\x74\x72\x69\x65\x76\x65\x4D\x75\x6C\x74\x69\x70\x6C\x65", "\x6E\x6F\x74\x65\x49\x64", "\x64\x72\x6F\x70\x70\x65\x64\x49\x6D\x61\x67\x65\x49\x64", "\x62\x61\x73\x65\x36\x34\x44\x61\x74\x61", "\x70\x6D\x72", "\x2E\x64\x72\x6F\x70\x31", "\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73", "\x64\x72\x6F\x70\x31", "\x61\x64\x64\x43\x6C\x61\x73\x73", "\x50\x6C\x65\x61\x73\x65\x20\x44\x72\x6F\x70\x20\x49\x6D\x61\x67\x65\x20\x46\x69\x6C\x65\x73\x20\x4F\x6E\x6C\x79", "\x46\x69\x6C\x65\x3A\x20", "\x20\x73\x69\x7A\x65\x20\x65\x78\x63\x65\x65\x64\x65\x64", "\x70\x72\x6F\x74\x6F\x74\x79\x70\x65", "\x63\x61\x6C\x6C", "\x73\x6C\x69\x63\x65", "\x75\x6E\x73\x68\x69\x66\x74", "\x61\x70\x70\x6C\x79", "\x74\x79\x70\x65", "\x69\x6D\x61\x67\x65\x2F\x67\x69\x66", "\x69\x6D\x61\x67\x65\x2F\x6A\x70\x65\x67", "\x69\x6D\x61\x67\x65\x2F\x70\x6E\x67", "\x69\x6D\x61\x67\x65\x2F\x62\x6D\x70", "\x69\x6D\x61\x67\x65\x2F\x74\x69\x66\x66", "\x6F\x6E\x6C\x6F\x61\x64", "\x74\x61\x72\x67\x65\x74", "\x50\x6C\x65\x61\x73\x65\x20\x73\x65\x6C\x65\x63\x74\x20\x69\x6D\x61\x67\x65\x20\x74\x79\x70\x65\x20\x74\x6F\x20\x75\x70\x6C\x6F\x61\x64", "\x5F", "\x6D\x74\x63\x63\x70\x5F\x49\x6D\x61\x67\x65\x4E\x61\x6D\x65", "\x70\x75\x73\x68", "\x63\x72\x65\x61\x74\x65\x52\x65\x63\x6F\x72\x64", "\x44\x6F\x63\x75\x6D\x65\x6E\x74\x42\x6F\x64\x79", "\x53\x75\x62\x6A\x65\x63\x74", "\x46\x69\x6C\x65\x4E\x61\x6D\x65", "\x4D\x69\x6D\x65\x54\x79\x70\x65", "\x4F\x62\x6A\x65\x63\x74\x49\x64", "\x41\x6E\x6E\x6F\x74\x61\x74\x69\x6F\x6E", "\x41\x6E\x6E\x6F\x74\x61\x74\x69\x6F\x6E\x49\x64", "\x6F\x76\x65\x72\x6C\x61\x79", "\x65\x6D\x70\x74\x79", "\x26\x24\x66\x69\x6C\x74\x65\x72\x3D\x53\x75\x62\x6A\x65\x63\x74\x20\x65\x71\x20\x27", "\x49\x64", "\x6C\x61\x73\x74\x4D\x6F\x64\x69\x66\x69\x65\x64\x44\x61\x74\x65", "\x46\x69\x6C\x65\x53\x69\x7A\x65", "\x61\x72\x71", "\x61\x74\x74\x61\x63\x68\x45\x76\x65\x6E\x74", "\x6F\x6E", "\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72", "\x4E\x6F\x74\x65\x73\x49\x64", "\x73\x70\x6C\x69\x63\x65", "\x64\x65\x6C\x65\x74\x65\x52\x65\x63\x6F\x72\x64", "\x43\x75\x73\x74\x6F\x6D\x45\x6E\x74\x69\x74\x79\x49\x64", "\x74\x61\x72\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74", "\x73\x72\x63", "\x73\x72\x63\x45\x6C\x65\x6D\x65\x6E\x74", "\x63\x64", "\x23\x63\x6C\x6F\x73\x65\x42\x74\x6E", "\x64\x6F\x63\x75\x6D\x65\x6E\x74", "\x77\x69\x6E\x64\x6F\x77", "\x63\x6C\x69\x63\x6B", "\x72\x65\x6D\x6F\x76\x65", "\x23\x70\x72\x6F\x67\x72\x65\x73\x73\x62\x61\x72\x6C\x61\x79\x65\x72", "\x73\x65\x6C\x65\x63\x74\x65\x64", "\x69\x64", "\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67", "\x63\x68\x65\x63\x6B\x65\x64", "\x49\x6D\x61\x67\x65\x49\x64", "\x69\x6E\x64\x65\x78\x4F\x66", "\x53\x65\x74", "\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65", "\x73\x75\x62\x73\x74\x72\x69\x6E\x67", "\x45\x6E\x74\x69\x74\x79\x49\x6D\x61\x67\x65", "\x62\x61\x73\x65\x36\x34\x2C", "\x61\x74\x74\x72", "\x73\x74\x72\x69\x6E\x67\x69\x66\x79", "\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x55\x72\x6C", "\x63\x6F\x6E\x74\x65\x78\x74", "\x2F\x58\x52\x4D\x53\x65\x72\x76\x69\x63\x65\x73\x2F\x32\x30\x31\x31\x2F\x4F\x72\x67\x61\x6E\x69\x7A\x61\x74\x69\x6F\x6E\x44\x61\x74\x61\x2E\x73\x76\x63\x2F", "\x28\x67\x75\x69\x64\x27", "\x27\x29", "\x50\x4F\x53\x54", "\x6F\x70\x65\x6E", "\x41\x63\x63\x65\x70\x74", "\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E", "\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72", "\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65", "\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E\x3B\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x75\x74\x66\x2D\x38", "\x58\x2D\x48\x54\x54\x50\x2D\x4D\x65\x74\x68\x6F\x64", "\x4D\x45\x52\x47\x45", "\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65", "\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65", "\x72\x65\x6C\x6F\x61\x64", "\x6C\x6F\x63\x61\x74\x69\x6F\x6E", "\x55\x70\x64\x61\x74\x65", "\x52\x65\x63\x6F\x72\x64\x20\x45\x72\x72\x6F\x72\x3A\x20\x43\x61\x6E\x6E\x6F\x74\x20\x75\x70\x64\x61\x74\x65\x20", "\x20\x72\x65\x63\x6F\x72\x64\x20\x77\x69\x74\x68\x20", "\x49\x64\x20\x3D\x20", "\x61\x6C\x65\x72\x74\x44\x69\x61\x6C\x6F\x67", "\x55\x74\x69\x6C\x69\x74\x79", "\x73\x65\x6E\x64", "\x4F\x6E\x65\x20\x43\x68\x65\x63\x6B\x20\x42\x6F\x78\x20\x63\x6C\x69\x63\x6B\x20\x6E\x65\x65\x64\x65\x64", "\x67\x65\x74\x56\x65\x72\x73\x69\x6F\x6E", "\x66\x69\x72\x73\x74\x3D\x27", "\x27\x26\x73\x65\x63\x6F\x6E\x64\x3D\x27", "\x27\x26\x74\x68\x69\x72\x64\x3D\x27", "\x6D\x74\x63\x6E\x70\x5F\x2F\x43\x72\x6D\x50\x69\x63\x74\x75\x72\x65\x73\x2F\x48\x74\x6D\x6C\x2F\x43\x61\x70\x74\x75\x72\x65\x49\x6D\x61\x67\x65\x2E\x68\x74\x6D\x6C", "\x6F\x70\x65\x6E\x57\x65\x62\x52\x65\x73\x6F\x75\x72\x63\x65", "\x6C\x6F\x61\x64", "\x63\x61\x6C\x6C\x62\x61\x63\x6B", "\x45\x6E\x74\x69\x74\x79\x20\x49\x6D\x61\x67\x65\x20\x75\x70\x6C\x6F\x61\x64\x65\x64\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79", "\x43\x52\x4D\x50\x69\x63\x74\x75\x72\x65", "\x74\x72\x75\x65", "\x3C\x73\x6F\x61\x70\x65\x6E\x76\x3A\x45\x6E\x76\x65\x6C\x6F\x70\x65\x20\x78\x6D\x6C\x6E\x73\x3A\x73\x6F\x61\x70\x65\x6E\x76\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x63\x68\x65\x6D\x61\x73\x2E\x78\x6D\x6C\x73\x6F\x61\x70\x2E\x6F\x72\x67\x2F\x73\x6F\x61\x70\x2F\x65\x6E\x76\x65\x6C\x6F\x70\x65\x2F\x22\x3E\x3C\x73\x6F\x61\x70\x65\x6E\x76\x3A\x42\x6F\x64\x79\x3E", "\x3C\x45\x78\x65\x63\x75\x74\x65\x20\x78\x6D\x6C\x6E\x73\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x63\x68\x65\x6D\x61\x73\x2E\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x63\x6F\x6D\x2F\x78\x72\x6D\x2F\x32\x30\x31\x31\x2F\x43\x6F\x6E\x74\x72\x61\x63\x74\x73\x2F\x53\x65\x72\x76\x69\x63\x65\x73\x22\x3E", "\x3C\x72\x65\x71\x75\x65\x73\x74\x20\x78\x6D\x6C\x6E\x73\x3A\x64\x34\x70\x31\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x63\x68\x65\x6D\x61\x73\x2E\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x63\x6F\x6D\x2F\x78\x72\x6D\x2F\x32\x30\x31\x31\x2F\x43\x6F\x6E\x74\x72\x61\x63\x74\x73\x22\x20\x78\x6D\x6C\x6E\x73\x3A\x69\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x32\x30\x30\x31\x2F\x58\x4D\x4C\x53\x63\x68\x65\x6D\x61\x2D\x69\x6E\x73\x74\x61\x6E\x63\x65\x22\x3E", "\x3C\x64\x34\x70\x31\x3A\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x78\x6D\x6C\x6E\x73\x3A\x64\x35\x70\x31\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x63\x68\x65\x6D\x61\x73\x2E\x64\x61\x74\x61\x63\x6F\x6E\x74\x72\x61\x63\x74\x2E\x6F\x72\x67\x2F\x32\x30\x30\x34\x2F\x30\x37\x2F\x53\x79\x73\x74\x65\x6D\x2E\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E\x73\x2E\x47\x65\x6E\x65\x72\x69\x63\x22\x3E", "\x3C\x64\x34\x70\x31\x3A\x4B\x65\x79\x56\x61\x6C\x75\x65\x50\x61\x69\x72\x4F\x66\x73\x74\x72\x69\x6E\x67\x61\x6E\x79\x54\x79\x70\x65\x3E", "\x3C\x64\x35\x70\x31\x3A\x6B\x65\x79\x3E\x51\x75\x65\x72\x79\x3C\x2F\x64\x35\x70\x31\x3A\x6B\x65\x79\x3E", "\x3C\x64\x35\x70\x31\x3A\x76\x61\x6C\x75\x65\x20\x69\x3A\x74\x79\x70\x65\x3D\x22\x64\x34\x70\x31\x3A\x51\x75\x65\x72\x79\x45\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x22\x3E", "\x3C\x64\x34\x70\x31\x3A\x43\x6F\x6C\x75\x6D\x6E\x53\x65\x74\x3E", "\x3C\x64\x34\x70\x31\x3A\x41\x6C\x6C\x43\x6F\x6C\x75\x6D\x6E\x73\x3E\x74\x72\x75\x65\x3C\x2F\x64\x34\x70\x31\x3A\x41\x6C\x6C\x43\x6F\x6C\x75\x6D\x6E\x73\x3E", "\x3C\x64\x34\x70\x31\x3A\x43\x6F\x6C\x75\x6D\x6E\x73\x20\x78\x6D\x6C\x6E\x73\x3A\x64\x39\x70\x31\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x63\x68\x65\x6D\x61\x73\x2E\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x63\x6F\x6D\x2F\x32\x30\x30\x33\x2F\x31\x30\x2F\x53\x65\x72\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2F\x41\x72\x72\x61\x79\x73\x22\x20\x2F\x3E", "\x3C\x2F\x64\x34\x70\x31\x3A\x43\x6F\x6C\x75\x6D\x6E\x53\x65\x74\x3E", "\x3C\x64\x34\x70\x31\x3A\x43\x72\x69\x74\x65\x72\x69\x61\x3E", "\x3C\x64\x34\x70\x31\x3A\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73\x3E\x3C\x64\x34\x70\x31\x3A\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x45\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x3E\x3C\x64\x34\x70\x31\x3A\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65\x3E\x6D\x74\x63\x5F\x6E\x61\x6D\x65\x3C\x2F\x64\x34\x70\x31\x3A\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65\x3E\x3C\x64\x34\x70\x31\x3A\x4F\x70\x65\x72\x61\x74\x6F\x72\x3E\x49\x6E\x3C\x2F\x64\x34\x70\x31\x3A\x4F\x70\x65\x72\x61\x74\x6F\x72\x3E", "\x3C\x64\x34\x70\x31\x3A\x56\x61\x6C\x75\x65\x73\x20\x78\x6D\x6C\x6E\x73\x3A\x64\x31\x31\x70\x31\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x63\x68\x65\x6D\x61\x73\x2E\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x63\x6F\x6D\x2F\x32\x30\x30\x33\x2F\x31\x30\x2F\x53\x65\x72\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2F\x41\x72\x72\x61\x79\x73\x22\x3E\x3C\x64\x31\x31\x70\x31\x3A\x61\x6E\x79\x54\x79\x70\x65\x20\x78\x6D\x6C\x6E\x73\x3A\x64\x31\x32\x70\x31\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x32\x30\x30\x31\x2F\x58\x4D\x4C\x53\x63\x68\x65\x6D\x61\x22\x20\x69\x3A\x74\x79\x70\x65\x3D\x22\x64\x31\x32\x70\x31\x3A\x73\x74\x72\x69\x6E\x67\x22\x3E", "\x3C\x2F\x64\x31\x31\x70\x31\x3A\x61\x6E\x79\x54\x79\x70\x65\x3E\x3C\x64\x31\x31\x70\x31\x3A\x61\x6E\x79\x54\x79\x70\x65\x20\x78\x6D\x6C\x6E\x73\x3A\x64\x31\x32\x70\x31\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x32\x30\x30\x31\x2F\x58\x4D\x4C\x53\x63\x68\x65\x6D\x61\x22\x20\x69\x3A\x74\x79\x70\x65\x3D\x22\x64\x31\x32\x70\x31\x3A\x73\x74\x72\x69\x6E\x67\x22\x3E", "\x3C\x2F\x64\x31\x31\x70\x31\x3A\x61\x6E\x79\x54\x79\x70\x65\x3E\x3C\x2F\x64\x34\x70\x31\x3A\x56\x61\x6C\x75\x65\x73\x3E\x3C\x2F\x64\x34\x70\x31\x3A\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x45\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x3E\x3C\x2F\x64\x34\x70\x31\x3A\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73\x3E\x3C\x64\x34\x70\x31\x3A\x46\x69\x6C\x74\x65\x72\x4F\x70\x65\x72\x61\x74\x6F\x72\x3E\x41\x6E\x64\x3C\x2F\x64\x34\x70\x31\x3A\x46\x69\x6C\x74\x65\x72\x4F\x70\x65\x72\x61\x74\x6F\x72\x3E\x3C\x64\x34\x70\x31\x3A\x46\x69\x6C\x74\x65\x72\x73\x20\x2F\x3E", "\x3C\x2F\x64\x34\x70\x31\x3A\x43\x72\x69\x74\x65\x72\x69\x61\x3E\x3C\x64\x34\x70\x31\x3A\x44\x69\x73\x74\x69\x6E\x63\x74\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x64\x34\x70\x31\x3A\x44\x69\x73\x74\x69\x6E\x63\x74\x3E", "\x3C\x64\x34\x70\x31\x3A\x45\x6E\x74\x69\x74\x79\x4E\x61\x6D\x65\x3E\x6D\x74\x63\x5F\x6C\x69\x63\x65\x6E\x73\x69\x6E\x67\x3C\x2F\x64\x34\x70\x31\x3A\x45\x6E\x74\x69\x74\x79\x4E\x61\x6D\x65\x3E", "\x3C\x64\x34\x70\x31\x3A\x4C\x69\x6E\x6B\x45\x6E\x74\x69\x74\x69\x65\x73\x20\x2F\x3E\x3C\x64\x34\x70\x31\x3A\x4F\x72\x64\x65\x72\x73\x20\x2F\x3E", "\x3C\x64\x34\x70\x31\x3A\x50\x61\x67\x65\x49\x6E\x66\x6F\x20\x69\x3A\x6E\x69\x6C\x3D\x22\x74\x72\x75\x65\x22\x20\x2F\x3E", "\x3C\x64\x34\x70\x31\x3A\x4E\x6F\x4C\x6F\x63\x6B\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x64\x34\x70\x31\x3A\x4E\x6F\x4C\x6F\x63\x6B\x3E", "\x3C\x2F\x64\x35\x70\x31\x3A\x76\x61\x6C\x75\x65\x3E", "\x3C\x2F\x64\x34\x70\x31\x3A\x4B\x65\x79\x56\x61\x6C\x75\x65\x50\x61\x69\x72\x4F\x66\x73\x74\x72\x69\x6E\x67\x61\x6E\x79\x54\x79\x70\x65\x3E", "\x3C\x2F\x64\x34\x70\x31\x3A\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3E", "\x3C\x64\x34\x70\x31\x3A\x52\x65\x71\x75\x65\x73\x74\x49\x64\x20\x69\x3A\x6E\x69\x6C\x3D\x22\x74\x72\x75\x65\x22\x20\x2F\x3E\x3C\x64\x34\x70\x31\x3A\x52\x65\x71\x75\x65\x73\x74\x4E\x61\x6D\x65\x3E\x52\x65\x74\x72\x69\x65\x76\x65\x4D\x75\x6C\x74\x69\x70\x6C\x65\x3C\x2F\x64\x34\x70\x31\x3A\x52\x65\x71\x75\x65\x73\x74\x4E\x61\x6D\x65\x3E\x3C\x2F\x72\x65\x71\x75\x65\x73\x74\x3E\x3C\x2F\x45\x78\x65\x63\x75\x74\x65\x3E", "\x3C\x2F\x73\x6F\x61\x70\x65\x6E\x76\x3A\x42\x6F\x64\x79\x3E\x3C\x2F\x73\x6F\x61\x70\x65\x6E\x76\x3A\x45\x6E\x76\x65\x6C\x6F\x70\x65\x3E", "\x4D\x53\x58\x4D\x4C\x32\x2E\x58\x4D\x4C\x48\x54\x54\x50\x2E\x36\x2E\x30", "\x4D\x53\x58\x4D\x4C\x32\x2E\x58\x4D\x4C\x48\x54\x54\x50\x2E\x33\x2E\x30", "\x2F\x58\x52\x4D\x53\x65\x72\x76\x69\x63\x65\x73\x2F\x32\x30\x31\x31\x2F\x4F\x72\x67\x61\x6E\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x73\x76\x63\x2F\x77\x65\x62", "\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x6D\x6C\x2C\x20\x74\x65\x78\x74\x2F\x78\x6D\x6C\x2C\x20\x2A\x2F\x2A", "\x74\x65\x78\x74\x2F\x78\x6D\x6C\x3B\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x75\x74\x66\x2D\x38", "\x53\x4F\x41\x50\x41\x63\x74\x69\x6F\x6E", "\x68\x74\x74\x70\x3A\x2F\x2F\x73\x63\x68\x65\x6D\x61\x73\x2E\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x63\x6F\x6D\x2F\x78\x72\x6D\x2F\x32\x30\x31\x31\x2F\x43\x6F\x6E\x74\x72\x61\x63\x74\x73\x2F\x53\x65\x72\x76\x69\x63\x65\x73\x2F\x49\x4F\x72\x67\x61\x6E\x69\x7A\x61\x74\x69\x6F\x6E\x53\x65\x72\x76\x69\x63\x65\x2F\x45\x78\x65\x63\x75\x74\x65", "\x72\x65\x73\x70\x6F\x6E\x73\x65\x58\x4D\x4C", "\x2F\x2F\x61\x3A\x4B\x65\x79\x56\x61\x6C\x75\x65\x50\x61\x69\x72\x4F\x66\x73\x74\x72\x69\x6E\x67\x61\x6E\x79\x54\x79\x70\x65", "\x73\x65\x6C\x65\x63\x74\x4E\x6F\x64\x65\x73", "\x62\x3A\x6B\x65\x79", "\x73\x65\x6C\x65\x63\x74\x53\x69\x6E\x67\x6C\x65\x4E\x6F\x64\x65", "\x74\x65\x78\x74", "\x6D\x74\x63\x5F\x6E\x61\x6D\x65", "\x62\x3A\x76\x61\x6C\x75\x65", "\x6D\x74\x63\x5F\x69\x73\x76\x61\x6C\x69\x64", "\x4B\x65\x79\x56\x61\x6C\x75\x65\x50\x61\x69\x72\x4F\x66\x73\x74\x72\x69\x6E\x67\x61\x6E\x79\x54\x79\x70\x65", "\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72\x41\x6C\x6C", "\x6B\x65\x79", "\x63\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73", "\x6E\x6F\x64\x65\x56\x61\x6C\x75\x65", "\x76\x61\x6C\x75\x65", "\x67\x65\x74\x53\x65\x72\x76\x65\x72\x55\x72\x6C", "\x6D\x61\x74\x63\x68", "\x68\x72\x65\x66", "\x2F", "\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66"];
var BindAreaControllName = _0x66e2[0];
var DropAreaControlName = _0x66e2[1];
var DisplayAreaControlName = _0x66e2[1];
var TransparentControlName = _0x66e2[2];
var entityLogicalName = parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[5]][_0x66e2[4]][_0x66e2[3]]();
var recordGuid;
var checkBoxeIds = [];
var recordArray = [];
var documentBody;
var deleteingElement;
var deleteingElementCount;
var noteId = _0x66e2[8];
var selectedImageId = _0x66e2[8];
var droppedImageId = _0x66e2[8];
var fullImageId = _0x66e2[8];
$(document)[_0x66e2[43]](function () {    
    if (entityLogicalName == _0x66e2[9] || entityLogicalName == _0x66e2[10] || entityLogicalName == _0x66e2[11] || entityLogicalName == _0x66e2[12] || entityLogicalName == _0x66e2[13] || entityLogicalName == _0x66e2[14] || entityLogicalName == _0x66e2[15] || entityLogicalName == _0x66e2[16] || entityLogicalName == _0x66e2[17] || entityLogicalName == _0x66e2[18] || entityLogicalName == _0x66e2[19]) {
       
        $(_0x66e2[21])[_0x66e2[20]]();
        $(_0x66e2[22])[_0x66e2[20]]();
    }
    else {
        $(_0x66e2[21])[_0x66e2[20]]();
        $(_0x66e2[22])[_0x66e2[20]]();
    }
    ;
    $(_0x66e2[24])[_0x66e2[20]]();
    $(_0x66e2[25])[_0x66e2[23]]();
    var _0x6a2bx10 = false;
    if (checkLicence()) {
        $(_0x66e2[24])[_0x66e2[20]]();
        setTimeout(function () {
            recordGuid = parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[5]][_0x66e2[4]][_0x66e2[29]]()[_0x66e2[27]](_0x66e2[28], _0x66e2[8])[_0x66e2[27]](_0x66e2[26], _0x66e2[8]);
            if (recordGuid != null) {
                retrieveDroppedImages(recordGuid, _0x6a2bx10);
                if ($(_0x66e2[31] + DisplayAreaControlName)[0][_0x66e2[30]] == _0x66e2[8]) {
                    $(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[32]](getDisplayArea());
                }
                ;
                if (window[_0x66e2[33]]) {
                    if (parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[35]][_0x66e2[34]]() != 1) {
                        DragAndDropConfig();
                    }
                }
                else {
                    document[_0x66e2[37]](_0x66e2[36])[_0x66e2[30]] = _0x66e2[38];
                }
            }
            ;
            $(_0x66e2[24])[_0x66e2[23]]();
            $(_0x66e2[25])[_0x66e2[20]]();
        }, 500);
    }
    else {
        $(_0x66e2[24])[_0x66e2[23]]();
        $(_0x66e2[39])[_0x66e2[23]]();
        $(_0x66e2[40])[_0x66e2[23]]();
        var _0x6a2bx11 = getValidateDiv();
        _0x6a2bx11[_0x66e2[42]]($(_0x66e2[41]));
    }
});
function DragAndDropConfig() {
    var _0x6a2bx13 = $(_0x66e2[44]);
    drop = document[_0x66e2[37]](DropAreaControlName);
    load = document[_0x66e2[37]](TransparentControlName);
    var _0x6a2bx14 = $(_0x66e2[31] + BindAreaControllName);
    function _0x6a2bx15(_0x6a2bx16) {
        if (_0x6a2bx16[_0x66e2[45]]) {
            _0x6a2bx16[_0x66e2[45]]();
        }
        ;
        return false;
    }
    addEventHandler(drop, _0x66e2[46], _0x6a2bx15);
    addEventHandler(drop, _0x66e2[47], _0x6a2bx15);
    addEventHandler(load, _0x66e2[46], _0x6a2bx15);
    addEventHandler(load, _0x66e2[47], _0x6a2bx15);
    addEventHandler(load, _0x66e2[1], _0x6a2bx15);
    addEventHandler(drop, _0x66e2[1], function (_0x6a2bx16) {
        _0x6a2bx16 = _0x6a2bx16 || window[_0x66e2[48]];
        if (_0x6a2bx16[_0x66e2[45]]) {
            _0x6a2bx16[_0x66e2[45]]();
        }
        ;
        var _0x6a2bx17 = _0x6a2bx16[_0x66e2[49]];
        var _0x6a2bx18 = _0x6a2bx17[_0x66e2[50]];
        $(_0x66e2[24])[_0x66e2[20]]();
        $(_0x66e2[25])[_0x66e2[23]]();
        setTimeout(function () {
            for (var _0x6a2bx19 = 0; _0x6a2bx19 < _0x6a2bx18[_0x66e2[51]]; _0x6a2bx19++) {
                var _0x6a2bx1a = _0x6a2bx18[_0x6a2bx19];
                var _0x6a2bx1b = new FileReader();
                _0x6a2bx1b[_0x66e2[52]](_0x6a2bx1a);
                addEventHandler(_0x6a2bx1b, _0x66e2[53], function (_0x6a2bx16, _0x6a2bx1a) {
                    if (_0x6a2bx14[_0x66e2[56]](_0x66e2[55])[_0x66e2[51]] > 0) {
                        _0x6a2bx14[_0x66e2[56]](_0x66e2[55])[_0x66e2[23]]();
                    }
                    ;
                    if (_0x6a2bx1a[_0x66e2[57]] < 2097152) {
                        var _0x6a2bx1c = this[_0x66e2[62]][_0x66e2[59]](_0x66e2[61])[0][_0x66e2[59]](_0x66e2[60])[1][_0x66e2[59]](_0x66e2[58])[0];
                        if (_0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[66] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[67] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[68] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[69] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[70]) {
                            documentBody = this[_0x66e2[62]];
                            XrmSvcToolkit[_0x66e2[76]]({ entityName: _0x66e2[71], odataQuery: _0x66e2[72] + recordGuid + _0x66e2[73], async: false, successCallback: function (_0x6a2bx1d) {
                                if (_0x6a2bx1d[_0x66e2[51]] > 0) {
                                    droppedImageId = _0x6a2bx1d[0][_0x66e2[74]][_0x66e2[27]](_0x66e2[28], _0x66e2[8])[_0x66e2[27]](_0x66e2[26], _0x66e2[8]);
                                    annotationToNote(_0x6a2bx1d[0][_0x66e2[75]], _0x6a2bx1a[_0x66e2[65]], _0x6a2bx1c, documentBody, droppedImageId);
                                }
                                else {
                                    droppedImageId = createDroopedImage(_0x6a2bx1a[_0x66e2[65]], _0x6a2bx1c, _0x6a2bx1a[_0x66e2[57]]);
									
                                }
                            }, errorCallback: function (_0x6a2bx1e) {
                                throw _0x6a2bx1e;
                            } });
                            if (noteId != null) {
                                var _0x6a2bx1f = this[_0x66e2[62]];
                                var _0x6a2bx20;
                                var _0x6a2bx21 = {};
                                _0x6a2bx21[_0x66e2[77]] = noteId;
                                _0x6a2bx21[_0x66e2[78]] = droppedImageId;
                                _0x6a2bx21[_0x66e2[79]] = _0x6a2bx1f;
                                _0x6a2bx20 = _0x6a2bx20 = getHtmlContent(_0x66e2[80], _0x66e2[8], _0x66e2[8], _0x66e2[8], _0x6a2bx21);
                                if ($(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[56]](_0x66e2[81])[_0x66e2[51]] == 0) {
                                    $(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[82]](_0x66e2[1]);
                                    $(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[84]](_0x66e2[83]);
                                }
                                ;
                                _0x6a2bx14[_0x66e2[32]](_0x6a2bx20);
                                $(_0x66e2[24])[_0x66e2[23]]();
                                $(_0x66e2[25])[_0x66e2[20]]();
                            }
                        }
                        else {
                            Xrm.Utility.alertDialog(_0x66e2[85]);
                        }
                    }
                    else {
                        Xrm.Utility.alertDialog(_0x66e2[86] + _0x6a2bx1a[_0x66e2[65]] + _0x66e2[87]);
                    }
                }[_0x66e2[54]](_0x6a2bx1a));
            }
            ;
            return false;
            $(_0x66e2[24])[_0x66e2[23]]();
            $(_0x66e2[25])[_0x66e2[20]]();
        }, 300);
    });
    Function[_0x66e2[88]][_0x66e2[54]] = function _0x6a2bx22() {
        var _0x6a2bx23 = this;
        var _0x6a2bx24 = Array[_0x66e2[88]][_0x66e2[90]][_0x66e2[89]](arguments);
        return function (_0x6a2bx16) {
            _0x6a2bx16 = _0x6a2bx16 || window[_0x66e2[48]];
            _0x6a2bx24[_0x66e2[91]](_0x6a2bx16);
            _0x6a2bx23[_0x66e2[92]](this, _0x6a2bx24);
        };
    };
}
function readURL(_0x6a2bx26) {
    $(_0x66e2[24])[_0x66e2[20]]();
    $(_0x66e2[25])[_0x66e2[23]]();
    setTimeout(function () {
	if(recordGuid==""|| recordGuid==undefined){
	recordGuid=parent.Xrm.Page.data.entity.getId().replace("{","").replace("}","");
	}
        var _0x6a2bx14 = $(_0x66e2[31] + BindAreaControllName);
        if (_0x6a2bx26[_0x66e2[50]] && _0x6a2bx26[_0x66e2[50]][0]) {
            var _0x6a2bx1b = new FileReader();
            type = _0x6a2bx26[_0x66e2[50]][0][_0x66e2[93]];
            name = _0x6a2bx26[_0x66e2[50]][0][_0x66e2[65]];
            size = _0x6a2bx26[_0x66e2[50]][0][_0x66e2[57]];
            if (type == _0x66e2[94] || type == _0x66e2[95] || type == _0x66e2[96] || type == _0x66e2[97] || type == _0x66e2[98]) {
                _0x6a2bx1b[_0x66e2[99]] = function (_0x6a2bx16) {
                    documentBody = _0x6a2bx16[_0x66e2[100]][_0x66e2[62]];
                    XrmSvcToolkit[_0x66e2[76]]({ entityName: _0x66e2[71], odataQuery: _0x66e2[72] + recordGuid + _0x66e2[73], async: false, successCallback: function (_0x6a2bx1d) {
                        $(_0x66e2[24])[_0x66e2[20]]();
                        if (_0x6a2bx1d[_0x66e2[51]] > 0) {
                            droppedImageId = _0x6a2bx1d[0][_0x66e2[74]][_0x66e2[27]](_0x66e2[28], _0x66e2[8])[_0x66e2[27]](_0x66e2[26], _0x66e2[8]);
                            annotationToNote(_0x6a2bx1d[0][_0x66e2[75]], name, type, documentBody, droppedImageId);
                        }
                        else {
                            droppedImageId = createDroopedImage(name, type, size);							
                        }
						setTimeout(function () {
					    if (noteId != null && noteId!="" ) {
                        var _0x6a2bx1f = _0x6a2bx16[_0x66e2[100]][_0x66e2[62]];
                        var _0x6a2bx20;
                        var _0x6a2bx21 = {};
                        _0x6a2bx21[_0x66e2[77]] = noteId;
                        _0x6a2bx21[_0x66e2[78]] = droppedImageId;
                        _0x6a2bx21[_0x66e2[79]] = _0x6a2bx1f;
                        _0x6a2bx20 = getHtmlContent(_0x66e2[80], _0x66e2[8], _0x66e2[8], _0x66e2[8], _0x6a2bx21);
                        if ($(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[56]](_0x66e2[81])[_0x66e2[51]] == 0) {
                            $(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[82]](_0x66e2[1]);
                            $(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[84]](_0x66e2[83]);
                        }
                        ;
                        _0x6a2bx14[_0x66e2[32]](_0x6a2bx20);
                        $(_0x66e2[24])[_0x66e2[23]]();
                        $(_0x66e2[25])[_0x66e2[20]]();
                    }
					}, 5000);
					
                    }, errorCallback: function (_0x6a2bx1e) {
                        throw _0x6a2bx1e;
                    } });
                
                };
            }
            else {
                Xrm.Utility.alertDialog(_0x66e2[101]);
            }
            ;
            _0x6a2bx1b[_0x66e2[52]](_0x6a2bx26[_0x66e2[50]][0]);
        }
        else {
        }
        ;
        $(_0x66e2[24])[_0x66e2[23]]();
        $(_0x66e2[25])[_0x66e2[20]]();
    }, 500);
	
}

function createDroopedImage(_0x6a2bx28, _0x6a2bx1c, _0x6a2bx29) {
    var droppedImageId;
	if(recordGuid==""|| recordGuid==undefined){
	recordGuid=parent.Xrm.Page.data.entity.getId().replace("{","").replace("}","");
	}
	
    var _0x6a2bx2a = { mtccp_entitylogicalname: entityLogicalName, mtccp_RelatedRecordID: recordGuid, mtccp_ImageName: _0x6a2bx28, mtccp_MimeType: _0x6a2bx1c, mtccp_Size: _0x6a2bx29.toString(), mtccp_name: entityLogicalName + _0x66e2[102] + recordGuid };
    XrmSvcToolkit[_0x66e2[105]]({ entityName: _0x66e2[71], entity: _0x6a2bx2a, async: false, successCallback: function (_0x6a2bx1d) {
        droppedImageId = _0x6a2bx1d[_0x66e2[74]][_0x66e2[27]](_0x66e2[28], _0x66e2[8])[_0x66e2[27]](_0x66e2[26], _0x66e2[8]);
        annotationToNote(_0x6a2bx1d[_0x66e2[75]], _0x6a2bx1d[_0x66e2[103]], _0x6a2bx1c, documentBody, droppedImageId);
        recordArray[_0x66e2[104]](_0x6a2bx1d);
	
    }, errorCallback: function (_0x6a2bx1e) {
        $(_0x66e2[24])[_0x66e2[23]]();
        $(_0x66e2[25])[_0x66e2[20]]();
        throw _0x6a2bx1e;
    } });
    return droppedImageId;
}
function annotationToNote(_0x6a2bx2c, _0x6a2bx28, _0x6a2bx1c, documentBody, _0x6a2bx2d) {
    var _0x6a2bx2e = Object();
	setTimeout(function () {
    _0x6a2bx2e[_0x66e2[106]] = documentBody[_0x66e2[59]](_0x66e2[61])[1];
    _0x6a2bx2e[_0x66e2[107]] = _0x6a2bx2c;
    _0x6a2bx2e[_0x66e2[108]] = _0x6a2bx28;
    _0x6a2bx2e[_0x66e2[109]] = _0x6a2bx1c;
    _0x6a2bx2e[_0x66e2[110]] = { Id: _0x6a2bx2d, Name: _0x66e2[8], LogicalName: _0x66e2[71] };
    XrmSvcToolkit[_0x66e2[105]]({ entityName: _0x66e2[111], entity: _0x6a2bx2e, async: false, successCallback: function (_0x6a2bx1d) {
        noteId = _0x6a2bx1d[_0x66e2[112]];
        documentBody = _0x66e2[8];
	window.location.reload();
    }, errorCallback: function (_0x6a2bx2f) {
        documentBody = _0x66e2[8];
        Xrm.Utility.alertDialog(_0x6a2bx2f);
        $(_0x66e2[24])[_0x66e2[23]]();
    } });
	},300);
}
function retrieveDroppedImages(_0x6a2bx31, _0x6a2bx32) {
    $(_0x66e2[31] + TransparentControlName)[_0x66e2[82]](_0x66e2[113]);
    $(_0x66e2[31] + BindAreaControllName)[_0x66e2[114]]();
    var _0x6a2bx14 = $(_0x66e2[31] + BindAreaControllName);
    XrmSvcToolkit[_0x66e2[76]]({ entityName: _0x66e2[111], odataQuery: _0x66e2[115] + _0x6a2bx31 + _0x66e2[73], async: false, successCallback: function (_0x6a2bx1d) {
        if (_0x6a2bx1d[_0x66e2[51]] > 0) {
            for (var _0x6a2bx19 = 0; _0x6a2bx19 < _0x6a2bx1d[_0x66e2[51]]; _0x6a2bx19++) {
                var _0x6a2bx33 = _0x6a2bx1d[_0x6a2bx19][_0x66e2[110]][_0x66e2[116]];
                var _0x6a2bx1a = new Object();
                _0x6a2bx1a[_0x66e2[117]] = new Date();
                _0x6a2bx1a[_0x66e2[65]] = _0x6a2bx1d[_0x6a2bx19][_0x66e2[108]];
                _0x6a2bx1a[_0x66e2[57]] = _0x6a2bx1d[_0x6a2bx19][_0x66e2[118]];
                _0x6a2bx1a[_0x66e2[93]] = _0x6a2bx1d[_0x6a2bx19][_0x66e2[109]];
                var _0x6a2bx20;
                if (_0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[66] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[67] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[68] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[69] || _0x6a2bx1a[_0x66e2[65]][_0x66e2[59]](_0x66e2[64])[1][_0x66e2[63]]() == _0x66e2[70]) {
                    _0x6a2bx20 = getHtmlContent(_0x66e2[119], _0x66e2[8], _0x6a2bx1d[_0x6a2bx19], _0x6a2bx1a);
                }
                ;
                if ($(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[56]](_0x66e2[81])[_0x66e2[51]] == 0) {
                    $(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[82]](_0x66e2[1]);
                    $(_0x66e2[31] + DisplayAreaControlName)[_0x66e2[84]](_0x66e2[83]);
                }
                ;
                _0x6a2bx14[_0x66e2[32]](_0x6a2bx20);
            }
        }
        else {
            if (_0x6a2bx32) {
                deleteDroppedImages();
            }
        }
    }, errorCallback: function (_0x6a2bx1e) {
        $(_0x66e2[24])[_0x66e2[23]]();
        throw new _0x6a2bx1e;
    } });
}
function addEventHandler(_0x6a2bx35, _0x6a2bx36, _0x6a2bx23) {
    if (_0x6a2bx35[_0x66e2[120]]) {
        _0x6a2bx35[_0x66e2[120]](_0x66e2[121] + _0x6a2bx36, _0x6a2bx23);
    }
    else {
        if (_0x6a2bx35[_0x66e2[122]]) {
            _0x6a2bx35[_0x66e2[122]](_0x6a2bx36, _0x6a2bx23, false);
        }
        else {
            _0x6a2bx35[_0x66e2[121] + _0x6a2bx36] = _0x6a2bx23;
        }
    }
}
function deletePic() {
    $(_0x66e2[24])[_0x66e2[20]]();
    $(_0x66e2[25])[_0x66e2[23]]();
    setTimeout(function () {
        var _0x6a2bx38 = checkBoxeIds[_0x66e2[51]];
		if(_0x6a2bx38!=0){
        for (var _0x6a2bx19 = 0; _0x6a2bx19 < _0x6a2bx38; _0x6a2bx19++) {
            deleteingElement = checkBoxeIds[0];
            deleteImg();
        }
		}
		else
		{
		Xrm.Utility.alertDialog(_0x66e2[175]);
		}
        ;
        $(_0x66e2[24])[_0x66e2[23]]();
        $(_0x66e2[25])[_0x66e2[20]]();
    }, 300);
}
function deleteImg() {
    XrmSvcToolkit[_0x66e2[125]]({ entityName: _0x66e2[111], id: deleteingElement[_0x66e2[123]], async: false, successCallback: function (_0x6a2bx1d) {
        checkBoxeIds[_0x66e2[124]](0, 1);
        if (checkBoxeIds[_0x66e2[51]] == 0) {
            retrieveDroppedImages(recordGuid, true);
		window.location.reload();
        }
    }, errorCallback: function (_0x6a2bx1e) {
        $(_0x66e2[24])[_0x66e2[23]]();
        $(_0x66e2[25])[_0x66e2[20]]();
        throw _0x6a2bx1e;
    } });
}
function deleteDroppedImages() {
    XrmSvcToolkit[_0x66e2[125]]({ entityName: _0x66e2[71], id: deleteingElement[_0x66e2[126]], async: false, successCallback: function (_0x6a2bx1d) {
    }, errorCallback: function (_0x6a2bx1e) {
        $(_0x66e2[24])[_0x66e2[23]]();
        $(_0x66e2[25])[_0x66e2[20]]();
        throw _0x6a2bx1e;
    } });
}
function openPicture() {
    if (event != null) {
        var _0x6a2bx3c = _0x66e2[8];
        if (event[_0x66e2[127]] != undefined) {
            _0x6a2bx3c = event[_0x66e2[127]][_0x66e2[128]];
        }
        else {
            if (event[_0x66e2[129]]) {
                _0x6a2bx3c = event[_0x66e2[129]][_0x66e2[128]];
            }
        }
        ;
        var _0x6a2bx3d = getHtmlContent(_0x66e2[130], _0x6a2bx3c);
        var _0x6a2bx3e = $(top[_0x66e2[133]][_0x66e2[132]][_0x66e2[41]])[_0x66e2[56]](_0x66e2[131]);
        $(_0x6a2bx3e)[_0x66e2[121]](_0x66e2[134], function () {
            $(top[_0x66e2[133]][_0x66e2[132]][_0x66e2[41]])[_0x66e2[56]](_0x66e2[136])[_0x66e2[135]]();
        });
    }
}
function selecImage() {
    if (event != null) {
        $(_0x66e2[25])[_0x66e2[56]](_0x66e2[137])[_0x66e2[82]];
        if (event[_0x66e2[127]] != undefined) {
            selectedCheckBoxId = event[_0x66e2[127]][_0x66e2[138]];
            selectedImageId = event[_0x66e2[127]][_0x66e2[139]][_0x66e2[138]][_0x66e2[59]](_0x66e2[102])[0];
            fullImageId = event[_0x66e2[127]][_0x66e2[139]][_0x66e2[138]];
        }
        else {
            if (event[_0x66e2[129]]) {
                selectedCheckBoxId = event[_0x66e2[129]][_0x66e2[138]];
                selectedImageId = event[_0x66e2[129]][_0x66e2[139]][_0x66e2[138]][_0x66e2[59]](_0x66e2[102])[0];
                fullImageId = event[_0x66e2[129]][_0x66e2[139]][_0x66e2[138]];
            }
        }
        ;
        if ($(_0x66e2[31] + selectedCheckBoxId)[0][_0x66e2[140]] == true) {
            var _0x6a2bx40 = Object();
            _0x6a2bx40[_0x66e2[123]] = selectedCheckBoxId;
            _0x6a2bx40[_0x66e2[126]] = selectedImageId;
            _0x6a2bx40[_0x66e2[141]] = fullImageId;
            checkBoxeIds[_0x66e2[104]](_0x6a2bx40);
        }
        else {
            for (var _0x6a2bx19 = 0; _0x6a2bx19 < checkBoxeIds[_0x66e2[51]]; _0x6a2bx19++) {
                if (checkBoxeIds[_0x6a2bx19][_0x66e2[123]] == selectedCheckBoxId) {
                    checkBoxeIds[_0x66e2[124]](_0x6a2bx19, 1);
                }
            }
        }
    }
}
function setRecordImage() {
    $(_0x66e2[24])[_0x66e2[20]]();
    $(_0x66e2[25])[_0x66e2[23]]();
    setTimeout(function () {
        if (checkBoxeIds[_0x66e2[51]] == 1) {
            $(_0x66e2[24])[_0x66e2[20]]();
            $(_0x66e2[25])[_0x66e2[23]]();
            var _0x6a2bx42;
            if (entityLogicalName[_0x66e2[142]](_0x66e2[102]) != -1) {
                _0x6a2bx42 = entityLogicalName + _0x66e2[143];
            }
            else {
                var _0x6a2bx43 = entityLogicalName[_0x66e2[145]](0, 1)[_0x66e2[144]]();
                entityLogicalName = entityLogicalName[_0x66e2[27]](entityLogicalName[_0x66e2[145]](0, 1), _0x6a2bx43);
                _0x6a2bx42 = entityLogicalName + _0x66e2[143];
            }
            ;
            var _0x6a2bx44 = {};
            _0x6a2bx44[_0x66e2[146]] = $(_0x66e2[31] + checkBoxeIds[0][_0x66e2[141]])[_0x66e2[148]](_0x66e2[128])[_0x66e2[59]](_0x66e2[147])[1];
            var _0x6a2bx45 = JSON[_0x66e2[149]](_0x6a2bx44);
            var _0x6a2bx46 = Xrm[_0x66e2[6]][_0x66e2[151]][_0x66e2[150]]() + _0x66e2[152] + _0x66e2[8] + _0x6a2bx42 + _0x66e2[153] + recordGuid + _0x66e2[154];
            var _0x6a2bx47 = new XMLHttpRequest();
            _0x6a2bx47[_0x66e2[156]](_0x66e2[155], encodeURI(_0x6a2bx46), false);
            _0x6a2bx47[_0x66e2[159]](_0x66e2[157], _0x66e2[158]);
            _0x6a2bx47[_0x66e2[159]](_0x66e2[160], _0x66e2[161]);
            _0x6a2bx47[_0x66e2[159]](_0x66e2[162], _0x66e2[163]);
            _0x6a2bx47[_0x66e2[164]] = function () {
                if (this[_0x66e2[165]] == 4) {
                    _0x6a2bx47[_0x66e2[164]] = null;
                    if (this[_0x66e2[36]] == 204 || this[_0x66e2[36]] == 1223) {
                        $(_0x66e2[24])[_0x66e2[23]]();
                        $(_0x66e2[25])[_0x66e2[20]]();
						
                      //  parent[_0x66e2[133]][_0x66e2[167]][_0x66e2[166]]();
					   // parent.window.location.reload();
					  // parent.Xrm.Page.data.refresh();
					  
					  var windowOptions = { openInNewWindow:false};
					  
					 var id=parent.Xrm.Page.data.entity.getId().slice(1,37);
					  var entity1=parent.Xrm.Page.data.entity.getEntityName();
					  
					 parent.Xrm.Utility.openEntityForm(entity1,id,null,windowOptions);
                    }
                    else {
                        $(_0x66e2[24])[_0x66e2[23]]();
                        $(_0x66e2[25])[_0x66e2[20]]();
                        var _0x6a2bx48 = _0x66e2[168] + entityLogicalName + _0x66e2[169] + entityLogicalName + _0x66e2[170] + entityLogicalName + _0x66e2[171] + recordGuid + _0x66e2[64];
                        Xrm[_0x66e2[173]][_0x66e2[172]](_0x6a2bx48, function () {
                        });
                    }
                }
            };
            _0x6a2bx47[_0x66e2[174]](_0x6a2bx45);
        }
        else {
		           Xrm.Utility.alertDialog(_0x66e2[175]);
        }
        ;
        $(_0x66e2[24])[_0x66e2[23]]();
        $(_0x66e2[25])[_0x66e2[20]]();
    }, 300);
}
function openHTML() {
    
    var _0x6a2bx4a = parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[5]][_0x66e2[4]][_0x66e2[29]]()[_0x66e2[27]](_0x66e2[28], _0x66e2[8])[_0x66e2[27]](_0x66e2[26], _0x66e2[8]);
    var _0x6a2bx1c = parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[35]][_0x66e2[34]]();
    var _0x6a2bx4b = parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[5]][_0x66e2[4]][_0x66e2[3]]();
    if (parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[151]][_0x66e2[176]]()[_0x66e2[59]](_0x66e2[64])[0] >= 8) {
        var _0x6a2bx4c = encodeURIComponent(_0x66e2[177] + _0x6a2bx4a + _0x66e2[178] + _0x6a2bx1c + _0x66e2[179] + _0x6a2bx4b + _0x66e2[73]);
        var _0x6a2bx4d = Xrm[_0x66e2[173]][_0x66e2[181]](_0x66e2[180], _0x6a2bx4c, 1400, 700);
        _0x6a2bx4d[_0x66e2[122]](_0x66e2[182], function () {
            this[_0x66e2[183]] = function () {
                Xrm.Utility.alertDialog(_0x66e2[184]);
                parent[_0x66e2[133]][_0x66e2[167]][_0x66e2[166]]();
            };
        }, true);
    }
}
function checkLicence() {
    var _0x6a2bx2a = RetrieveMultiple(_0x66e2[185], null);
    if (_0x6a2bx2a[_0x66e2[51]] > 0) {
        if (_0x6a2bx2a[0] == _0x66e2[185] && _0x6a2bx2a[1] == _0x66e2[186]) {
            return true;
        }
        else {
            return false;
        }
    }
}
function RetrieveMultiple(_0x6a2bx50, _0x6a2bx51) {
	var _0x6a2bx55 = new Array();
	 var isValid = false;
            var isProduct = _0x6a2bx50;
            XrmSvcToolkit.retrieveMultiple({
                entityName: "mtc_licensing",
                async: false,
                odataQuery: "$filter=mtc_name eq " + "'" + _0x6a2bx50 + "" + "'" + "&$orderby=mtc_name",
                successCallback: function (result) {
                    if (result.length > 0) {
                        if (result !== null && typeof result !== "undefined") {
                            if (result[0] !== null && result[0] !== "undefined") {
                                if (result[0].mtc_name !== null && result[0].mtc_name !== "undefined") {
                                    var resultData = result[0].mtc_name.split(";");
                                    if (resultData.length > 0) {
                                        isProduct = resultData[0];
                                        if (resultData[1].split(":").length > 0) {
                                            isValid = resultData[1].split(":")[1];
                                        } else {
                                            isValid = resultData[1];
                                        }

                                    }
                                }
                            }
                        }
                    }
                },
                errorCallback: function (error) {
                    Xrm.Utility.alertDialog(error.message);
                }
            });          
    _0x6a2bx55[0] = isProduct;
    _0x6a2bx55[1] = isValid;
    return _0x6a2bx55;
}
function getServerUrl() {
    var _0x6a2bx5a = null;
    if (parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[151]][_0x66e2[235]] != null) {
        _0x6a2bx5a = parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[151]][_0x66e2[235]]();
        if (_0x6a2bx5a[_0x66e2[236]](/\/$/)) {
            _0x6a2bx5a = _0x6a2bx5a[_0x66e2[145]](0, _0x6a2bx5a[_0x66e2[51]] - 1);
        }
        ;
        var _0x6a2bx5b = location[_0x66e2[237]];
        if (_0x6a2bx5b[_0x66e2[142]](_0x6a2bx5a) == -1) {
            var _0x6a2bx5c = _0x6a2bx5a[_0x66e2[239]](_0x66e2[238]);
            var _0x6a2bx5d = _0x6a2bx5a[_0x66e2[145]](0, _0x6a2bx5c);
            _0x6a2bx5a = _0x6a2bx5a[_0x66e2[27]](_0x6a2bx5d, _0x6a2bx5b[_0x66e2[145]](0, _0x6a2bx5b[_0x66e2[142]](_0x6a2bx5a[_0x66e2[145]](_0x6a2bx5c))));
        }
    }
    else {
        _0x6a2bx5a = parent[_0x66e2[7]][_0x66e2[6]][_0x66e2[151]][_0x66e2[150]]();
    }
    ;
    return _0x6a2bx5a;
}
function getHtmlContent(rtype, imgsr, rrecord, rfile, pmobj) {
    if (rtype == "cd")
        return $(top.window.document.body).append('<div id="progressbarlayer" class="testClass" style="z-index: 999; display: block; position: absolute;  top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,0.5); width: 100%; height: 100%;"><div style="margin: 10px; background-color: white;height: 930px;    overflow: auto;"><img id="closeBtn" style="height: 16px; width: 16px;float: right;background-color: #f00; position: fixed;top: 60px; right: 30px; color: #fff;  padding: 5px; border-radius: 14px; cursor: pointer;" src="/WebResources/new_deleteImage" alt="delete" /><img style="" src="' + imgsr + '"/></div></div>');
    if (rtype == "arq")
        return $('<div class="image-div" ><input type="checkbox" id="' + rrecord.AnnotationId + '" onclick="selecImage()"/><img style="width:100%;height:100%;" ondblclick="openPicture()" id="' + rrecord.ObjectId.Id + '_' + rrecord.AnnotationId + '" src="data:' + rrecord.MimeType + ';base64,' + rrecord.DocumentBody + '"</img></div>');
    if (rtype == "pmr")
        return $('<div class="image-div"><input type="checkbox" id="' + pmobj.noteId + '" onclick="selecImage()"/><img style="width:100%;height:100%;" ondblclick="openPicture()" id="' + pmobj.droppedImageId + '_' + pmobj.noteId + '"  src=' + pmobj.base64Data + ' ></img></div>');
    //img = $('<div class="image-div" ><input type="checkbox" id="' + rrecord.AnnotationId + '" onclick="selecImage()"/><img style="width:100%;height:100%;" ondblclick="openPicture()" id="' + rrecord.ObjectId.Id + '_' + rrecord.AnnotationId + '" file="' + rfile + '" src="data:' + rrecord.MimeType + ';base64,' + rrecord.DocumentBody + '"</img></div>');
    //$('<div class="image-div"><input type="checkbox" id="' + pmobj.noteId + '" onclick="selecImage()"/><img style="width:100%;height:100%;" ondblclick="openPicture()" id="' + pmobj.droppedImageId + '_' + pmobj.noteId + '" file=' + pmobj.file + ' src=' + pmobj.base64Data + ' ></img></div>');
}
function getValidateDiv() {
    return $('<div/>', { text: 'Contact MTC For Purchaseing CRM Picture License key', id: 'validateDiv', style: 'height:50px;width:500px;font-family:Arial,Helvetica,Sans-serif;font-size:18px;color:#000000;text-align:center;position:relative;top:30%;' });
}
function getDisplayArea() {
    return '<div id="NoAttachements" style="background-color:lightgrey;text-align:center;vertical-align:middle;width:100%;height:100%;position:relative;font-weight: bold;font-size:30px;font-style:bold;"><span style="color:grey"></br>Drop files here to upload</span></div>';
}
    </script>
    <div class="main-div">
      <div class="header-div">
        <div class="image-upload" style="float: left;">
          <label for="file-input"><img id="addPhoto" src="/_imgs/grid/add_16_new.png" alt="Add" title="To Add Image" style="width: 16px; height: 16px; cursor: pointer;"></label><input id="file-input" type="file" accept="image/gif, image/jpeg, image/jpg, image/png, image/bmp, image/tiff, image/*" onchange="readURL(this);">
        </div>
        <img id="deletePhoto" onclick="deletePic();" src="/_imgs/grid/actions_delete_bin_16.png" alt="Delete" title="To Delete Image" style="width: 16px; height: 16px; float: left; padding-left: 12px; cursor: pointer;"><img id="setImage" onclick="setRecordImage()" src="/_imgs/htmlbar/cmd-insertimage.gif" alt="SetImage" title="To Set Image" style="width: 16px; height: 16px; float: left; padding-left: 12px; cursor: pointer;"><img id="webCam" onclick="openHTML()" src="/WebResources/mtcnp_/CrmPictures/Images/WebCam.png" alt="CaptureImage" title="To Capture Image" style="width: 16px; height: 16px; float: left; padding-left: 12px; cursor: pointer;display:none">
      </div>
      <div class="body-content" id="drop">
        <div class="inner-body" id="imagesBindingArea"></div>
      </div>
      <div id="loading" style="display: none;">
        <div id="LoadingPannelinnerdiv" style="position: absolute; top: 50%; left: 50%;">
          <img alt="Loading" src="/_imgs/advfind/progress.gif"><br>
          <label style="text-align: left;">Loading...</label>
        </div>
      </div>
    </div>
    <div style="top: 50%; position: relative;" id="validateingdiv" align="center"></div>
  </body>
</html>