
(function(){if(!IE7.loaded)return;CLASSES=/\sie7_class\d+/g;IE7.CSS.extend({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var elements=this.elements;for(var i in elements)elements[i].runtimeStyle.cssText="";this.elements={};var elements=IE7.Rule.elements;for(var i in elements){with(elements[i])className=className.replace(CLASSES,"");}
IE7.Rule.elements={};},reload:function(){this.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash();},addRecalc:function(propertyName,test,handler,replacement){this.base(propertyName,test,function(element){handler(element);IE7.CSS.elements[element.uniqueID]=element;},replacement);},recalc:function(){this.reset();this.base();},addEventHandler:function(element,type,handler){element.attachEvent(type,handler);this.handlers.push(arguments);},removeEventHandlers:function(){var handler;while(handler=this.handlers.pop()){handler[0].detachEvent(handler[1],handler[2]);}},getInlineStyles:function(){var styleSheets=document.getElementsByTagName("style"),styleSheet;for(var i=styleSheets.length-1;(styleSheet=styleSheets[i]);i--){if(!styleSheet.disabled&&!styleSheet.ie7){var cssText=styleSheet.cssText||styleSheet.innerHTML;this.styles.push(cssText);styleSheet.cssText=cssText;}}},trash:function(){var styleSheets=document.styleSheets,styleSheet,i;for(i=0;i<styleSheets.length;i++){styleSheet=styleSheets[i];if(!styleSheet.ie7&&!styleSheet.cssText){styleSheet.cssText=styleSheet.cssText;}}
this.base();},getText:function(styleSheet){return styleSheet.cssText||this.base(styleSheet);}});IE7.CSS.addEventHandler(window,"onunload",function(){IE7.CSS.removeEventHandlers();});IE7.Rule.elements={};IE7.Rule.prototype.extend({add:function(element){this.base(element);IE7.Rule.elements[element.uniqueID]=element;}});if(IE7.PseudoElement){IE7.PseudoElement.hash={};IE7.PseudoElement.prototype.extend({create:function(target){var key=this.selector+":"+target.uniqueID;if(!IE7.PseudoElement.hash[key]){IE7.PseudoElement.hash[key]=true;this.base(target);}}});}
IE7.HTML.extend({elements:{},addRecalc:function(selector,handler){this.base(selector,function(element){if(!this.elements[element.uniqueID]){handler(element);this.elements[element.uniqueID]=element;}});}});document.recalc=function(reload){if(IE7.CSS.screen){if(reload)IE7.CSS.reload();IE7.recalc();}};})();