﻿// Copyright (c) 2007 Datamark, Inc.

/* Causes older Internet Explorer browsers to apply the Alpha Channel data (transparency) in a PNG file.
 * 
 * 1. Load the script file, identifying the path to an invisible GIF image via a manufactured attribute on the script tag.
 *    Example: <script type="text/javascript" src="./script/PNG_Magic.js" placeholder_image_path="./image/invisible_placeholder.gif">
 * 
 * 2. Invoke #updatePNGs anytime you need to apply PNG transparency.
 *    Examples: <body onload="PNG_Magic.updatePNGs();"> -or- <a href="#" onclick="PNG_Magic.updatePNGs('left_sideimages');">Make it so!</a>
 * 
 */

eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)<36?c.toString(36):String.fromCharCode(c+29))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'\\w'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3 t={g:\'\',P:8(a,b){7.g=7.N()},N:8(){3 a=\'\';3 b=l.u.E(\'head\')[0];3 c=b.E(\'R\');V(3 d=0;!9.1(a),d<c.o;d++){a=c[d].getAttribute(\'g\')}p a},L:8(a){3 b=v;4(9.1(a)){b=l.u.getElementById(a)}4(!h.1(b)){b=l.u}p b},s:8(a,b,c){4(h.1(a)&&9.1(b)){c=9.1(c)?c.k():\'\';switch(c){T\'F\':T\'O\':break;default:c=\'G\'}a.i.filter=\'progid:DXImageTransform.Microsoft.AlphaImageLoader(r=\\n\'+b+\'\\n, sizingMethod=\\n\'+c+\'\\n)\'}},updatePNGs:8(a,b){4(l.D.C.Q().q(\'; A 6.\')>=0||l.D.C.Q().q(\'; A 5.5\')>=0){4(9.1(7.g)){3 c=7.L(a);4(h.1(c.w)){3 d=v;3 e=\'\';V(3 f=0;f<c.w.o;f++){d=c.w[f];e=d.tagName.k();4((e==\'img\'||e==\'y\')&&d.r.k().q(\'.z\')>=0){7.x(d)}4(9.1(d.m.j)&&d.m.j.k().q(\'.z\')>=0){7.S(d);4(b!==false&&(e==\'a\'||e==\'y\')&&d.i.B===\'\'){d.i.B=\'relative\'}}}}}else{alert(\'Within M R tag that loads t.js, you need I specify a "g" attribute, whose value is M path I an invisible GIF O file.\')}}},x:8(a){4(h.1(a)){a.i.H=a.H+\'K\';a.i.J=a.J+\'K\';7.s(a,a.r);a.r=7.g}},S:8(a){4(h.1(a)&&9.1(a.m.j)){3 b=a.m;3 c=b.j.slice(5,b.j.o-2);3 d=b.backgroundRepeat.k()==\'no-repeat\'?\'F\':\'G\';7.s(a,c,d);a.i.j=\'url(\'+7.g+\')\'}}};h.1=8(a){p!(a===v||U a==\'undefined\')};9.1=8(a){p U a==\'string\'&&a.o>0};t.P();',[],58,'|isUsable||var|if|||this|function|String|||||||placeholder_image_path|Object|style|backgroundImage|toLowerCase|self|currentStyle|u0022|length|return|indexOf|src|updateAlphaUsingImage|PNG_Magic|document|null|all|updateImageElement|input|png|MSIE|position|appVersion|navigator|getElementsByTagName|crop|scale|width|to|height|px|getContainingElement|the|getPlaceholderImagePath|image|initialize|toUpperCase|script|updateElementBackground|case|typeof|for'.split('|'),0,{}))
var updatePNGs = PNG_Magic.updatePNGs; // Optional function arguments -- containing_element_id:String, apply_positioning:Boolean.