  /*******************************************************************************************************
     Copyright	         : © Copyright 2005 by Software Paradigms InternationalInc.
     File Name	         : prjErrorHandler.js
     Description	       : ClientSide Script to display the Custom Error message.
     Calling Programs    : All the Web Pages where the custom error message is to be displayed.
     Author              : Prashanth Nandi Prakash.
     Date	               : Jul 24, 2005
  /*******************************************************************************************************/
    
  var objErrMsgPopUp = null;
  
  function DisplayErrorMessage(e, CodeId)
  {
    var ErrNumber = e.number;
    var ErrDesc   = e.description;
    var ErrUrl    = window.location.pathname;
    var ErrCode   = CodeId;
        
    strDHTMLMsg = '<DIV Id="divErrMsg" style="DISPLAY: Block">' + '\n' +
                  '  <DIV Id="divHdr" style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: white 1px solid; PADDING-LEFT: 18px; BACKGROUND: #cccccc; LEFT: 0px; PADDING-BOTTOM: 10px; FONT: 10pt tahoma; BORDER-LEFT: white 1px solid; WIDTH: 100%; PADDING-TOP: 10px; BORDER-BOTTOM: black 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 100%">' + '\n' +
                  '    <B>www.spiProject.com</B>' + '\n' +
                  '    <HR style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" SIZE="1">' + '\n' +
                  '    <DIV style="FONT-SIZE: 80%; WIDTH: 220px; LINE-HEIGHT: 1.5em; FONT-FAMILY: tahoma"><BR>' + '\n' +
                  '      There was an Error on this page.<Br> ' + '\n' +
                  '      An internal programming error may keep this <Br> ' + '\n' +
                  '      page from displaying/functioning properly. <Br> ' + '\n' +
                  '      Close the Message to continue. <Br><Br> ' + '\n' +
                  '      <Table Width="100%" style="FONT-SIZE: 100%; WIDTH: 220px; LINE-HEIGHT: 1.5em; FONT-FAMILY: tahoma"> ' + '\n' +
                  '        <Tr>' + '\n' +
                  '          <Td NoWrap><B>Error number</B></Td><Td>' + ErrNumber + '</Td>' + '\n' +
                  '        </Tr>' + '\n' +
                  '        <Tr>' + '\n' +
                  '          <Td NoWrap><B>Description</B></Td><Td>' + ErrDesc + '</Td>' + '\n' +
                  '        </Tr>' + '\n' +
                  '        <Tr>' + '\n' +
                  '          <Td NoWrap><B>CodeUrl</B></Td><Td>' + ErrUrl + '</Td>' + '\n' +
                  '        </Tr>' + '\n' +
                  '        <Tr>' + '\n' +
                  '          <Td NoWrap><B>CodeId</B></Td><Td>' + ErrCode + '</Td>' + '\n' +
                  '        </Tr>' + '\n' +
                  '      </Table>' + '\n' +
                  '      <Br><br>' + '\n' +
                  '      <Div Align=center>' + '\n' +
                  '        <BUTTON style="BORDER-RIGHT: black 1px solid; BORDER-TOP: white 1px solid; BACKGROUND: #cccccc; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: black 1px solid" onclick="parent.objErrMsgPopUp.hide();" tabIndex="-1" ID="Button3"><Font face=tahoma>Close Message</Font></BUTTON>' + '\n' +
                  '      </Div>' + '\n' +
                  '    </DIV>' + '\n' +
                  '  </DIV>' + '\n' +
                  '</DIV>';
    
    objErrMsgPopUp = window.createPopup();
    objErrMsgPopUp.document.body.innerHTML = strDHTMLMsg;
    objErrMsgPopUp.show(300, 50, 300, 300);    
  }
