1 function domSniffer() {
3 var s = navigator.userAgent;
4 if (s.indexOf("Mac") >=0) this.mac = t;
5 if (s.indexOf("Opera") >=0) this.opera = t;
7 if (d.layers) this.n4 = t;
8 if (d.childNodes) this.dom = t;
9 if (d.all && d.plugins) this.ie = t;
11 function getContentH(lyr) {
12 return (is.n4) ? lyr.document.height : (is.ie) ? (is.mac ? lyr.offsetHeight : lyr.scrollHeight) : (is.opera) ? lyr.style.pixelHeight : (is.dom) ? lyr.offsetHeight : 0;
17 function setSize(obj, w, h) {
20 if (h) obj.height = h;
21 } else if (is.opera) {
22 // opera 5 needs pixelWidth/Height
23 if (w) obj.style.pixelWidth = w;
24 if (h) obj.style.pixelHeight = h;
26 if (w) obj.style.width = px(w);
27 if (h) obj.style.height = px(h);
30 function getElement(id, lyr) {
31 var d = (document.layers && lyr) ? lyr.document : document;
32 var obj = (document.layers) ? eval("d."+id) : (d.all) ? d.all[id] : (d.getElementById) ? d.getElementById(id) : null;
35 function set_embed_object_height(evt, embed_object) {
36 if (typeof(embed_object)=='undefined') {
38 // we are being called by the onload event handler
39 if (evt.target) { // most browsers
40 embed_object = evt.target;
41 } else if (evt.srcElement) { // IE
42 embed_object = evt.srcElement;
48 if (document.frames) { // IE
49 switch (embed_object.tagName) {
51 obj = document.frames[embed_object.name].document;
54 obj = embed_object; // already an HTML document element
57 } else { // Firefox, Safari, Opera, Chrome
58 obj = embed_object.document || embed_object.contentDocument || null;
65 var h = getContentH(obj);
67 setSize(embed_object, 0, h + 65);
69 // at some point the next two lines were important, but now it doesn't seeme to matter ?!
70 // if (document.all) {
71 // embed_object.allowTransparency = true;
72 // obj.style.backgroundColor = 'transparent';
76 is = new domSniffer();