<br><br>
<div id="PageContainer">
</div>

<script src="/lib/referrenceslib.js"></script>
<script>    $$ = {};
$$ = {};
$$.UI = {};
$$.UI.Table = {};
$$.UI.Table.CreateTable = function (id, theadinnerhtml, bodyinnerhtml) { return CreateTable(id, theadinnerhtml, bodyinnerhtml); };
$$.UI.Table.GenerateTheadFromArraySimple = function (array) { return GenerateTheadFromArraySimple(array); };
$$.UI.Table.GenerateTableRowFromArraySimple = function (array) { return GenerateTableRowFromArraySimple(array); };
$$.UI.ResetBrowserAndCache = function () { return ResetBrowserAndCache(); };
$$.UI.formatCurrency = function (number, withdecimal = true) { return formatCurrency(number, withdecimal); };
$$.UI.getDateInGMT8 = function () { return getDateInGMT8(); };
$$.UI.RunFunctiononMutation = function (targetidToMonitor, callbackfunction) { return RunFunctiononMutation(targetidToMonitor, callbackfunction); };
$$.UI.Element = {};
$$.UI.Element.appendtobody = function (string) { return appendtobody(string); };
$$.UI.Element.Exists = function (ElementIDtext) { ElementExists(ElementIDtext); };
$$.UI.Element.RemovebyID = function (idstring) { return removeelementbyID(idstring); };
$$.UI.Element.DeleteById = function (id) { return DeleteElementById(id); }
$$.UI.Element.getHTML = function (idetext) { return getElementhtml(idtext); };
$$.UI.Element.setHTML = function (idetext, html) { return setElementhtml(idtext, html); };
$$.UI.Element.getValue = function (idetext) { return getElementvalue(idtext); };
$$.UI.Element.setValue = function (idetext,) { return setElementvalue(idtext, value); };
$$.UI.Validate = {};
$$.UI.Validate.isValidEmail = function (email) { return isValidEmail(email); };
$$.UI.Validate.hasValidMobileFormat = function (usernumber) { return hasValidMobileFormat(usernumber); };
$$.UI.Modal = {};
$$.UI.Modal.Create = function (modalid, modaltitle, modalbody, modalfooter, modalfooterclose = true, topclosebutton = true, modalbodyclass = 'modal-body', modalheaderclass = 'modal-header') { return createmodal(modalid, modaltitle, modalbody, modalfooter, modalfooterclose, topclosebutton, modalbodyclass, modalheaderclass); };
$$.UI.Modal.Show = function (idtxt) { return modalshow(idtxt); };
$$.UI.Modal.Hide = function (idtxt) { return modalhide(); };
$$.UI.Modal.CreateAndShow = function (modalid, modaltitle, modalbody, modalfooter = '', modalfooterclose = true, topclosebutton = true, modalbodyclass = 'modal-body', modalheaderclass = 'modal-header') { return CreateAndShowModal(modalid, modaltitle, modalbody, modalfooter, modalfooterclose, topclosebutton, modalbodyclass, modalheaderclass); };
$$.UI.Modal.ModalQuickDismiss = function (modaltitle, modalbody, modalid = '', modaltohide = '', functiontodo = '', conditiontrue = true) { return ModalQuickDismiss(modaltitle, modalbody, modalid, modaltohide, functiontodo, conditiontrue) };
$$.UI.Modal.ModalContinueCancel = function (modalid, modaltitle, modalbody, continuebuttononclick, cancelbuttontext = 'Cancel', continuebuttontext = 'Continue', continuebuttoncss = 'btn btn-danger', cancelbuttoncss = 'btn btn-warning') { return ModalContinueCancel(modalid, modaltitle, modalbody, continuebuttononclick, cancelbuttontext, continuebuttontext, continuebuttoncss, cancelbuttoncss); };
$$.UI.Modal.hide = function (modalid) { return hidemodal(modalid); };
$$.UI.Modal.show = function (modalid) { return showmodal(modalid); };
$$.UI.col = function (content = '', additionalclass = '') { return col(content, additionalclass); };
$$.UI.row = function (content = '', additionalclass = '', hidden = false, style = '') { return row(content, additionalclass, hidden, style); };
$$.UI.dualcolrow = function (colcontent1, colcontent2, rowclass = '', hidden = false, style = '') { return dualcolrow(colcontent1, colcontent2, rowclass, hidden, style); };
$$.UI.Button = {};
$$.UI.Button.Default = function (content, value = '', onclick = '', idtext = '', setclass = '', addtionaldata = '') { return button(content, value, onclick, idtext, setclass, addtionaldata); };
$$.UI.Button.Warning = function (content, value = '', onclick = '', block = '', idtext = '', addclass = '', addtionaldata = '') { return buttonwarning(content, value, onclick, block, idtext, addclass, addtionaldata); };
$$.UI.Button.Danger = function (content, value = '', onclick = '', block = '', idtext = '', addclass = '', addtionaldata = '') { return buttondanger(content, value, onclick, block, idtext, addclass, addtionaldata); };
$$.UI.Button.Primary = function (content, value = '', onclick = '', block = '', idtext = '', addclass = '', addtionaldata = '') { return buttonprimary(content, value, onclick, block, idtext, addclass, addtionaldata); };
$$.UI.Button.HomeMenuButtons = function (buttonicon, buttonText, buttonGo, buttonVariabletoPass = '', iconwidth = '', iconheight = '', buttonstyle = '', buttononclick = '', divclass = '', divid = '', buttonid = '', textclass = '') { return HomeMenuButtons(buttonicon, buttonText, buttonGo, buttonVariabletoPass, iconwidth, iconheight, buttonstyle, buttononclick, divclass, divid, buttonid, textclass); };
$$.UI.Input = {};
$$.UI.Input.textInput = function (idtext = '', setclass = '', required = '', placeholder = '', value = '') { return textinput(idtext, setclass, required, placeholder, value); };
$$.UI.Input.textFormControl = function (idtext = '', addclass = '', required = '', placeholder = '', value = '') { return textformcontrol(idtext, addclass, required, placeholder, value); };
$$.UI.Card = {};
$$.UI.Card.Create = function (cardtitle = '', cardid = '', cardtools = '', cardbodyid = '', cardbodytext = '', cardbodyclassadd = '', maincardstyle = '', titlecardhide = false) { return createCard(cardtitle, cardid, cardtools, cardbodyid, cardbodytext, cardbodyclassadd, maincardstyle, titlecardhide); };
$$.UI.Card.Simple = function (title = '', text = '', id = '') { return CreateCardSimple(title, text, id); };
$$.UIalt = {};
$$.UIalt.hrefonclickButtonGO = function (pagename, pagedatastring = '') { return hrefonclickButtonGO(pagename, pagedatastring); };
$$.UIalt.generateHTMLfromarray = function (prepend, append, array, func) { return generateHTMLfromarray(prepend, append, array, func); };
$$.UIalt.imgiconuserdefault = function (imgsrc, imgwidth = '', imgheight = '', id = '') { return imgiconuserdefault(imgsrc, imgwidth, imgheight, id); };
$$.UIalt.UICardStats = {};
$$.UIalt.UICardStats.UICardStatsDetails = function (Title = '', number = 0, Unit = '', leftORright = 'left', numberid = '') { return UICardStatsDetails(Title, number, Unit, leftORright, numberid); };
$$.UIalt.UICardStats.UIStatsDetailsArray = function (statsarray) { return UIStatsDetailsArray(statsarray); };
$$.UIalt.BalanceCard = {};
$$.UIalt.BalanceCard.UIBalance_WrapperfromArray = function (statsarray) { return UIBalance_WrapperfromArray(statsarray); };
$$.UIalt.BalanceCard.UIBalance_Wrapper_WalletFooter_Item = function (maintitle = '', onclickstring = '', imgsrc = '', href = '', subtitleline1 = '', subtitleline2 = '', subtitleline3 = '', subtitleline4 = '', imgwidth = '', imgheight = '') { return UIBalance_Wrapper_WalletFooter_Item(maintitle, onclickstring, imgsrc, href, subtitleline1, subtitleline2, subtitleline3, subtitleline4, imgwidth, imgheight); };
$$.UIalt.BalanceCard.UIBalance_Wrapper_WalletFooter_Item_ButtonGO = function (maintitle, pagename, pagestring = '', iconclass = '', subtitleline1 = '', subtitleline2 = '', subtitleline3 = '', subtitleline4 = '') { return UIBalance_Wrapper_WalletFooter_Item_ButtonGO(maintitle, pagename, pagestring, iconclass, subtitleline1, subtitleline2, subtitleline3, subtitleline4); };
$$.UIalt.BalanceCard.UIBalance_Wrapper_WalletFooter_ARRAY = function (balancewrapper_item_array) { return UIBalance_Wrapper_WalletFooter_ARRAY(balancewrapper_item_array); };
$$.UIalt.BalanceCard.UIcreateBalanceBoxfromArray = function (statsarray, balancewrapper_item_array, style = 'border: solid 3px #000d88;') { return UIcreateBalanceBoxfromArray(statsarray, balancewrapper_item_array, style); };
$$.UIalt.Services = {};
$$.UIalt.Services.Button = function (imgiconsrc, title = '', onclick = '', href = '', bgcolor8 = false) { return UIServices_Button(imgiconsrc, title, onclick, href, bgcolor8); };
$$.UIalt.Services.Button_GOTOPAGE = function (imgiconsrc, title, pagename, pagedatastring = '') { return UIServices_Button_GOTOPAGE(imgiconsrc, title, pagename, pagedatastring); };
$$.UIalt.Services.FullDIV_GOTOPAGE_Array = function (title, viewallhref = '', viewallonclick = '', viewalltext = '', services_button_array) { return UIServices_FullDIV_GOTOPAGE_Array(title, viewallhref, viewallonclick, viewalltext, services_button_array); };
$$.UIalt.Services.FullDIV_ONCLICK_Array = function (title, viewallhref = '', viewallonclick = '', viewalltext = '', services_button_array) { return UIServices_FullDIV_ONCLICK_Array(title, viewallhref, viewallonclick, viewalltext, services_button_array); };
$$.UIalt.Sidetext = {};
$$.UIalt.Sidetext.UISideText_DualColumnButton = function (text, pagename, pagedatastring = '', imgsrc = '', imgwidth = '', imgheight = '') { return UISideText_DualColumnButton(text, pagename, pagedatastring, imgsrc, imgwidth, imgheight); };
$$.UIalt.Sidetext.UISideText_DualColumnButton_Array = function (sidetext_button_dualcolumn_array) { return UISideText_DualColumnButton_Array(sidetext_button_dualcolumn_array); };
$$.UIalt.UICardSimple = function (title, text = '', id = '') { return UICardSimple(title, text, id); };
$$.UIalt.RecentSearchBar = {};
$$.UIalt.RecentSearchBar.SearchBar = function (searchplaceholdertext, classtosearch, id, imgsrclefticon = '', imgsrcrighticon = '', imgwidth = '', imgheight = '') { return UIRecentSearchBar(searchplaceholdertext, classtosearch, id, imgsrclefticon, imgsrcrighticon, imgwidth, imgheight); };
$$.UIalt.RecentSearchBar.Searchable_Button_GO = function (title, subtitle, rightsidetext, classforsearch, pagename, pagedatastring = '', imgsrc, imgwidth = '', imgheight = '') { return UIRecentSearchable_Button_GO(title, subtitle, rightsidetext, classforsearch, pagename, pagedatastring, imgsrc, imgwidth, imgheight); };
$$.UIalt.RecentSearchBar.Searchable_Button_GO_ARRAY = function (title, recentssearchablebuttonarray, viewallpagetarget, viewallpagedata = '', viewalltext = '') { return UIRecentSearchable_Button_GO_ARRAY(title, recentssearchablebuttonarray, viewallpagetarget, viewallpagedata, viewalltext); };
$$.UIalt.UIListArrowButton_GO = function (title, subtitle, pagename, pagedatastring = '', imgsrc, imgwidth = '', imgheight = '') { return UIListArrowButton_GO(title, subtitle, pagename, pagedatastring, imgsrc, imgwidth, imgheight); };
$$.UIalt.RecentSearchBar.SearchBox_with_BUTTONS_FULL = function (title, recentssearchablebuttonarray, UIListArrowButtonGOARRAY = '', viewallpagetarget, viewallpagedata = '', viewalltext = '', classtosearch = '', searchid = '', searchplaceholdertext = '', searchlefticon = '', searchrighticon = '', imgwidth = '', imgheight = '') { return UISearchBox_with_BUTTONS_FULL(title, recentssearchablebuttonarray, UIListArrowButtonGOARRAY, viewallpagetarget, viewallpagedata, viewalltext, classtosearch, searchid, searchplaceholdertext, searchlefticon, searchrighticon, imgwidth, imgheight); };
$$.UIalt.Input = {};
$$.UIalt.Input.InputGroupCore = function (innerhtml = '', label = '', inputgroupid = '') { return UIinputgroupcore(innerhtml, label, inputgroupid); };
$$.UIalt.Input.InputGroup = function (placeholder, type, id, label = '', classinput = '', spanclass = '', imginsteadofspan = '', required = false, textvalue = '') { return UIInputGroup(placeholder, type, id, label, classinput, spanclass, imginsteadofspan, required, textvalue); };
$$.UIalt.Input.InputGroupSelect = function (id = '', label = '', optionsarray = '', spanclass = '', imginsteadofspan = '',selectedvalue='') { return UIInputGroupSelect(id, label, optionsarray, spanclass, imginsteadofspan,selectedvalue); };
$$.UIalt.Input.InputGroupDatePicker = function () { return UIInputGroupDatePicker(); };
$$.UIalt.Input.ArraytoOptionforSelect = function (array,selectedvalue='') { return UIArraytoOptionforSelect(array,selectedvalue); };
$$.UIalt.Input.ReplaceCurrentOptionsSelect = function (selectid, optionsarray,selectedvalue='') { return UIReplaceCurrentOptionsSelect(selectid, optionsarray,selectedvalue); };
$$.UIalt.Input.InputGroupButton = function (buttontext, buttonclass = '', buttonid = '', onclick = '', buttonstyle = '') { return UIInputGroupButton(buttontext, buttonclass, buttonid, onclick, buttonstyle); };
$$.UIalt.UISetDarkMode = function () { return UISetDarkMode(); };
$$.UIalt.UIUpdateBodyHTML = function (html = '') { return UIUpdateBodyHTML(html); };
$$.UIalt.changeTopbarTitle = function (title) { return changeTopbarTitle(title); };
$$.StatusIntToString =function(Status){return InttoStrDetailsFuncs.Status(Status);};
</script>
<script>


    LoadDataPageFunc = {};
    LoadDataPageFunc.PageTitle = 'New Page';

    LoadDataPageFunc.ids = {};
    LoadDataPageFunc.ids.PageContainer = 'PageContainer';




    LoadDataPageFunc.Initialize = function () {
        let request = new RequestData(true);
        request
            .url('/ViewLead/Details/data')
            .type('POST')
            .fromVarCache(true)
            .data({ target: currenttarget })
            .success((response) => {
                // console.log(response);
                LoadDataPageFunc.ViewLeadCurrentDetails = response.Details;
                $('#' + LoadDataPageFunc.ids.ViewLeadContainer).html(LoadDataPageFunc.LeadDetailsCard(response.Details));
                LoadDataPageFunc.Logs.LogRowHtmlPage();
            })
            .error((err) => {
                ModalQuickDismiss('Error', 'Unable to Load<br>' + errordesc);
            })
            .go();
    };

    LoadDataPageFunc.main = function () {

        changeTopbarTitle(LoadDataPageFunc.PageTitle);
        LoadDataPageFunc.Initialize();

    };




    $(document).ready(function () {
        LoadDataPageFunc.main();

    });


</script>