Witam!
Potrzebuję skrypt, który działa na tło i na osadzone PNG - tzn. z efektem alpha dla Internet Explorera, jednak taki,m który nie dawałby efektu szarego tła przy łądowaniu i zmiany wielkości obrazków, a jeśli nie da się to proszę o zmianę tego skryptu, aby nie zmieniał wielkości obrazka...
::::::::::::KOD java script:::::::::::::::::
  1. <?php
  2. <public:component>
  3. <public:attach event="onpropertychange" onevent="doFix()" />
  4.  
  5. <script type="text/javascript">
  6.  
  7. // IE5.5+ PNG Alpha Fix v1.0RC4
  8. // (c) 2004-2005 Angus Turnbull <a href=\"http://www.twinhelix.com\" target=\"_blank\">http://www.twinhelix.com</a>
  9.  
  10. // This is licensed under the CC-GNU LGPL, version 2.1 or later.
  11. // For details, see: <a href=\"http://creativecommons.org/licenses/LGPL/2.1/\" target=\"_blank\">http://creativecommons.org/licenses/LGPL/2.1/</a>
  12.  
  13.  
  14. // This must be a path to a blank image. That's all the configuration you need.
  15. if (typeof blankImg == 'undefined') var blankImg = 'http://lukasz.websignuk.com/templates/lochow2007/grafika/blank.gif';
  16.  
  17.  
  18. var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
  19.  
  20. function filt(s, m)
  21. {
  22. if (filters[f])
  23. {
  24. filters[f].enabled = s ? true : false;
  25. if (s) with (filters[f]) { src = s; sizingMethod = m }
  26. }
  27. else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
  28. }
  29.  
  30. function doFix()
  31. {
  32. // Assume IE7 is OK.
  33. if (!/MSIE (5.5|6.)/.test(navigator.userAgent) ||
  34. (event && !/(background|src)/.test(event.propertyName))) return;
  35.  
  36. var bgImg = currentStyle.backgroundImage || style.backgroundImage;
  37.  
  38. if (tagName == 'IMG')
  39. {
  40. if ((/.png$/i).test(src))
  41. {
  42. if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
  43. style.width = offsetWidth + 'px';
  44. filt(src, 'scale');
  45. src = blankImg;
  46. }
  47. else if (src.indexOf(blankImg) < 0) filt();
  48. }
  49. else if (bgImg && bgImg != 'none')
  50. {
  51. if (bgImg.match(/^url[("']+(.*.png)[)"']+$/i))
  52. {
  53. var s = RegExp.$1;
  54. if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
  55. style.width = offsetWidth + 'px';
  56. style.backgroundImage = 'none';
  57. filt(s, 'crop');
  58. // IE link fix.
  59. for (var n = 0; n < childNodes.length; n++)
  60. if (childNodes[n].style) childNodes[n].style.position = 'relative';
  61. }
  62. else filt();
  63. }
  64. }
  65. doFix();
  66. </script>
  67. </public:component>
  68. ?>