+<public:component>\r
+<script type="text/javascript">\r
+\r
+// IE5.5+ PNG Alpha Fix v2.0 Alpha\r
+// (c) 2004-2009 Angus Turnbull http://www.twinhelix.com\r
+\r
+// This is licensed under the GNU LGPL, version 2.1 or later.\r
+// For details, see: http://creativecommons.org/licenses/LGPL/2.1/\r
+\r
+var IEPNGFix = window.IEPNGFix || {};\r
+IEPNGFix.data = IEPNGFix.data || {};\r
+\r
+\r
+// CONFIG: blankImg is the path to blank.gif, *relative to the HTML document*.\r
+// Try either:\r
+// * An absolute path like: '/images/blank.gif'\r
+// * A path relative to this HTC file like: thisFolder + 'blank.gif'\r
+var thisFolder = document.URL.replace(/(\\|\/)[^\\\/]*$/, '/');\r
+IEPNGFix.blankImg = thisFolder + 'blank.gif';\r
+\r
+\r
+IEPNGFix.fix = function(elm, src, t) {\r
+ // Applies an image 'src' to an element 'elm' using the DirectX filter.\r
+ // If 'src' is null, filter is disabled.\r
+ // Disables the 'hook' to prevent infinite recursion on setting BG/src.\r
+ // 't' = type, where background tile = 0, background = 1, IMG SRC = 2.\r
+\r
+ var h = this.hook.enabled;\r
+ this.hook.enabled = 0;\r
+\r
+ var f = 'DXImageTransform.Microsoft.AlphaImageLoader';\r
+ src = (src || '').replace(/\(/g, '%28').replace(/\)/g, '%29');\r
+\r
+ if (\r
+ src && !(/IMG|INPUT/.test(elm.nodeName) && (t != 2)) &&\r
+ elm.currentStyle.width == 'auto' && elm.currentStyle.height == 'auto'\r
+ ) {\r
+ if (elm.offsetWidth) {\r
+ elm.style.width = elm.offsetWidth + 'px';\r
+ }\r
+ if (elm.clientHeight) {\r
+ elm.style.height = elm.clientHeight + 'px';\r
+ }\r
+ if (elm.currentStyle.display == 'inline') {\r
+ elm.style.display = 'inline-block';\r
+ }\r
+ }\r
+\r
+ if (t == 1) {\r
+ elm.style.backgroundImage = 'url("' + this.blankImg + '")';\r
+ }\r
+ if (t == 2) {\r
+ elm.src = this.blankImg;\r
+ }\r
+\r
+ if (elm.filters[f]) {\r
+ elm.filters[f].enabled = src ? true : false;\r
+ if (src) {\r
+ elm.filters[f].src = src;\r
+ }\r
+ } else if (src) {\r
+ elm.style.filter = 'progid:' + f + '(src="' + src +\r
+ '",sizingMethod="' + (t == 2 ? 'scale' : 'crop') + '")';\r
+ }\r
+\r
+ this.hook.enabled = h;\r
+};\r
+\r
+\r
+IEPNGFix.process = function(elm, init) {\r
+ // Checks the onpropertychange event (on first 'init' run, a fake event)\r
+ // and calls the filter-applying-functions.\r
+\r
+ if (\r
+ !/MSIE (5\.5|6)/.test(navigator.userAgent) ||\r
+ typeof elm.filters == 'unknown'\r
+ ) {\r
+ return;\r
+ }\r
+ if (!this.data[elm.uniqueID]) {\r
+ this.data[elm.uniqueID] = {\r
+ className: ''\r
+ };\r
+ }\r
+ var data = this.data[elm.uniqueID],\r
+ evt = init ? { propertyName: 'src,backgroundImage' } : event,\r
+ isSrc = /src/.test(evt.propertyName),\r
+ isBg = /backgroundImage/.test(evt.propertyName),\r
+ isPos = /width|height|background(Pos|Rep)/.test(evt.propertyName),\r
+ isClass = !init && ((elm.className != data.className) &&\r
+ (elm.className || data.className));\r
+ if (!(isSrc || isBg || isPos || isClass)) {\r
+ return;\r
+ }\r
+ data.className = elm.className;\r
+ var blank = this.blankImg.match(/([^\/]+)$/)[1],\r
+ eS = elm.style,\r
+ eCS = elm.currentStyle;\r
+\r
+ // Required for Whatever:hover - erase set BG if className changes.\r
+ if (\r
+ isClass && (eS.backgroundImage.indexOf('url(') == -1 ||\r
+ eS.backgroundImage.indexOf(blank) > -1)\r
+ ) {\r
+ return setTimeout(function() {\r
+ eS.backgroundImage = '';\r
+ }, 0);\r
+ }\r
+\r
+ // Foregrounds.\r
+ if (isSrc && elm.src && { IMG: 1, INPUT: 1 }[elm.nodeName]) {\r
+ if ((/\.png/i).test(elm.src)) {\r
+ if (!elm.oSrc) {\r
+ // MM rollover compat\r
+ elm.oSrc = elm.src;\r
+ }\r
+ this.fix(elm, elm.src, 2);\r
+ } else if (elm.src.indexOf(blank) == -1) {\r
+ this.fix(elm, '');\r
+ }\r
+ }\r
+\r
+ // Backgrounds.\r
+ var bgSrc = eCS.backgroundImage || eS.backgroundImage;\r
+ if ((bgSrc + elm.src).indexOf(blank) == -1) {\r
+ var bgPNG = bgSrc.match(/url[("']+(.*\.png[^\)"']*)[\)"']/i);\r
+ if (bgPNG) {\r
+ if (this.tileBG && !{ IMG: 1, INPUT: 1 }[elm.nodeName]) {\r
+ this.tileBG(elm, bgPNG[1]);\r
+ this.fix(elm, '', 1);\r
+ } else {\r
+ if (data.tiles && data.tiles.src) {\r
+ this.tileBG(elm, '');\r
+ }\r
+ this.fix(elm, bgPNG[1], 1);\r
+ this.childFix(elm);\r
+ }\r
+ } else {\r
+ if (data.tiles && data.tiles.src) {\r
+ this.tileBG(elm, '');\r
+ }\r
+ this.fix(elm, '');\r
+ }\r
+ } else if ((isPos || isClass) && data.tiles && data.tiles.src) {\r
+ this.tileBG(elm, data.tiles.src);\r
+ }\r
+\r
+ if (init) {\r
+ this.hook.enabled = 1;\r
+ elm.attachEvent('onpropertychange', this.hook);\r
+ }\r
+};\r
+\r
+\r
+IEPNGFix.childFix = function(elm) {\r
+ // "hasLayout" fix for unclickable children inside PNG backgrounds.\r
+ var tags = [\r
+ 'a',\r
+ 'input',\r
+ 'select',\r
+ 'textarea',\r
+ 'button',\r
+ 'iframe',\r
+ 'object'\r
+ ],\r
+ t = tags.length,\r
+ tFix = [];\r
+ while (t--) {\r
+ var pFix = elm.all.tags(tags[t]),\r
+ e = pFix.length;\r
+ while (e--) {\r
+ tFix.push(pFix[e]);\r
+ }\r
+ }\r
+ t = tFix.length;\r
+ if (t && (/relative|absolute/i).test(elm.currentStyle.position)) {\r
+ alert('IEPNGFix: Unclickable children of element:' +\r
+ '\n\n<' + elm.nodeName + (elm.id && ' id=' + elm.id) + '>');\r
+ }\r
+ while (t--) {\r
+ if (!(/relative|absolute/i).test(tFix[t].currentStyle.position)) {\r
+ tFix[t].style.position = 'relative';\r
+ }\r
+ }\r
+};\r
+\r
+\r
+IEPNGFix.hook = function() {\r
+ if (IEPNGFix.hook.enabled) {\r
+ IEPNGFix.process(element, 0);\r
+ }\r
+};\r
+\r
+\r
+IEPNGFix.process(element, 1);\r
+\r
+</script>\r
+</public:component>\r