1// Overlay.js 2// ~~~~~~~~~~ 3// JavaScript functions for 'Donors Only' access, 4// to enable/disable advanced search database features. 5// Warren Blatt, June 2005. 6// Updated April 2012, June 2015, August 2015. 7 8 9var objOverlay = null; // Overlay pop-up window (a <DIV>) 10var OverlayInited = false; 11 12var ovstyle = null; 13var message = null; 14 15function OverlayInit(loginState) 16{ 17 objOverlay = document.createElement("div"); 18 document.body.appendChild(objOverlay); 19 20 ovstyle = objOverlay.style; 21 22 ovstyle.display = "none" 23 ovstyle.visibility = "visible" 24 ovstyle.position = "absolute" 25 ovstyle.backgroundColor = "#F5F5F5" 26 ovstyle.opacity = "0.85" 27 ovstyle.zIndex = "2147483647" // max 28 29 //objOverlay.onmouseout = OverlayKill; 30 31 // Create the message to be displayed in the overlay. 32 // The "loginState" variable (set by Access.asp) can be: 33 // - "NoLog" - - User is NOT logged in. 34 // - "NotDonor" - User is logged in, and is NOT a VAS donor. 35 36 message = "The advanced database search features are available only to<BR>" + 37 "contributors of $100 annually to the JewishGen General Fund.<BR>" + 38 "To become a contributor, " + 39 "<A HREF='/JewishGen/ValueAdded.asp'>click here</A>."; 40 41 if ( loginState == "NoLog" ) 42 { 43 message += "<BR>If you are already a contributor, " + 44 "<A HREF='/CURE/'>click here to login</A>."; 45 } 46 47 OverlayInited = true; 48} 49 50 51function OverlayKill() 52{ 53 //ovstyle.transition = "opacity 3s 2s, display 0s 5s"; 54 //ovstyle.opacity = "0.00"; 55 ovstyle.display = "none"; 56 //Alex kotovsky 02.04.20 57 if(document.getElementById('allcountry')){ 58 var op = document.getElementById("allcountry").getElementsByTagName("option"); 59 for (var i = 0; i < op.length; i++) { 60 // lowercase comparison for case-insensitivity 61 if(op[i].value.toLowerCase() == "cemetery"){ 62 op[i].disabled = false; 63 break; 64 } 65 } 66 } 67 68} 69 70 71function OverlayPopup(objTrig, loginState) 72{ 73 if ( ! OverlayInited ) 74 { OverlayInit(loginState); } 75 76 var offsetTrail = objTrig; 77 var offsetTop = 0; 78 var offsetLeft = 0; 79 while (offsetTrail) 80 { 81 offsetTop += offsetTrail.offsetTop; 82 offsetLeft += offsetTrail.offsetLeft; 83 offsetTrail = offsetTrail.offsetParent; 84 } 85 86 ovstyle.top = offsetTop; 87 ovstyle.left = offsetLeft; 88 89 var content = "<TABLE BORDER='1' " + 90 " WIDTH=" + parseInt(objTrig.offsetWidth) + 91 " HEIGHT="+ parseInt(objTrig.offsetHeight) + ">" + 92 "<TR><TD ALIGN='center'>" + message + "</TR></TD></TABLE>"; 93 94 objOverlay.innerHTML = content; 95 96 //ovstyle.opacity = "0.85"; 97 ovstyle.display = ''; 98 //Alex kotovsky 02.04.20 99 if(document.getElementById('allcountry')){ 100 var op = document.getElementById("allcountry").getElementsByTagName("option"); 101 for (var i = 0; i < op.length; i++) { 102 // lowercase comparison for case-insensitivity 103 if(op[i].value.toLowerCase() == "cemetery"){ 104 op[i].disabled = true; 105 break; 106 } 107 } 108 } 109}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.