<html> <head> <title>Listing 35.13. A Wipe Transition for the Incoming Slide</title> <script language="JavaScript" type="text/javascript"> // This array holds all of the document's DHTML-able objects var dhtml_objects = new Array() // This function creates the custom objects that serve as cross-browser front-ends function create_object_array() { // All the <div> and <span> tags are stored in these variables var div_tags var span_tags var css_tags // Is the browser W3C DOM compliant? if (document.getElementById) { // If so, use getElementsByTagName() to get the <div> tags div_tags = document.getElementsByTagName("div") // Loop through the <div> tags for (var counter = 0; counter < div_tags.length; counter++) { // Store the current object current_object = div_tags[counter] // Store how the browser accesses styles object_css = current_object.style // Store the object's id object_id = current_object.id // Only store those tags that have an id if (object_id) { // create a new dhtml_object and store it in dhtml_objects dhtml_objects[object_id] = new dhtml_object(current_object, object_css, object_id) } } // Use getElementsByTagName() to get the <span> tags span_tags = document.getElementsByTagName("span") // Loop through the <span> tags for (var counter = 0; counter < span_tags.length; counter++) { // Store the current object current_object = span_tags[counter] // Store how the browser accesses styles object_css = current_object.style // Store the object's id object_id = current_object.id // Only store those tags that have an id if (object_id) { // create a new dhtml_object and store it in dhtml_objects dhtml_objects[object_id] = new dhtml_object(current_object, object_css, object_id) } } } // Is the browser DHTML DOM compliant? else if (document.all) { // If so, use document.all to get the <div> tags div_tags = document.all.tags("div") // Loop through the <div> tags for (var counter = 0; counter < div_tags.length; counter++) { // Store the current object current_object = div_tags[counter] // Store how the browser accesses styles object_css = current_object.style // Store the object's id object_id = current_object.id // Only store those tags that have an id if (object_id) { // create a new dhtml_object and store it in dhtml_objects dhtml_objects[object_id] = new dhtml_object(current_object, object_css, object_id) } } // Use document.all to get the <span> tags span_tags = document.all.tags("span") // Loop through the <span> tags for (var counter = 0; counter < span_tags.length; counter++) { // Store the current object current_object = span_tags[counter] // Store how the browser accesses styles object_css = current_object.style // Store the object's id object_id = current_object.id // Only store those tags that have an id if (object_id) { // create a new dhtml_object and store it in dhtml_objects dhtml_objects[object_id] = new dhtml_object(current_object, object_css, object_id) } } } // Is the browser LDOM compliant? else if (document.layers) { // Use document.layers to get the positioned <div> and <span> tags css_tags = document.layers // Loop through the layers for (var counter = 0; counter < css_tags.length; counter++) { // Store the current object current_object = css_tags[counter] // Store how the browser accesses styles object_css = current_object // Store the object's id object_id = current_object.id // Only store those tags that have an id if (object_id) { // create a new dhtm</body></html>