var DL_HideSelects = true; var DL_HideObjects = false; var DL_HideIframes = false; var DL_ie = document.all && navigator.userAgent.indexOf("Opera") == -1; var DL_Banner; // Will be bound to the DIV element representing the layer var DL_ScrollState = 0; var DL_width, DL_height, DL_dimension; function DL_GetWH() { // // per: http://www.quirksmode.org/viewport/compatibility.html // if (self.innerWidth) { // Mozilla, Safari, Opera, Netscape 4.0 DL_width = self.innerWidth; DL_height = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight > 0) { // IE6 in Strict Mode DL_width = document.documentElement.clientWidth; DL_height = document.documentElement.clientHeight; } else if (document.body) { DL_width = document.body.clientWidth; DL_height = document.body.clientHeight; } // Default to 640x480 if the above information is missing or not well-formed if(parseInt(DL_width) == 0 || parseInt(DL_height) == 0) { DL_width = 640; DL_height = 480; } DL_dimension = DL_width} DL_GetWH(); function DL_reposition(){ // Make sure the layer is where it should be vertically. // This is executed in a loop. var scrollpos; var edge = 0; // // Scroll Pos per: http://www.quirksmode.org/viewport/compatibility.html // if (self.innerHeight) {// all except Explorer // somehow self.pageYOffset is zero at times which messes up for us :( scrollx = self.pageYOffset; scrolly = self.pageXOffset; edge = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight > 0) { // IE 6 in strict mode scrollx = document.documentElement.scrollTop; scrolly = document.documentElement.scrollLeft; edge = document.documentElement.clientHeight; } else if (document.body) { // relative sanity scrollx = document.body.scrollTop; scrolly = document.body.scrollLeft; edge = document.body.clientHeight; } if (DL_ie || document.getElementById){ DL_Banner.style.top = (parseInt(scrollx) + parseInt(edge) + -280)+'px'; DL_Banner.style.left = (parseInt(scrolly) + DL_Banner.absolute)+'px'; } } function DL_DoHideSelects() { // Optional: Hide all the Select (drop-down menu) controls on the page. // If this isn't done, selects can be visible on top of the invitation layer. var selects = document.getElementsByTagName('select'); for(i = 0; i < selects.length; i++) { selects[i].style.visibility = 'hidden'; } } function DL_DoHideIframes() { var objects = document.getElementsByTagName('iframe'); for(i = 0; i < objects.length; i++) { objects[i].style.visibility = 'hidden'; } } function DL_DoHideObjects() { var objects = document.getElementsByTagName('object'); for(i = 0; i < objects.length; i++) { if (objects[i].id != 'DL_object') objects[i].style.visibility = 'hidden'; } objects = document.getElementsByTagName('embed'); for(i = 0; i < objects.length; i++) { if (objects[i].id != 'DL_embed') objects[i].style.visibility = 'hidden'; } } function DL_DoShowSelects() { // The reverse of DL_DoHideSelects selects = document.getElementsByTagName('select'); for(i = 0; i < selects.length; i++) { selects[i].style.visibility = 'visible'; } } function DL_DoShowIframes() { var objects = document.getElementsByTagName('iframe'); for(i = 0; i < objects.length; i++) { objects[i].style.visibility = 'visible'; } } function DL_DoShowObjects() { // The reverse of DL_DoHideObjects objects = document.getElementsByTagName('object'); for(i = 0; i < objects.length; i++) { objects[i].style.visibility = 'visible'; } objects = document.getElementsByTagName('embed'); for(i = 0; i < objects.length; i++) { objects[i].style.visibility = 'visible'; } } var DL_PauseStart = 0; function DL_Scroll() { // Moves the layer // The global DL_ScrollState governs where the layer is in // its trajectory. State 0 means it hasn't appeared yet, // state -1 means it's finished and should not appear again. DL_GetWH(); switch (DL_ScrollState) { case 0: // Layer has not yet appeared DL_Banner.style.visibility = 'visible'; // Change the state. If we have a gutter, and the invitation // image fits in it, switch to state 3. Otherwise, state 1. DL_ScrollState = 1; // Further preparation: set the image to its starting position // and, if desired, hide any