/[drupal]/contributions/themes/bluefire/pngfix.js
ViewVC logotype

Contents of /contributions/themes/bluefire/pngfix.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Feb 12 04:32:52 2008 UTC (21 months, 1 week ago) by collectivecolors
Branch: MAIN
CVS Tags: DRUPAL-5--2-2, DRUPAL-5--2-3, DRUPAL-5--2-1, HEAD
Branch point for: DRUPAL-5--2
File MIME type: text/javascript
original bluefire theme
1 var arVersion = navigator.appVersion.split("MSIE")
2 var version = parseFloat(arVersion[1])
3
4 if ((version >= 5.5) && (document.body.filters))
5 {
6 for(var i=0; i<document.images.length; i++)
7 {
8 var img = document.images[i]
9 var imgName = img.src.toUpperCase()
10 if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
11 {
12 var imgID = (img.id) ? "id='" + img.id + "' " : ""
13 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
14 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
15 var imgStyle = "display:inline-block;" + img.style.cssText
16 if (img.align == "left") imgStyle = "float:left;" + imgStyle
17 if (img.align == "right") imgStyle = "float:right;" + imgStyle
18 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
19 var strNewHTML = "<span " + imgID + imgClass + imgTitle
20 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
21 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
22 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
23 img.outerHTML = strNewHTML
24 i = i-1
25 }
26 }
27 }

  ViewVC Help
Powered by ViewVC 1.1.2