2 function domSniffer() {
\r
4 var s = navigator.userAgent;
\r
5 if (s.indexOf("Mac") >=0) this.mac = t;
\r
6 if (s.indexOf("Opera") >=0) this.opera = t;
\r
8 if (d.layers) this.n4 = t;
\r
9 if (d.childNodes) this.dom = t;
\r
10 if (d.all && d.plugins) this.ie = t;
\r
12 function getContentH(lyr) {
\r
13 return (is.n4) ? lyr.document.height : (is.ie) ? (is.mac ? lyr.offsetHeight : lyr.scrollHeight) : (is.opera) ? lyr.style.pixelHeight : (is.dom) ? lyr.offsetHeight : 0;
\r
18 function setSize(obj, w, h) {
\r
19 if (is.n4) with (obj) {
\r
22 } else if (is.opera) with (obj.style) {
\r
23 // opera 5 needs pixelWidth/Height
\r
24 if (w) pixelWidth = w;
\r
25 if (h) pixelHeight = h;
\r
26 } else with (obj.style) {
\r
27 if (w) width = px(w);
\r
28 if (h) height = px(h);
\r
31 function getElement(id, lyr) {
\r
32 var d = (document.layers && lyr) ? lyr.document : document;
\r
33 var obj = (document.layers) ? eval("d."+id) : (d.all) ? d.all[id] : (d.getElementById) ? d.getElementById(id) : null;
\r
36 is = new domSniffer();
\r
37 function set_iframe_height(id) {
\r
38 var iframe = getElement(id);
\r
40 obj = iframe.document;
\r
44 var h = getContentH(obj);
\r
46 setSize(iframe, 0, h);
\r