home *** CD-ROM | disk | FTP | other *** search
- 
- function CertError()
- {
- error = '0';
-
- DocQuery=document.location.search;
- BeginError = DocQuery.indexOf("SSLError=");
-
- if (BeginError > 0)
- {
- BeginError += 9;
- EndError = DocQuery.indexOf("&", BeginError);
-
- if (EndError > 0)
- {
- error = DocQuery.substring(BeginError,EndError);
- }
- else
- {
- error = DocQuery.substring(BeginError);
- }
- }
-
- return error;
- }
-
- function PreventIgnoreCertErrors()
- {
- Policy = '0';
-
- DocQuery=document.location.search;
- BeginPolicy = DocQuery.indexOf("PreventIgnoreCertErrors=")+24;
- if (BeginPolicy > 0)
- {
- EndPolicy = DocQuery.indexOf("&", BeginPolicy);
- if (EndPolicy > 0)
- {
- Policy = DocQuery.substring(BeginPolicy,EndPolicy);
- }
- else
- {
- Policy = DocQuery.substring(BeginPolicy);
- }
- }
-
- return Policy;
- }
-
-
- function closePage() {
- window.close();
- }
-
- function BodyLoad()
- {
- var iError = CertError();
- var iPolicy = PreventIgnoreCertErrors();
- var sRealPageUrl = RealPageURL();
-
- // list of certificate errors
-
- // SecFlag: DLG_FLAGS_INVALID_CA 0x01000000
- var iCertUnknownCA = 16777216;
-
- // SecFlag: DLG_FLAGS_SEC_CERT_DATE_INVALID 0x04000000
- var iCertExpired = 67108864;
-
- // SecFlag: DLG_FLAGS_SEC_CERT_CN_INVALID 0x02000000
- var iCertCNMismatch = 33554432;
-
- // SecError: ERROR_INTERNET_SEC_CERT_REVOKED 12170
- var iCertRevoked = 12170;
-
- // show the cert errors
- if (iError == iCertRevoked)
- {
- document.all.CertRevoked.style.display="block";
- document.all.CertRevoked.innerText = L_CertRevoked_TEXT;
-
- document.all.overridelink.style.display="none";
- document.all.ImgOverride.style.display="none";
- }
- else
- {
-
- if (iError & iCertUnknownCA)
- {
- document.all.CertUnknownCA.style.display="block";
- document.all.CertUnknownCA.innerText = L_CertUnknownCA_TEXT;
- }
-
- if (iError & iCertExpired)
- {
- document.all.CertExpired.style.display="block";
- document.all.CertExpired.innerText = L_CertExpired_TEXT;
- }
-
- if (iError & iCertCNMismatch)
- {
- document.all.CertCNMismatch.style.display="block";
- document.all.CertCNMismatch.innerText = L_CertCNMismatch_TEXT;
- }
-
- if (iPolicy == 1)
- {
- document.all.overridelink.style.display="none";
- document.all.ImgOverride.style.display="none";
- }
- else
- {
- document.all.overridelink.href = sRealPageUrl;
- }
- }
- }
-
- function RealPageURL()
- {
- urlresult = '';
- DocURL=document.location.href;
-
- BeginURL=DocURL.indexOf("#",1) + 1;
- urlresult=DocURL.substring(BeginURL);
-
- if (!isExternalUrlSafeForNavigation(urlresult))
- {
- urlresult = window.document.location.toString();
- }
-
- return urlresult;
- }
-