/*
	Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

//>>built
define("dojo/dom-style",["./sniff","./dom","./_base/window"],function(d,n,u){function v(b,a,c){a=a.toLowerCase();if("auto"==c){if("height"==a)return b.offsetHeight;if("width"==a)return b.offsetWidth}if("fontweight"==a)switch(c){case 700:return"bold";default:return"normal"}a in k||(k[a]=w.test(a));return k[a]?p(b,c):c}var f={};var q=d("webkit")?function(b){if(1==b.nodeType){var a=b.ownerDocument.defaultView;var c=a.getComputedStyle(b,null);!c&&b.style&&(b.style.display="",c=a.getComputedStyle(b,null))}return c||
{}}:d("ie")&&(9>d("ie")||d("quirks"))?function(b){return 1==b.nodeType&&b.currentStyle?b.currentStyle:{}}:function(b){if(1===b.nodeType){var a=b.ownerDocument.defaultView;return(a.opener?a:u.global.window).getComputedStyle(b,null)}return{}};f.getComputedStyle=q;var p=d("ie")?function(b,a){if(!a)return 0;if("medium"==a)return 4;if(a.slice&&"px"==a.slice(-2))return parseFloat(a);var c=b.style,e=b.runtimeStyle,g=c.left,l=e.left;e.left=b.currentStyle.left;try{c.left=a,a=c.pixelLeft}catch(m){a=0}c.left=
g;e.left=l;return a}:function(b,a){return parseFloat(a)||0};f.toPixelValue=p;var h=function(b,a){try{return b.filters.item("DXImageTransform.Microsoft.Alpha")}catch(c){return a?{}:null}},x=9>d("ie")||10>d("ie")&&d("quirks")?function(b){try{return h(b).Opacity/100}catch(a){return 1}}:function(b){return q(b).opacity},r=9>d("ie")||10>d("ie")&&d("quirks")?function(b,a){""===a&&(a=1);var c=100*a;1===a?(b.style.zoom="",h(b)&&(b.style.filter=b.style.filter.replace(RegExp("\\s*progid:DXImageTransform.Microsoft.Alpha\\([^\\)]+?\\)",
"i"),""))):(b.style.zoom=1,h(b)?h(b,1).Opacity=c:b.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+c+")",h(b,1).Enabled=!0);if("tr"==b.tagName.toLowerCase())for(c=b.firstChild;c;c=c.nextSibling)"td"==c.tagName.toLowerCase()&&r(c,a);return a}:function(b,a){return b.style.opacity=a},k={left:!0,top:!0},w=/margin|padding|width|height|max|min|offset/,t={cssFloat:1,styleFloat:1,"float":1};f.get=function(b,a){var c=n.byId(b),e=arguments.length;if(2==e&&"opacity"==a)return x(c);a=t[a]?
"cssFloat"in c.style?"cssFloat":"styleFloat":a;var g=f.getComputedStyle(c);return 1==e?g:v(c,a,g[a]||c.style[a])};f.set=function(b,a,c){var e=n.byId(b),g=arguments.length,l="opacity"==a;a=t[a]?"cssFloat"in e.style?"cssFloat":"styleFloat":a;if(3==g)return l?r(e,c):e.style[a]=c;for(var m in a)f.set(b,m,a[m]);return f.getComputedStyle(e)};return f});