ungm.in-tend.co.uk Open in urlscan Pro
157.96.10.146  Public Scan

URL: https://ungm.in-tend.co.uk/paho/aspx/home
Submission: On July 31 via api from IE — Scanned from GB

Form analysis 1 forms found in the DOM

POST #

<form method="post" action="#" id="Master">
  <div class="aspNetHidden">
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="">
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="">
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
      value="/wEPDwUJODk2NjkzMTQ4D2QWAmYPZBYCAgEPZBYGAgYPZBYCZg8QZGQWAGQCCQ9kFgICAQ9kFgQCAQ8WAh4LXyFJdGVtQ291bnQCBxYOZg9kFgJmDxUEAmVuB0VuZ2xpc2gHRW5nbGlzaBdpbWFnZXMvTGFuZ3VhZ2VzL2VuLnBuZ2QCAQ9kFgJmDxUEBXB0LVBUClBvcnR1Z3XDqnMKUG9ydHVndcOqcxppbWFnZXMvTGFuZ3VhZ2VzL3B0LVBULnBuZ2QCAg9kFgJmDxUEBXB0LUJSFFBvcnR1Z3XDqnMgZG8gQnJhc2lsFFBvcnR1Z3XDqnMgZG8gQnJhc2lsGmltYWdlcy9MYW5ndWFnZXMvcHQtQlIucG5nZAIDD2QWAmYPFQQCaXQISXRhbGlhbm8ISXRhbGlhbm8XaW1hZ2VzL0xhbmd1YWdlcy9pdC5wbmdkAgQPZBYCZg8VBAVmci1GUglGcmFuw6dhaXMJRnJhbsOnYWlzGmltYWdlcy9MYW5ndWFnZXMvZnItRlIucG5nZAIFD2QWAmYPFQQFZXMtRVMIRXNwYcOxb2wIRXNwYcOxb2waaW1hZ2VzL0xhbmd1YWdlcy9lcy1FUy5wbmdkAgYPZBYCZg8VBAVjeS1HQgVXZWxzaAVXZWxzaBppbWFnZXMvTGFuZ3VhZ2VzL2N5LUdCLnBuZ2QCAw9kFgICAQ8QZGQWAGQCFA9kFgJmDxAPFgYeDkRhdGFWYWx1ZUZpZWxkBQhVbmlxdWVJRB4NRGF0YVRleHRGaWVsZAUGUmVhc29uHgtfIURhdGFCb3VuZGdkEBUBABUBAi0xFCsDAWdkZGQV3a32/oODDMLaL3DS2TEsmfBph0FmbORetYNJreJQrg==">
  </div>
  <script type="text/javascript">
    //<![CDATA[
    var theForm = document.forms['Master'];
    if (!theForm) {
      theForm = document.Master;
    }

    function __doPostBack(eventTarget, eventArgument) {
      if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
      }
    }
    //]]>
  </script>
  <script src="https://ajax.aspnetcdn.com/ajax/4.6/1/WebForms.js" type="text/javascript"></script>
  <script type="text/javascript">
    //<![CDATA[
    window.WebForm_PostBackOptions || document.write(
      '<script type="text/javascript" src="/paho/WebResource.axd?d=ZCKypCAS5X2jSsF5G9mBOpnuFrWSX2Cbv9LshcNJXh667woBhCP47oc-W8tMAV0n2bPmCIpJhaMQYmmWsNbPsjsT_Dw6rcai3AQofcwaU7Y1&amp;t=637811731220000000"><\/script>'); //]]>
  </script>
  <script src="https://ajax.aspnetcdn.com/ajax/4.6/1/MicrosoftAjax.debug.js" type="text/javascript"></script>
  <script type="text/javascript">
    //<![CDATA[
    (window.Sys && Sys._Application && Sys.Observer) || document.write(
      '<script type="text/javascript" src="/paho/ScriptResource.axd?d=-nOWXFX_oWRFWg7LmeWIaNouoC60U8CG5kStAItSnnRd2unkqkNb-3_L9qUohdinIPB02-mDk-j1WbWQfKUC7muSioMXrjtIyQrSPPQ_j19A1c73mUxSNujnij-ZFUDEGXNPgLa3VIrt7QB_v2Jq2Dt6FXPe5cUd__OvlC1uV4pg1X9Zsh6vB9jsU-1yCtB90&t=ffffffffaa493ab8"><\/script>'
      ); //]]>
  </script>
  <script type="text/javascript">
    //<![CDATA[
    if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
    //]]>
  </script>
  <script src="https://ajax.aspnetcdn.com/ajax/4.6/1/MicrosoftAjaxWebForms.debug.js" type="text/javascript"></script>
  <script type="text/javascript">
    //<![CDATA[
    (window.Sys && Sys.WebForms) || document.write(
      '<script type="text/javascript" src="/paho/ScriptResource.axd?d=0JzUQsQm1V_BJbsPDpVgt--RhahoPNQjO5Hrds7czTzxHLAIgVMwvjl3yJkxcbPAgJ5bu9uw7gESM4GeIvvis7qA_YEncRqwb6lok8H6kkwgYl7_flKoS6nKTQFdVjmRELhTiMPgOzepMUu_NIbIlaNk372Vk8cIyeBD-3NaB5paZPk8D5PSdFd8msYOGs4P0&t=ffffffffaa493ab8"><\/script>'
      ); //]]>
  </script>
  <div class="aspNetHidden">
    <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="209C45E4">
  </div>
  <script type="text/javascript">
    //<![CDATA[
    Sys.WebForms.PageRequestManager._initialize('ctl00$scriptManager', 'Master', [], [], [], 90, 'ctl00');
    //]]>
  </script>
  <!--If the Business 2 Business Mode in the Web Config is set to on use a different Article-->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css" data-cssvars="skip" data-cssvars-job="1">
  <div class="topMenu">
    <div class="top">
      <div class="logoHolder"></div>
      <div class="headerTitle">
        <h2>Search tender notices</h2>
      </div>
    </div>
    <script>
      // Tidy up some of the pages
      $(function() {
        // Tables
        var table = $('.topMenu table.ui-widget-content');
        $(table).removeAttr('class').wrap('<div class="box box-theme" />');
        $(table).addClass('table');
        $('.topMenu tr.ui-widget-header').removeAttr('class');
        // Help
        if (window.document.URL.indexOf('Help') <= 0) {
          $('#divHelp').removeAttr('class').addClass('box box-theme shadow');
          $('#divHelp').find('.ui-widget-content').removeAttr('class').addClass('box box-theme');
          $('#divHelp br').remove();
          $('#divHelp h3').removeAttr('class').addClass('box-header font-14 bold margin-0');
          $('#divHelp').find('input, select, textarea').addClass('form-control');
          $('#divHelp').find('table').removeAttr('class').addClass('table');
          if (!$('#divHelp').children().hasClass('box-body')) {
            $('#divHelp').wrapInner('<div class="box-body" />');
          }
          $('.suggestions_label').parents('.box').not('#divHelp').addClass('suggestions_container');
          $('#divHelp').find('.box').each(function() {
            if (!$(this).children().hasClass('box-body')) {
              $(this).wrapInner('<div class="box-body" />');
              $(this).find('h3').insertBefore($(this).find('.box-body'));
            }
          });
        }
      });
    </script>
    <!--End of Business 2 Business Mode-->
    <!--If the Business 2 Business Mode in the Web Config is set to on use a different Article-->
    <!--End of Business 2 Business Mode-->
    <!--If the Business 2 Business Mode in the Web Config is set to on use a different Article-->
    <header class="main-header container">
      <nav class="navbar navbar-default" id="navbar">
        <div class="navbar-header">
          <span class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbarPortal" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </span>
        </div>
        <div class="collapse navbar-collapse" id="navbarPortal">
          <ul class="nav navbar-nav">
            <li id="home"><a href="http://www.ungm.org/"><span class="fa fa-home menu-icon"></span><span class="menu-item-pad">Home</span></a></li>
            <li id="contracts" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="fa fa-file-text-o menu-icon"></span><span class="menu-item-pad">Contracts</span></a>
              <ul class="dropdown-menu">
                <li><a href="Contracts/New" id="sm_15"><span class="fa fa-circle-o"></span> New</a></li>
                <li><a href="Contracts/Current" id="sm_16"><span class="fa fa-circle-o"></span> Current </a></li>
                <li><a href="Contracts/Expiring" id="sm_17"><span class="fa fa-circle-o"></span> Expiring</a></li>
              </ul>
            </li>
            <li id="ungm"><a href="http://www.ungm.org/"><span class="fa fa-globe menu-icon"></span><span class="menu-item-pad">UNGM</span></a></li>
            <li id="help"><a href="Help"><span class="fa fa-question-circle menu-icon"></span><span class="menu-item-pad">Help</span></a></li>
            <li id="login"><a href="https://www.ungm.org/Account/Account/Login"><span class="fa fa-sign-in menu-icon"></span><span class="menu-item-pad">Login</span></a></li>
          </ul>
        </div>
      </nav>
    </header>
    <!--End of Business 2 Business Mode-->
    <div id="FooterBuildInfo" class="Horizontal-Lang">
      <div id="LanguagesContent_footerLanguages">
        <a class="button" onclick="javascript:UpdateLanguage('en');" title="English">
                    <img alt="English" src="images/Languages/en.png">
                </a>
        <a class="button" onclick="javascript:UpdateLanguage('pt-PT');" title="Português">
                    <img alt="Português" src="images/Languages/pt-PT.png">
                </a>
        <a class="button" onclick="javascript:UpdateLanguage('pt-BR');" title="Português do Brasil">
                    <img alt="Português do Brasil" src="images/Languages/pt-BR.png">
                </a>
        <a class="button" onclick="javascript:UpdateLanguage('it');" title="Italiano">
                    <img alt="Italiano" src="images/Languages/it.png">
                </a>
        <a class="button" onclick="javascript:UpdateLanguage('fr-FR');" title="Français">
                    <img alt="Français" src="images/Languages/fr-FR.png">
                </a>
        <a class="button" onclick="javascript:UpdateLanguage('es-ES');" title="Español">
                    <img alt="Español" src="images/Languages/es-ES.png">
                </a>
        <a class="button" onclick="javascript:UpdateLanguage('cy-GB');" title="Welsh">
                    <img alt="Welsh" src="images/Languages/cy-GB.png">
                </a>
      </div>
      <script type="text/javascript">
        function UpdateLanguage(UserLanguage) {
          Proxy.postAjax("UserService", "UpdateLanguage", JSON.stringify({
            "strLanguage": UserLanguage
          }), function(data) {
            hideLoading();
            window.location.reload();
          });
        }
      </script>
    </div>
    <div id="TimeoutMessage" title="Message" style="display: none;">
      <p id="TimeoutMessageText">
      </p>
    </div>
    <div id="ExtendedMessageBox" title="Message">
    </div>
    <div id="ExtendedImageBox" title="Image" style="display: none;">
    </div>
    <div id="divCleanLoading" class="main_content">
      <!--If the Business 2 Business Mode in the Web Config is set to on use a different Article-->
      <script>
        // Tidy up some of the pages
        $(function() {
          // Tables
          var table = $('.topMenu table.ui-widget-content');
          $(table).removeAttr('class').wrap('<div class="box box-theme" />');
          $(table).addClass('table');
          $('.topMenu tr.ui-widget-header').removeAttr('class');
          // Help
          if (window.document.URL.indexOf('Help') <= 0) {
            $('#divHelp').removeAttr('class').addClass('box box-theme shadow');
            $('#divHelp').find('.ui-widget-content').removeAttr('class').addClass('box box-theme');
            $('#divHelp br').remove();
            $('#divHelp h3').removeAttr('class').addClass('box-header font-14 bold margin-0');
            $('#divHelp').find('input, select, textarea').addClass('form-control');
            $('#divHelp').find('table').removeAttr('class').addClass('table');
            if (!$('#divHelp').children().hasClass('box-body')) {
              $('#divHelp').wrapInner('<div class="box-body" />');
            }
            $('.suggestions_label').parents('.box').not('#divHelp').addClass('suggestions_container');
            $('#divHelp').find('.box').each(function() {
              if (!$(this).children().hasClass('box-body')) {
                $(this).wrapInner('<div class="box-body" />');
                $(this).find('h3').insertBefore($(this).find('.box-body'));
              }
            });
          }
        });
      </script>
      <!--End of Business 2 Business Mode-->
      <div class="content-wrapper" style="min-height: 1150px;">
        <div class="content container horizontal">
          <div class="row" style="display: none">
            <div class="col-md-12 padding-bottom-20">
              <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                                        <span class="fa fa-bars fa-2x"></span>
                                        <span class="sr-only">Toggle</span>
                                    </a>
            </div>
          </div>
          <div id="content-dmbc">
            <script type="text/javascript">
              $(document).ready(function() {
                $("#cta-register").click(function() {
                  window.location.href = "https://www.ungm.org/Vendor/Registration";
                });
                $("#cta-notices").click(function() {
                  window.location.href = "https://www.ungm.org/Public/Notice";
                });
                $("#cta-tas").click(function() {
                  window.location.href = "https://www.ungm.org/Vendor/Tas";
                });
                $("#cta-un").click(function() {
                  window.location.href = "https://www.ungm.org/UNUser/Account/Register";
                });
                $("#cta-ca").click(function() {
                  window.location.href = "https://www.ungm.org/Public/ContractAward";
                });
                $("#cta-knowledge").click(function() {
                  window.location.href = "https://www.ungm.org/Public/KnowledgeCentre";
                });
                $("#cta-about").click(function() {
                  window.location.href = "https://www.ungm.org/Public/Pages/About";
                });
                $("#cta-terms").click(function() {
                  window.location.href = "https://www.ungm.org/Public/Pages/Terms";
                });
              });
            </script>
            <div id="cta-outer">
              <div id="cta-holder">
                <div class="cta" id="cta-register">
                  <div class="ctaLink"><a href="/Vendor/Registration" id="registerLink">Register</a></div>
                  <div class="cta-overlay"></div>
                  <div class="cta-body">
                    <div class="cta-hovertext">Complete the online vendor registration form and submit it for review.</div>
                  </div>
                </div>
                <div class="cta" id="cta-notices">
                  <div class="ctaLink"><a href="/Public/Notice">Business Opportunities</a></div>
                  <div class="cta-body">
                    <div class="cta-hovertext"> Gain online access to all tender opportunities published by UN agencies on UNGM</div>
                  </div>
                </div>
                <div class="cta" id="cta-tas">
                  <div class="ctaLink"><a href="/Vendor/Tas">Tender Alert Service</a></div>
                  <div class="cta-body">
                    <div class="cta-hovertext"> Get business opportunities with the United Nations that match your companys goods or services delivered directly to your inbox </div>
                  </div>
                  <div class="clear"></div>
                </div>
                <div class="cta" id="cta-un">
                  <div class="ctaLink"><a href="/UNUser/Account/Register">UN Staff Area</a></div>
                  <div class="cta-body">
                    <div class="cta-hovertext"> Do you work for the UN? Click here to register on UNGM as a UN User and start finding the vendors you need</div>
                  </div>
                </div>
                <div class="cta" id="cta-ca">
                  <div class="ctaLink"><a href="/Public/ContractAward">Contract Awards</a></div>
                  <div class="cta-body">
                    <div class="cta-hovertext"> Search for and view contracts awarded by the UN</div>
                  </div>
                </div>
                <div class="cta" id="cta-knowledge">
                  <div class="ctaLink"><a href="/Public/KnowledgeCentre">Knowledge Centre</a></div>
                  <div class="cta-body">
                    <div class="cta-hovertext"> Learn about UN procurement in general</div>
                  </div>
                </div>
                <div class="cta" id="cta-about">
                  <div class="ctaLink"><a href="/Public/Pages/About">About UNGM</a></div>
                  <div class="cta-body">
                    <div class="cta-hovertext"> Read about the background and purpose of the United Nations Global Marketplace</div>
                  </div>
                </div>
                <div class="cta" id="cta-terms">
                  <div class="ctaLink"><a href="/Public/Pages/Terms">Terms &amp; Conditions</a></div>
                  <div class="cta-body">
                    <div class="cta-hovertext"> Terms and Conditions for the use of this website</div>
                  </div>
                </div>
              </div>
            </div>
            <script>
              // Tidy up some of the pages
              $(function() {
                // Tables
                var table = $('.topMenu table.ui-widget-content');
                $(table).removeAttr('class').wrap('<div class="box box-theme" />');
                $(table).addClass('table');
                $('.topMenu tr.ui-widget-header').removeAttr('class');
                // Help
                if (window.document.URL.indexOf('Help') <= 0) {
                  $('#divHelp').removeAttr('class').addClass('box box-theme shadow');
                  $('#divHelp').find('.ui-widget-content').removeAttr('class').addClass('box box-theme');
                  $('#divHelp br').remove();
                  $('#divHelp h3').removeAttr('class').addClass('box-header font-14 bold margin-0');
                  $('#divHelp').find('input, select, textarea').addClass('form-control');
                  $('#divHelp').find('table').removeAttr('class').addClass('table');
                  if (!$('#divHelp').children().hasClass('box-body')) {
                    $('#divHelp').wrapInner('<div class="box-body" />');
                  }
                  $('.suggestions_label').parents('.box').not('#divHelp').addClass('suggestions_container');
                  $('#divHelp').find('.box').each(function() {
                    if (!$(this).children().hasClass('box-body')) {
                      $(this).wrapInner('<div class="box-body" />');
                      $(this).find('h3').insertBefore($(this).find('.box-body'));
                    }
                  });
                }
              });
            </script>
          </div>
        </div>
      </div>
    </div>
    <div style="height: 40px;"></div>
    <!--end Wrapper-->
    <!--If the Business 2 Business Mode in the Web Config is set to on use a different Article-->
    <div class="footer" id="footer">
      <p><span>© 2016 - United Nations Global Marketplace • </span><span><a href="https://www.ungm.org/Public/Pages/Terms">Terms and Conditions</a></span></p>
    </div>
    <script>
      // Tidy up some of the pages
      $(function() {
        // Tables
        var table = $('.topMenu table.ui-widget-content');
        $(table).removeAttr('class').wrap('<div class="box box-theme" />');
        $(table).addClass('table');
        $('.topMenu tr.ui-widget-header').removeAttr('class');
        // Help
        if (window.document.URL.indexOf('Help') <= 0) {
          $('#divHelp').removeAttr('class').addClass('box box-theme shadow');
          $('#divHelp').find('.ui-widget-content').removeAttr('class').addClass('box box-theme');
          $('#divHelp br').remove();
          $('#divHelp h3').removeAttr('class').addClass('box-header font-14 bold margin-0');
          $('#divHelp').find('input, select, textarea').addClass('form-control');
          $('#divHelp').find('table').removeAttr('class').addClass('table');
          if (!$('#divHelp').children().hasClass('box-body')) {
            $('#divHelp').wrapInner('<div class="box-body" />');
          }
          $('.suggestions_label').parents('.box').not('#divHelp').addClass('suggestions_container');
          $('#divHelp').find('.box').each(function() {
            if (!$(this).children().hasClass('box-body')) {
              $(this).wrapInner('<div class="box-body" />');
              $(this).find('h3').insertBefore($(this).find('.box-body'));
            }
          });
        }
      });
    </script>
    <!--End of Business 2 Business Mode-->
    <script>
      //<![CDATA[
      var vInputString = "";
      var vVal = "";
      $(document).ready(function() {
        $('#divCleanLoading').removeClass("display_none");
        $(".box").addClass("shadow");
      });
      $(".submit_e_form").click(function() {
        var bValid = true;
        $(".submission_e_forms :input").each(function(index) {
          //check to see if this has passed validation
          if (!$($(this)[0]).valid()) {
            bValid = false;
          }
          //This is for the questions defined in the forms
          if ($(this)[0].type == "hidden") {
            vInputString = vInputString + $(this).attr("FieldName") + '¬';
          }
          //This will display which checkbox or radio button has been selected
          else if ($(this)[0].type == "checkbox" || $(this)[0].type == "radio") {
            if ($(this)[0].checked) {
              vInputString = vInputString + $(this).attr("FieldName") + '¬';
            }
          }
          //This will display the value in any textboxes
          else if ($(this)[0].type == "text") {
            vVal = $(this).val();
            vInputString = vInputString + $(this).attr("FieldName") + ': ' + vVal + '¬';
          }
          //This will display the value in any textareas
          else {
            vVal = $(this).val();
            //Handle break lines
            vVal = vVal.replace(/(\r\n|[\r\n])/g, '¬');
            vVal = vVal.replace(/(\r\n|\r|\n)/g, '¬');
            //Handle backslash
            vVal = vVal.replace(/\\/g, '\\\\');
            vInputString = vInputString + $(this).attr("FieldName") + '¬' + vVal + '¬';
          }
        });
        $("select.submission_e_forms").each(function(index) {
          vVal = $(this).val();
          vInputString = vInputString + $(this).attr("FieldName") + ': ' + vVal + '¬';
        });
        var bSend = false;
        if (bValid) {
          bSend = SumbitHTMLForm($(".submission_e_forms").attr("Emailto"), $(".submission_e_forms").attr("FormSubject"), vInputString);
        }
        if (bSend != false) {
          $(".submission_e_forms :input").each(function(index) {
            $(this).val("");
          });
        }
        hideLoading();
      });
      //]]>
    </script>
    <script>
      //<![CDATA[
      function fav() {
        var newT = document.createTextNode('Add In-Tend® to my favourites');
        var favText = 'Pan American Health Organization Electronic Tendering';
        var favLocation = 'https://ungm.in-tend.co.uk/paho/aspx/';
        var s = document.getElementById('fav');
        if (IsIE()) {
          s.appendChild(newT);
          s.style.cursor = 'pointer';
          s.onclick = function() {
            window.external.AddFavorite(favLocation, favText)
          };
        }
      }
      var pageLoaded = 0;
      window.onload = function() {
        pageLoaded = 1;
      }

      function loaded(i, f) {
        if (document.getElementById && document.getElementById(i) != null) f();
        else if (!pageLoaded) setTimeout('loaded(\'' + i + '\',' + f + ')', 100);
      }
      loaded('fav', fav);
      $("button").button({
        icons: {}
      });
      $(function() {
        $.datepicker.setDefaults($.datepicker.regional['']);
      });
      if (window.location.href.indexOf('B2B_Home') != -1) {
        $('#homeImages').removeClass('display_none');
      } else {
        $('#homeImages').addClass('display_none');
      }
      $(document).ready(function() {
        $('.ui-tabs-nav li').click(function() {
          UpdateTitle(GetActiveTabNames());
        });
        UpdateTitle(GetActiveTabNames());
      });

      function GetActiveTabNames() {
        var vTabNames = '';
        var vActiveTabs = $('.ui-tabs-active:visible a');
        if (vActiveTabs.length > 0) {
          $(vActiveTabs).each(function(index) {
            vTabNames = vTabNames + ' - ' + $(this).text()
          });
        }
        return vTabNames;
      }

      function UpdateTitle(vTitle) {
        if (vTitle.length > 0) {
          if (!$('body').attr('data-defaulttitle')) {
            $('body').attr('data-defaulttitle', document.title);
          }
          vTitle = $('body').attr('data-defaulttitle') + vTitle;
          if (document.title != vTitle) {
            document.title = vTitle;
          }
        }
      }
      //]]>
    </script>
    <!--If in B2B Mode and not on the B2B Home page open a new dialog with the full size of a selected image-->
    <script id="tmplFileHash" type="text/x-jquery-tmpl">
    </script>
    <script id="tmplFileHashText" type="text/x-jquery-tmpl">
    </script>
    <script type="text/javascript">
      //<![CDATA[
      function showHash(vType, vHash) {
        var vButtons = addExtMsgBoxButtons(new Array(), vRES_OK, function() {
          CloseExtMsgBox();
        });
        var vMessage = '<table><tr>' + '<th class="text_align_right">Type : </th><td>' + vType + '</td></tr><tr><th class="text_align_right">Key : </th><td id="hashkey">' + vHash + '</td></tr></table>';
        showExtMsgBox('Security Key', vMessage, vButtons);
      }
      //]]>
    </script>
    <script>
      // Tidy up some of the pages
      $(function() {
        // Tables
        var table = $('.topMenu table.ui-widget-content');
        $(table).removeAttr('class').wrap('<div class="box box-theme" />');
        $(table).addClass('table');
        $('.topMenu tr.ui-widget-header').removeAttr('class');
        // Help
        if (window.document.URL.indexOf('Help') <= 0) {
          $('#divHelp').removeAttr('class').addClass('box box-theme shadow');
          $('#divHelp').find('.ui-widget-content').removeAttr('class').addClass('box box-theme');
          $('#divHelp br').remove();
          $('#divHelp h3').removeAttr('class').addClass('box-header font-14 bold margin-0');
          $('#divHelp').find('input, select, textarea').addClass('form-control');
          $('#divHelp').find('table').removeAttr('class').addClass('table');
          if (!$('#divHelp').children().hasClass('box-body')) {
            $('#divHelp').wrapInner('<div class="box-body" />');
          }
          $('.suggestions_label').parents('.box').not('#divHelp').addClass('suggestions_container');
          $('#divHelp').find('.box').each(function() {
            if (!$(this).children().hasClass('box-body')) {
              $(this).wrapInner('<div class="box-body" />');
              $(this).find('h3').insertBefore($(this).find('.box-body'));
            }
          });
        }
      });
    </script>
    <div id="CertificateDialog" title="e-Signature" style="display: none;">
      <div id="certificateTabs" class="nav-tabs-custom ui-tabs ui-widget ui-widget-content ui-corner-all">
        <ul class="nav nav-tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" role="tablist">
        </ul>
        <div class="tab-content" style="display: block;">
        </div>
      </div>
    </div>
    <div id="AddCertificateDialog" title="Add Digital Certificate" style="display: none;">
      <div class="fields popup-fields">
        <div class="field-group">
          <label for="txtPFXPassword" class="width_auto">Password</label>
          <input type="password" id="txtPFXPassword" class="width-250">
        </div>
        <div class="field-group">
          <label class="width-100 m-r-10">PFX </label>
          <div id="fileDigitalCertificate">
            <input type="file" id="fileCertificate" class="width-250" title="File Certificate">
          </div>
        </div>
      </div>
    </div>
    <div id="ReturnSignatureSuccess" title="e-Signature Wizard" style="display: none;">
      <div class="popup-body">
        <span class="p-10">
          <span class="fa fa-check-circle-o fa-3x success"></span>
          <br> The return has been signed <br> You can now proceed with the submission </span>
        <div class="cert-success-details"></div>
      </div>
      <div class="row popup-bottom">
        <button type="button" id="btnSubmitReturnSignature" class="btn btn-default" onclick="javascript:submitReturnFromSuccess();"> Submit Return </button>
        <button type="button" id="btnSubmitHash" onclick="javascript:sumbitReturnHash();"> Submit Hash </button>
      </div>
    </div>
    <div id="certsuccessdetails" style="display: none;">
      <div data-removedetails="false" class="fields popup-fields">
        <div class="field-group p-t-10 signature-valid">
          <div class="float_left width_actual_10">Issued By: </div>
          <div class="certsuccessIssuedBy float_left width_90"></div>
        </div>
        <div class="field-group signature-valid">
          <div class="float_left width_actual_10">Issued To: </div>
          <div class="certsuccessIssuedTo float_left width_90"></div>
        </div>
        <div class="field-group signature-valid">
          <div class="float_left width_actual_10">Valid From:</div>
          <div class="certsuccessValidFrom float_left width_90"></div>
        </div>
        <div class="field-group signature-valid">
          <div class="float_left width_actual_10">Valid To:</div>
          <div class="certsuccessValidTo float_left width_90"></div>
        </div>
      </div>
    </div>
    <div id="ReturnSignatureFailure" title="e-Signature Wizard" style="display: none;">
      <div class="popup-body">
        <span class="p-10">
          <span class="fa fa fa-exclamation-triangle fa-3x danger"></span>
          <br> Error. The Return has not been e-signed. <br> You cannot proceed with this submission until the return is signed with a valid digital certificate. <br>
          <br>
        </span>
      </div>
    </div>
    <div id="eSignSuccess" title="e-Signature Wizard" style="display: none;">
      <div class="popup-body">
        <span class="p-10">
          <span class="fa fa-check-circle-o fa-3x success"></span>
          <br> e-Signature Successful <br>
          <br>
        </span>
        <div class="cert-success-details"></div>
      </div>
    </div>
    <div id="eSignFailure" title="e-Signature Wizard" style="display: none;">
      <div class="popup-body">
        <span class="p-10">
          <span class="fa fa-exclamation-triangle fa-3x danger"></span>
          <br> e-Signature Failed <br>
          <br>
        </span>
      </div>
    </div>
    <div id="hashDetails" title="e-Signature Wizard" style="display: none;">
      <div class="popup-body">
        <span class="p-10">
          <span id="existingHash" class="fa fa-exclamation-triangle fa-3x danger"></span>
          <span id="newHash" class="fa fa-check-circle-o fa-3x success"></span>
          <br>
          <label id="hashMessage" aria-label="Hash Message"> Empty </label>
          <br>
          <br>
          <span>
            <label>Date Received</label> : <label data-field="Recieved" aria-label="Received"> Empty </label>
            <br>
            <label>Hash Type</label> : <label data-field="SignatureType" aria-label="Signature Type"> Empty </label>
            <br>
            <label>Hash</label> : <label data-field="SignatureHash" aria-label="Signature Hash"> Empty </label>
          </span>
          <br>
          <br>
        </span>
      </div>
    </div>
    <div id="invalidHash" title="e-Signature Wizard" style="display: none;">
      <div class="popup-body">
        <span class="p-10">
          <span class="fa fa-exclamation-triangle fa-3x danger"></span>
          <br> You have recently submitted a hash for this stage, the 24 hour deadline has passed. You will no longer be able to submit or modify a return. <br>
          <br>
        </span>
      </div>
    </div>
    <script type="text/x-jquery-tmpl" id="tmplAvailableCertificates"> <tr data-id="${UniqueID}">
        <td>
            <input type="radio" name="digitalcertificate" value="${UniqueID}" />
        </td>
        <td class="issue-by">${IssuedBy}</td>
        <td class="issue-to">${IssuedTo}</td>
        <td class="valid-from">${FormatJSONDate(ValidFrom)}</td>
        <td class="valid-to">${FormatJSONDate(ValidTo)}</td>
    </tr>
</script>
    <script type="text/x-jquery-tmpl" id="tmplAvailableCertificatesEmpty"> <tr>
        <td colspan="5"></td>
    </tr>
</script>
    <script type="text/javascript">
      // Should match eSignatures.CSettings.ValidationType enum
      var signatureTypes = {
        DocumentStorage: 1,
        ReturnedDocument: 2,
        CorrespondenceAttachment: 3,
        DocumentSetAttachment: 4,
        KPI: 5,
        Return: 6,
        StageDocument: 7,
        Questionnaire: 8,
        CompanyDocument: 9,
        StageReturn: 10,
        WebReturn: 11,
        WebReturnDocument: 12,
      };
      var validHash = true;
      var externalWindow;
      var esignType = -1;
      var esignID = -1;
      var esignSession = undefined;
      var nexu = new NEXU();
      $(function() {
        $("#btnAddCertificate").click(showAddCertificatePopup);
        $("#btnRemoveCertificate").click(removeCertificate);
        $("#certificateTabs").tabs({
          active: 0,
          create: function(event, ui) {
            $("#certificateTabs > div").css("display", "block");
            $("#certificateTabs > div:not(:first)").hide();
          }
        });
        if (window.location.href.indexOf("ProjectManage") > 0) {
          $("#tabs").tabs({
            activate: function(event, ui) {
              CheckValidHash();
            }
          })
        }
        // Initialise the NexU button handlers.
        $('#signature-progress').progressbar({
          max: 100,
          value: 0
        });
        nexu.initialise();
        $("#btnRunNexU").unbind('click');
        $("#btnRunNexU").click(function() {
          nexu.getCertificates();
        });
        $("#btnRefreshNexU").unbind('click');
        $('#btnRefreshNexU').click(function() {
          nexu.initialise();
        });
      });

      function showCertificatePopup(type, id, sessionID, showSuccessDialogOnVerification) {
        esignType = type;
        esignID = id;
        esignSession = sessionID;
        // Always display the first tab in the dialog.
        $('#certificateTabs ul li').first().find('a').trigger('click');
        $('#fileXades').val('');
        // Check to see if we are dealing with a questionnaire or return if so we cannot upload the xades file at this point.
        if (type === signatureTypes.Questionnaire || type === signatureTypes.WebReturn) {
          $('#ctl03_tabXades').hide();
        } else {
          $('#ctl03_tabXades').show();
        }
        $("#CertificateDialog").dialog({
          buttons: {
            "OK": {
              text: vRES_OK,
              click: function() {
                switch ($(".cert-tab:visible").attr("id")) {
                  case "tab_PFX": {
                    signDocument(type, id, sessionID);
                    // Run sub signature processing.
                    if (type != signatureTypes.WebReturn) {
                      var cSessionIDString = "";
                      if (sessionID.length > 0) {
                        cSessionIDString = ", '" + sessionID + "'";
                      }
                      var cShowCertificate = "javascript:showCertificatePopup(" + type + ", '" + id.replace(/\\/g, '\\\\') + "'" + cSessionIDString + ")";
                      var cVerifyCertificate = "javascript:verifyDocument(" + type + ", '" + id.replace(/\\/g, '\\\\') + "'" + cSessionIDString + ")";
                      $('button[onclick]').each(function() {
                        if ($(this).attr('onclick') == cShowCertificate) {
                          $(this).hide();
                        }
                        if ($(this).attr('onclick') == cVerifyCertificate) {
                          $(this).show();
                        }
                      });
                    }
                  }
                  break;
                  case "tab_Xades": {
                    if (document.getElementById("fileXades").files.length === 0) {
                      showMessage("");
                    } else {
                      showLoading();
                      var docData = new FormData();
                      docData.append("UploadedImage", document.getElementById("fileXades").files[0]);
                      docData.append("type", 8);
                      docData.append("id", -1);
                      docData.append("id2", -1);
                      docData.append("id3", -1);
                      docData.append("xadesType", type);
                      docData.append("xadesSessionID", esignSession != undefined && esignSession.indexOf("correspondence") > -1 ? "ESIGNCORRESPONDENCE" : esignSession == undefined ? "" : esignSession);
                      docData.append("xadesID", id);
                      var request = $.ajax({
                        type: "POST",
                        url: 'fileUploader/DocumentUpload.ashx',
                        data: docData,
                        contentType: false,
                        processData: false
                      });
                      request.done(function(e, a) {
                        $('#CertificateDialog').dialog('close');
                        verifyDocument(esignType, esignID, esignSession, false);
                        // Run sub signature processing.
                        if (esignType != signatureTypes.WebReturn) {
                          $("button[onclick='javascript:showCertificatePopup(" + esignType + ", " + esignID + ")']").hide();
                          $("button[onclick='javascript:verifyDocument(" + esignType + ", " + esignID + ")']").show();
                        }
                        if (typeof postSignatureCallback == 'function') {
                          postSignatureCallback(esignID, esignSession);
                        }
                        if (typeof postSignatureRefresh == 'function') {
                          postSignatureRefresh();
                        }
                        hideLoading();
                      });
                    }
                  }
                  break;
                }
              }
            },
            "CANCEL": {
              text: "Cancel",
              click: function() {
                if ($(".cert-tab:visible").attr("id") === "tab_Java") {
                  verifyDocument(type, id, undefined, false);
                  hideLoading();
                }
                $('#CertificateDialog').dialog('close');
              },
              id: "CertCancel",
            }
          },
          width: $("#tab_PFX").length > 0 ? 1200 : 720
        });
        loadAvailableCertificates();
        verifyDocument(type, id, sessionID, true, showSuccessDialogOnVerification);
        $("#btnDocusign").unbind().click(function() {
          externalWindow = window.open("https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature&client_id=0ac21f8d-24f8-409c-9caa-615f34b9e179&redirect_uri=http://localhost:60450/aspx/ExternalSignatures.aspx&state=" + type +
            "-" + id, '_blank');
          $('#CertificateDialog').dialog('close');
        });
        $("#btnDokobit").unbind().click(function() {
          externalWindow = window.open("ExternalSignatures.aspx?ID=" + id + "&Type=" + type + "&eSign=Dokobit", undefined, 'toolbar=0,scrollbars=0,address=0,resizable=0,width=1500, height=800');
          $('#CertificateDialog').dialog('close');
        });
        $("#RunApplet").unbind().click(function() {
          externalWindow = window.open("ExternalSignatures.aspx?ID=" + id + "&Type=" + type + "&eSign=Java", undefined, 'toolbar=0,scrollbars=0,address=0,resizable=0,width=200, height=100');
        });
        nexu.initialise();
      }

      function signDocument(type, id, sessionID) {
        var service,
          method,
          popupSuccess,
          popupFailure,
          popupClass,
          buttonText,
          skipCheck = true;
        popupSuccess = "eSignSuccess";
        popupFailure = "eSignFailure";
        popupClass = "";
        var buttons = {
          "CANCEL": {
            text: "Close",
            click: function() {
              $(this).dialog("close");
            }
          }
        };
        switch (type) {
          case signatureTypes.WebReturnDocument: {
            service = "Returns";
            method = "SignReturnDoc";
          }
          break;
          case signatureTypes.StageDocument: {
            service = "ProjectStage";
            method = "SignStageDoc";
          }
          break;
          case signatureTypes.Questionnaire: {
            service = "Returns";
            method = "ESignQuestionnaire";
          }
          break;
          case signatureTypes.WebReturn: {
            service = "Returns";
            method = "SignReturn";
            popupSuccess = "ReturnSignatureSuccess";
            popupFailure = "ReturnSignatureFailure";
            popupClass = "no-close";
            buttons = {};
            skipCheck = false;
          }
          break;
          case signatureTypes.CompanyDocument: {
            service = "Registration";
            method = "SignCompanyDocument";
          }
          break;
          case signatureTypes.CorrespondenceAttachment: {
            service = "Correspondence";
            method = "SignCorrespondenceAttachment";
          }
          break;
          case signatureTypes.DocumentStorage: {
            service = "Contracts";
            method = "SignDocStorageDoc";
          }
        }
        if (validHash || skipCheck) {
          Proxy.postAjax(service, method, JSON.stringify({
            ID: id,
            Certificate: getSelectedCertificate(),
            Password: $("#txtCertificatePassword").val(),
            Session: sessionID || ""
          }), function(data) {
            if (data[method + "Result"]) {
              // Hide and show the correct buttons.
              if (esignType != signatureTypes.WebReturn) {
                $("button[onclick='javascript:showCertificatePopup(" + esignType + ", " + esignID + ")']").hide();
                $("button[onclick='javascript:verifyDocument(" + esignType + ", " + esignID + ")']").show();
              }
              $('#CertificateDialog').dialog("close");
              $("#" + popupSuccess).dialog({
                buttons: buttons,
                width: 800,
                dialogClass: popupClass
              });
              var $cert = $("#tbodyAvailableCertificates tr td input[type=radio]:checked").closest("tr");
              $(".certsuccessIssuedBy").text($cert.find(".issue-by").text());
              $(".certsuccessIssuedTo").text($cert.find(".issue-to").text());
              $(".certsuccessValidFrom").text($cert.find(".valid-from").text());
              $(".certsuccessValidTo").text($cert.find(".valid-to").text());
              $("[data-removedetails=true]").remove();
              $("#certsuccessdetails > .fields").clone().attr("data-removedetails", true).appendTo($("#" + popupSuccess + " .cert-success-details"));
              if (type == signatureTypes.WebReturn) {
                if ($(".button-submit-return:visible:first").length) {
                  buttonText = $(".button-submit-return:visible:first").text();
                }
                if ($(".button-modify-return:visible:first").length) {
                  buttonText = $(".button-modify-return:visible:first").text();
                }
                $("#btnSubmitReturnSignature").text(buttonText);
                $(document).trigger("webreturnsigned", [esignID]);
              }
            } else {
              $("#" + popupFailure).dialog({
                buttons: {
                  "CANCEL": {
                    text: "Cancel",
                    click: function() {
                      $(this).dialog("close");
                    }
                  }
                },
                width: 350
              });
            }
            hideLoading();
          });
        } else {
          $("#invalidHash").dialog({
            buttons: {
              "CANCEL": {
                text: "Cancel",
                click: function() {
                  $(this).dialog("close");
                }
              }
            },
            width: 350
          });
        }
      }

      function loadAvailableCertificates() {
        Proxy.doAjax("Projects", "GetDigitalCertificates", {}, function(data) {
          BindData(data, "#tbodyAvailableCertificates", "#tmplAvailableCertificates", "#tmplAvailableCertificatesEmpty");
          $("#tbodyAvailableCertificates tr:first input[type=radio]").prop("checked", true);
          $("#tbodyAvailableCertificates tr").click(function() {
            $(this).find("input[type=radio]").prop("checked", true);
          })
          hideLoading();
        });
      }

      function showAddCertificatePopup() {
        $("#AddCertificateDialog").dialog({
          buttons: {
            "OK": {
              text: vRES_OK,
              click: function() {
                if (document.getElementById("fileCertificate").files.length === 0) {
                  showMessage("Please upload a certificate");
                } else {
                  showLoading();
                  var docData = new FormData();
                  docData.append("UploadedImage", document.getElementById("fileCertificate").files[0]);
                  docData.append("type", 7);
                  docData.append("id", -1);
                  docData.append("id2", -1);
                  docData.append("id3", -1);
                  docData.append("pfxPassword", $("#txtPFXPassword").val());
                  var request = $.ajax({
                    type: "POST",
                    url: 'fileUploader/DocumentUpload.ashx',
                    data: docData,
                    contentType: false,
                    processData: false
                  });
                  request.done(function(e, a) {
                    loadAvailableCertificates();
                    $('#AddCertificateDialog').dialog('close');
                    hideLoading();
                  });
                }
              }
            },
            "CANCEL": {
              text: "Cancel",
              click: function() {
                $('#AddCertificateDialog').dialog('close');
              }
            }
          },
          width: 400,
          position: 'center',
          open: function(event, ui) {
            $('body').css('overflow', 'hidden');
            $('.ui-dialog-titlebar-close').remove();
          },
          close: function(event, ui) {
            ClearBodyStyle();
          }
        });
      }

      function removeCertificate() {
        var selectedCertificate = getSelectedCertificate();
        if (selectedCertificate > 0) {
          Proxy.postAjax("Projects", "RemoveCertificate", JSON.stringify({
            ID: selectedCertificate
          }), function(data) {
            loadAvailableCertificates();
          });
        }
      }

      function getSelectedCertificate() {
        var cer = $("[name=digitalcertificate]:checked").val()
        return cer === undefined ? -1 : parseInt(cer);
      }

      function submitReturnFromSuccess() {
        var stageID = $("li.ui-state-active a").attr("s");
        $('#ReturnSignatureSuccess').dialog('close');
        if ($("#submit" + stageID).not(":disabled").length) {
          $("#submit" + stageID).not(":disabled").click();
        }
      }

      function GetProjectID() {
        projectID = -1;
        if (typeof _GetProjectID == 'function') {
          projectID = _GetProjectID();
        }
        return projectID;
      }

      function sumbitReturnHash() {
        var stageID = $("li.ui-state-active a").attr("s");
        Proxy.postAjax("Returns", "SubmitReturnHash", JSON.stringify({
          ProjectID: GetProjectID(),
          StageID: stageID
        }), function(data) {
          $("#ReturnSignatureSuccess").dialog("close");
          var data = data["SubmitReturnHashResult"],
            hash = data["ReturnSignatureHash"],
            message = "";
          if (data.NewReturnSignatureHash) {
            message = "Hash created successfully, you have 24 hours from the time below to submit your return, unless the tender deadline has passed. Please refer to the tender deadline.";
            $("#existingHash").hide();
            $("#newHash").show();
          } else {
            message = "Hash already created, you have 24 hours from the time below to submit your return.";
            $("#newHash").hide();
            $("#existingHash").show();
          }
          $("#hashDetails").dialog({
            buttons: {
              "CANCEL": {
                text: "Close",
                click: function() {
                  $(this).dialog("close");
                  CheckValidHash();
                }
              }
            },
            width: 550
          });
          $("#hashMessage").text(message);
          $("label[data-field='Recieved']").text(FormatJSONDateTimeText(hash.Recieved));
          $("label[data-field='SignatureType']").text(hash.SignatureType);
          $("label[data-field='SignatureHash']").text(hash.SignatureHash);
          hideLoading();
          if (typeof ReLoadHistory === "function") ReLoadHistory();
        });
      }

      function CheckValidHash() {
        var stageID = $("li.ui-state-active a").attr("s");
        Proxy.postAjax("Returns", "CheckValidHash", JSON.stringify({
          ProjectID: projectID,
          StageID: stageID
        }), function(data) {
          var data = data["CheckValidHashResult"],
            hash = data["ReturnSignatureHash"];
          validHash = data.ValidHash;
          if (!data.ValidHash) {
            $(".button-submit-return").addClass("disabled").attr("disabled", "disabled");
            $(".button-modify-return").addClass("disabled").attr("disabled", "disabled");
          }
          hideLoading();
        });
      }

      function ExternalSignatureClosed() {
        $("#CertCancel").click();
      }

      function NEXU() {
        // Stores the data of the certificate passed back from the nexu applet certificate store
        this.certificateData = null;
        // Signature document returned from nexu service
        this.signatureDocument = {};
        // signed document from applet
        this.nexuSignature = null;
        var nexuVersion = "1.";
        // The possible states the nexu process can be in
        this.nexuStates = {
          failed: -1,
          notInitialised: 1,
          initialised: 2,
          externalScriptLoaded: 3,
          certificateAvailable: 4,
          documentAvailable: 5,
          documentSigned: 6,
          signatureCreated: 7,
          documentValidated: 8,
        };
        // The current state of the nexu process
        this.state = this.nexuStates.notInitialised;
        // Call the nexu applet to get the basic info
        // This ensures that the applet is running and the correct version
        this.initialise = function() {
          // IE
          if (!String.prototype.startsWith) {
            String.prototype.startsWith = function(searchString, position) {
              return this.substr(position || 0, searchString.length) === searchString;
            };
          }
          nexu.updateProgressBar("", 0);
          $.get("https://localhost:9895/nexu-info", function(data) {
            // something responded
            if (data.version.startsWith(nexuVersion)) {
              $('#btnRunNexU').show();
              $("#btnInstallNexU").hide();
              $('#nexu_install_notes').hide();
              $('#firefoxNotes').hide();
              $('#btnRefreshNexU').hide();
              $('#progress-control-container').show();
              $('#nexu_generate_notes').show();
              $('#error').hide();
              nexu.state = nexu.nexuStates.initialised;
              // valid version
              // load nexu script 
              nexu.loadNexuScript();
            } else {
              nexu.state = nexu.nexuStates.failed;
              // need update
              nexu.error("Error: The NexU client needs to be updated. Please go to this URL to download the latest version: http://joinup.ec.europa.eu/site/sd-dss/maven2/lu/nowina/apps/nexu-bundle/1.10.5/nexu-bundle-1.10.5.zip");
            }
          }).fail(function() {
            nexu.state = nexu.nexuStates.failed;
            // We should change the 
            $('#btnRunNexU').hide();
            $("#btnInstallNexU").show();
            $('#nexu_install_notes').show();
            $('#btnRefreshNexU').show();
            $('#progress-control-container').hide();
            $('#nexu_generate_notes').hide();
            $('#error').hide();
            if ($.browser.mozilla) {
              $('#firefoxNotes').show();
            }
            $("#btnInstallNexU").unbind("click");
            $("#btnInstallNexU").on("click", function() {
              window.location = "https://www.in-tend.co.uk/downloads/nexu-bundle.zip";
              return false;
            });
          });
        };
        // Load the javascript file from the nexu applet
        // This contains the functions to interact with the applet
        this.loadNexuScript = function() {
          var xhrObj = new XMLHttpRequest();
          xhrObj.open('GET', "https://localhost:9895/nexu.js", false);
          xhrObj.send(null);
          var se = document.createElement('script');
          se.type = "text/javascript";
          se.text = xhrObj.responseText;
          document.getElementsByTagName('head')[0].appendChild(se);
        };
        // Runs the nexu applet to allow the user to provide a certificate from their store
        this.getCertificates = function() {
          $('#error').hide();
          nexu.updateProgressBar("Loading certificates", 10);
          nexu_get_certificates(nexu.saveCertificateData, nexu.error);
        };
        // Callback of getCertificates
        // We need to save the certificate data to use when signing
        this.saveCertificateData = function(certificateData) {
          if (certificateData.response == null) {
            nexu.state = nexu.nexuStates.failed;
            nexu.error("Error: No certificate was provided by the NexU client. Please ensure you select a certificate to continue with the signing process.");
          } else {
            nexu.state = nexu.nexuStates.certificateAvailable;
            nexu.certificateData = certificateData.response;
            nexu.loadDocument();
          }
        };
        // We need to load the document to sign in order to provide it to the nexu applet
        this.loadDocument = function() {
          // Call the nexu service to get the document
          nexu.updateProgressBar("Retrieving the digest", 25);
          Proxy.postAjax("Returns", "GetNexuDocument", JSON.stringify({
            DocType: esignType,
            DocID: esignID,
            Certificate: nexu.certificateData
          }), function(data) {
            hideLoading();
            nexu.signatureDocument = data.GetNexuDocumentResult;
            nexu.signDocument();
          });
        };
        this.signDocument = function() {
          nexu.state = nexu.nexuStates.documentAvailable;
          if (nexu.signatureDocument == null) {
            nexu.error("Error: Signature not found. This may be due to being unable to create a signature due to an invalid certificate.");
          } else {
            var digestAlgo = "SHA256";
            nexu.updateProgressBar("Signing the digest", 50);
            nexu_sign_with_token_infos(nexu.certificateData.tokenId.id, nexu.certificateData.keyId, nexu.signatureDocument.Document, digestAlgo, nexu.signDocumentCallback, nexu.error);
          }
        };
        this.signDocumentCallback = function(signatureData) {
          nexu.signatureDocument.NexuSignature = signatureData;
          nexu.updateProgressBar("Generating signature", 75);
          Proxy.postAjax("Returns", "GetNexuSignature", JSON.stringify({
            DocType: esignType,
            DocID: esignID,
            Data: nexu.signatureDocument
          }), function(data) {
            hideLoading();
            if (nexu.state != nexu.nexuStates.failed) {
              nexu.updateProgressBar("Done!", 100);
              // Hide and show the correct buttons.
              if (esignType != signatureTypes.WebReturn) {
                $("button[onclick='javascript:showCertificatePopup(" + esignType + ", " + esignID + ")']").hide();
                $("button[onclick='javascript:verifyDocument(" + esignType + ", " + esignID + ")']").show();
              }
              if (esignType == signatureTypes.WebReturn) {
                $("#ReturnSignatureSuccess").dialog({
                  buttons: {},
                  width: 800,
                  dialogClass: 'no-close',
                  position: 'center',
                  open: function(event, ui) {
                    $('body').css('overflow', 'hidden');
                    $('.ui-dialog-titlebar-close').remove();
                  },
                  close: function(event, ui) {
                    ClearBodyStyle();
                  }
                });
                $(document).trigger("webreturnsigned" + esignID, [esignID]);
              } else {
                // Show the certificate details
                verifyDocument(esignType, esignID, esignSession, false);
              }
              if (typeof postSignatureCallback == 'function') {
                postSignatureCallback(esignID, esignSession);
              }
              if (typeof postSignatureRefresh == 'function') {
                postSignatureRefresh();
              }
            }
            $('#CertificateDialog').dialog('close');
          });
        };
        // Generic error handler to be passed to the nexu applet
        // This will display the error from the nexu applet to the client and stop the process
        this.error = function(error) {
          nexu.state = nexu.nexuStates.failed;
          var errorText = "";
          if (typeof error === "string") {
            errorText = error;
          } else if (error != null && error.responseJSON != null) {
            var jsonResp = error.responseJSON;
            if (jsonResp.errorMessage != null) {
              errorText = jsonResp.errorMessage;
            } else if (jsonResp.error != null) {
              errorText = jsonResp.error;
            }
          }
          $('#signature-progress-bar-text').html("Error");
          $("e#rrorcontent").html(errorText);
          $("#error").show();
        };
        this.updateProgressBar = function(action, percent) {
          $('#signature-progress-bar-text').html(action);
          $('#signature-progress').progressbar("value", percent);
        };
      }

      function format(source, params) {
        $.each(params, function(i, n) {
          source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
        })
        return source;
      };
    </script>
    <div id="VerifyCertificateDialog" title="Show Signature" style="display: none;">
      <div class="fields popup-fields">
        <div class="field-group alreadysigned">
          <label class="width_auto">This has already been signed.</label>
        </div>
        <div class="field-group">
          <label class="width_auto signature-valid">e-Signature Validation Successful.</label>
          <label class="width_auto signature-invalid">e-Signature Validation Unsuccessful.</label>
        </div>
        <div class="field-group p-t-10 signature-valid">
          <div class="float_left width_actual_10">Issued By: </div>
          <div id="verifyIssuedBy" class="float_left width_90"></div>
        </div>
        <div class="field-group signature-valid">
          <div class="float_left width_actual_10">Issued To: </div>
          <div id="verifyIssuedTo" class="float_left width_90"></div>
        </div>
        <div class="field-group signature-valid signature-date">
          <div class="float_left width_actual_10">Valid From:</div>
          <div id="verifyValidFrom" class="float_left width_90"></div>
        </div>
        <div class="field-group signature-valid signature-date">
          <div class="float_left width_actual_10">Valid To:</div>
          <div id="verifyValidTo" class="float_left width_90"></div>
        </div>
        <div class="field-group nexu-valid">
          <button type="button" class="button_width pnlUpload" style="width:auto;"> Download Signature </button>
        </div>
        <div class="field-group signature-invalid">
          <button id="btnEsignValidated" type="button" class="pnlUpload button_width"> e-Sign </button>
        </div>
      </div>
    </div>
    <script type="text/javascript">
      function verifyDocument(type, id, sessionID, preventOpen, showSuccessDialog) {
        $(".nexu-valid").hide();
        $("#VerifyCertificateDialog").dialog({
          buttons: {
            "CLOSE": {
              text: vRES_OK,
              click: function() {
                $("#VerifyCertificateDialog").dialog('close');
              }
            }
          },
          width: 800,
          autoOpen: !preventOpen
        });
        $("#btnEsignValidated").unbind("click").click(function() {
          showCertificatePopup(type, id);
        });
        var service,
          method,
          popupSuccess = '',
          popupClass = '';
        var buttons = {
          "CANCEL": {
            text: "",
            click: function() {
              $(this).dialog("close");
            }
          }
        };
        switch (type) {
          case signatureTypes.WebReturnDocument: {
            service = "Returns";
            method = "VerifyReturnDoc";
          }
          break;
          case signatureTypes.StageDocument: {
            service = "ProjectStage";
            method = "VerifyStageDoc";
          }
          break;
          case signatureTypes.Questionnaire: {
            service = "Returns";
            method = "VerifyQuestionnaire";
          }
          break;
          case signatureTypes.WebReturn: {
            service = "Returns";
            method = "VerifyReturn";
            popupSuccess = 'ReturnSignatureSuccess';
            popupClass = "no-close";
            buttons = {};
          }
          break;
          case signatureTypes.CompanyDocument: {
            service = "Registration";
            method = "VerifyCompanyDocument";
          }
          break;
          case signatureTypes.CorrespondenceAttachment: {
            service = "Correspondence";
            method = "VerifyCorrespondenceAttachment";
          }
          break;
          case signatureTypes.DocumentStorage: {
            service = "Contracts";
            method = "VerifyStorageDoc";
          }
          break;
          case signatureTypes.KPI: {
            service = "Contracts";
            method = "VerifyKPIInstance";
          }
          break;
        }
        Proxy.postAjax(service, method, JSON.stringify({
          ID: id,
          Session: sessionID || ""
        }), function(data) {
          data = data[method + "Result"];
          $("#VerifyCertificateDialog .signature-valid").toggle(data.IsValid);
          $("#VerifyCertificateDialog .signature-invalid").toggle(!data.IsValid);
          $("#VerifyCertificateDialog .alreadysigned").hide();
          if (data.IsValid) {
            var from = new Date(parseInt((data.ValidFrom.substr(6))));
            $("#verifyIssuedBy").text(data.Issuer);
            $("#verifyIssuedTo").text(data.Subject);
            if (from.getFullYear() === 1) {
              $(".signature-date").hide();
            } else {
              $(".signature-date").show();
              $("#verifyValidFrom").text(from);
              $("#verifyValidTo").text(FormatJSONDate(data.ValidUntil));
            }
            // If the doc is already valid then display this message and hide the e-sign popup
            if (preventOpen) {
              $('#CertificateDialog').dialog("close");
              if (showSuccessDialog === true && popupSuccess.length > 0) {
                $("#" + popupSuccess).dialog({
                  buttons: buttons,
                  width: 800,
                  dialogClass: popupClass
                });
              } else {
                $("#VerifyCertificateDialog").dialog("open");
                $("#VerifyCertificateDialog .alreadysigned").show();
              }
            }
            if (data.Type == 5 && !isNaN(id) && (type != signatureTypes.KPI && type != signatureTypes.Questionnaire)) {
              $(".nexu-valid").show();
              $(".nexu-valid button").unbind("click").click(function() {
                ViewDocument(19, id, true, type);
              });
            }
          }
          hideLoading();
        });
      }
    </script>
    <div id="RejectInvitationDialog" style="display: none;" title="Decline Invitation">
      <div id="RejectInvitationTabs" class="nav-tabs-custom">
        <div class="tab-content">
          <div id="tab_RejectInvitation">
            <div class="col-md-8 col-sm-12 col-xs-12 mb-3 form-group">
              <p>Please confirm your reasons for declining the invitation</p>
            </div>
            <div class="col-md-8 col-sm-12 col-xs-12 mb-3 form-group">
              <select name="ctl00$ctl08$ddlRejectReasons" id="ddlRejectReasons" class="form-control form-control-xs">
                <option value="-1"></option>
              </select>
            </div>
            <div class="col-xs-8 col-sm-10 form-group">
              <textarea rows="5" customfield="1" id="txtRejectReasons" name="RejectReasons" class="form-control"></textarea>
            </div>
            <div class="form-group" style="clear: both;">
              <button type="button" id="btnDecline" style="display: none;">Decline</button>
              <button type="button" id="btnCancel" style="display: none;">Cancel</button>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script type="text/javascript">
      function showRejectInvitationPopup(id) {
        $("#RejectInvitationDialog").dialog({
          buttons: {
            "OK": {
              text: "Decline",
              click: function() {
                rejectInvitation(id);
              },
              id: "btnDecline",
              class: "btn btn-default",
            },
            "CANCEL": {
              text: "Cancel",
              click: function() {
                $('#RejectInvitationDialog').dialog('close');
              },
              id: "CertCancel",
              class: "btn btn-default",
            }
          },
          width: $("RejectInvitation").length > 0 ? 1200 : 720,
          open: function(event, ui) {
            $('.ui-dialog-titlebar-close').remove();
          }
        });
      }

      function rejectInvitation(id) {
        var UID = id;
        var vddlRejectReasons = $('#ddlRejectReasons').val();
        var Reason = $('#txtRejectReasons').val();
        var URL = 'aspx/ProjectManage' + '/' + UID;
        Proxy.postAjax("Projects", "RejectInvitation", '{"iProjectID": ' + UID + ', "iRejectReason": ' + vddlRejectReasons + ' , "strRejectReason":' + '"' + Reason + '"' + ' , "strRedirectUrl":' + '"' + URL + '"' + ' }', function(result) {
          if (result) {
            //worked
            window.location = window.location;
          } else if (!result) {
            //not logged in
            window.location = 'Login';
          } else {
            //error 
            console.log(result);
            hideLoading();
            displayError('An error occured whilst rejecting the invitation. Please try again');
          }
        });
      }

      function GetProjectID() {
        projectID = -1;
        if (typeof _GetProjectID == 'function') {
          projectID = _GetProjectID();
        }
        return projectID;
      }
    </script>
    <!-- Privacy Modal -->
    <div class="modal fade" id="mdlPrivacyNotice" tabindex="-1" role="dialog" aria-labelledby="PrivacyNoticeLabel" aria-hidden="true">
      <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h4 class="modal-title" id="PrivacyNoticeLabel">Privacy Notice</h4>
          </div>
          <div class="modal-body privacy-notice">
            <div id="agreement"></div>
            <div class="row margin-top-20">
              <div class="col-xs-12 text-center">
                <div class="panel panel-default" style="margin: 0;">
                  <div class="panel-body">
                    <div class="checkbox" id="chkAcceptTermsContainer">
                      <label style="font-weight: 700 !important; font-size: 15px;">
                        <input type="checkbox" id="chkAcceptTerms"> Read and check the box </label>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <p id="pAcceptTerms" style="float: left; margin: 10px 0 0 0 !important;">
              <b>
                                        Tick the box to click that you have read and understood the
                                        &nbsp;Pan American Health Organization&nbsp;
                                        privacy notice
                                    </b>
            </p>
            <button type="button" class="btn btn-danger" data-dismiss="modal">Cancel</button>
            <button type="button" class="btn btn-success" id="btnAccept" disabled="disabled" onclick="Register(); return false;">Register</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</form>

Text Content


----------- This page is not functional with Javascript disabled or Javascript
not available ---------



SEARCH TENDER NOTICES

Toggle navigation
 * Home
 * Contracts
   * New
   * Current
   * Expiring
 * UNGM
 * Help
 * Login







Toggle
Register

Complete the online vendor registration form and submit it for review.
Business Opportunities
Gain online access to all tender opportunities published by UN agencies on UNGM
Tender Alert Service
Get business opportunities with the United Nations that match your companys
goods or services delivered directly to your inbox

UN Staff Area
Do you work for the UN? Click here to register on UNGM as a UN User and start
finding the vendors you need
Contract Awards
Search for and view contracts awarded by the UN
Knowledge Centre
Learn about UN procurement in general
About UNGM
Read about the background and purpose of the United Nations Global Marketplace
Terms & Conditions
Terms and Conditions for the use of this website


© 2016 - United Nations Global Marketplace • Terms and Conditions


Password
PFX


The return has been signed
You can now proceed with the submission

Submit Return Submit Hash
Issued By:

Issued To:

Valid From:

Valid To:


Error. The Return has not been e-signed.
You cannot proceed with this submission until the return is signed with a valid
digital certificate.



e-Signature Successful




e-Signature Failed



Empty

Date Received : Empty
Hash Type : Empty
Hash : Empty



You have recently submitted a hash for this stage, the 24 hour deadline has
passed. You will no longer be able to submit or modify a return.


This has already been signed.
e-Signature Validation Successful. e-Signature Validation Unsuccessful.
Issued By:

Issued To:

Valid From:

Valid To:

Download Signature
e-Sign

Please confirm your reasons for declining the invitation



Decline Cancel

PRIVACY NOTICE

Read and check the box

Tick the box to click that you have read and understood the  Pan American Health
Organization  privacy notice

Cancel Register
Workingclose

Please Wait



Errorclose



OK
Messageclose



OK