-
Notifications
You must be signed in to change notification settings - Fork 0
/
IE7.js
executable file
·6 lines (6 loc) · 32.2 KB
/
IE7.js
1
2
3
4
5
6
/*
IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards
http://code.google.com/p/ie7-js/
http://www.opensource.org/licenses/mit-license.php
*/
;(function(J,r){var i=J.IE7={version:"2.1(beta4)",toString:bE("[IE7]")};i.compat=7;var t=i.appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1]-0;if(/ie7_off/.test(top.location.search)||t<5.5||t>=i.compat)return;var B=t<6,bc=bE(),bn=r.documentElement,z,w,cc="!",W=":link{ie7-link:link}:visited{ie7-link:visited}",cd=/^[\w\.]+[^:]*$/;function bd(b,a){if(cd.test(b))b=(a||"")+b;return b};function bo(b,a){b=bd(b,a);return b.slice(0,b.lastIndexOf("/")+1)};var bF=r.scripts[r.scripts.length-1],ce=bo(bF.src);try{var P=new ActiveXObject("Microsoft.XMLHTTP")}catch(ex){}var be={};function cf(b,a){try{b=bd(b,a);if(!be[b]){P.open("GET",b,false);P.send();if(P.status==0||P.status==200){be[b]=P.responseText}}}catch(ex){}return be[b]||""};var cZ=Array.prototype.slice,da=/%([1-9])/g,cg=/^\s\s*/,ch=/\s\s*$/,ci=/([\/()[\]{}|*+-.,^$?\\])/g,bG=/\bbase\b/,bH=["constructor","toString"],bf;function C(){};C.extend=function(f,d){bf=true;var c=new this;bg(c,f);bf=false;var b=c.constructor;function a(){if(!bf)b.apply(this,arguments)};c.constructor=a;a.extend=arguments.callee;bg(a,d);a.prototype=c;return a};C.prototype.extend=function(a){return bg(this,a)};var K="#",L="#",X=".",bh="/",db=/\\(\d+)/g,cj=/\[(\\.|[^\]\\])+\]|\\.|\(\?/g,ck=/\(/g,cl=/\$(\d+)/,cm=/^\$\d+$/,cn=/(\[(\\.|[^\]\\])+\]|\\.|\(\?)|\(/g,co=/^<#\w+>$/,cp=/<#(\w+)>/g,D=C.extend({constructor:function(a){this[X]=[];this[L]={};this.merge(a)},add:function(b,a){delete this[bh];if(b instanceof RegExp){b=b.source}if(!this[K+b])this[X].push(String(b));return this[L][K+b]=new D.Item(b,a,this)},compile:function(a){if(a||!this[bh]){this[bh]=new RegExp(this,this.ignoreCase?"gi":"g")}return this[bh]},merge:function(b){for(var a in b)this.add(a,b[a])},exec:function(m){var j=this,l=j[X],k=j[L],h,g=this.compile(true).exec(m);if(g){var f=0,d=1;while((h=k[K+l[f++]])){var c=d+h.length+1;if(g[d]){if(h.replacement===0){return j.exec(m)}else{var b=g.slice(d,c),a=b.length;while(--a)b[a]=b[a]||"";b[0]={match:b[0],item:h};return b}}d=c}}return null},parse:function(m){m+="";var j=this,l=j[X],k=j[L];return m.replace(this.compile(),function(h){var g=[],f,d=1,c=arguments.length;while(--c)g[c]=arguments[c]||"";while((f=k[K+l[c++]])){var b=d+f.length+1;if(g[d]){var a=f.replacement;switch(typeof a){case"function":return a.apply(j,g.slice(d,b));case"number":return g[d+a];default:return a}}d=b}return h})},toString:function(){var f=[],d=this[X],c=this[L],b;for(var a=0;b=c[K+d[a]];a++){f[a]=b.source}return"("+f.join(")|(")+")"}},{IGNORE:null,Item:C.extend({constructor:function(j,l,k){var h=j.indexOf("(")===-1?0:D.count(j),g=k.dictionary;if(g&&j.indexOf("<#")!==-1){if(co.test(j)){var f=g[L][K+j.slice(2,-1)];j=f.replacement;h=f._4}else{j=g.parse(j)}}if(typeof l=="number")l=String(l);else if(l==null)l=0;if(typeof l=="string"&&cl.test(l)){if(cm.test(l)){var d=l.slice(1)-0;if(d&&d<=h)l=d}else{var c=l,b;l=function(a){if(!b){b=new RegExp(j,"g"+(this.ignoreCase?"i":""))}return a.replace(b,c)}}}this.length=h;this.source=String(j);this.replacement=l}}),count:function(a){return(String(a).replace(cj,"").match(ck)||"").length}}),cq=D.extend({parse:function(d){var c=this[L];return d.replace(cp,function(b,a){a=c[K+a];return a?a._5:b})},add:function(f,d){if(d instanceof RegExp){d=d.source}var c=d.replace(cn,cr);if(d.indexOf("(")!==-1){var b=D.count(d)}if(d.indexOf("<#")!==-1){d=this.parse(d);c=this.parse(c)}var a=this.base(f,d);a._5=c;a._4=b||a.length;return a},toString:function(){return"(<#"+this[PATTERNS].join(">)|(<#")+">)"}});function cr(b,a){return a||"(?:"};function bg(g,f){if(g&&f){var d=(typeof f=="function"?Function:Object).prototype;var c=bH.length,b;if(bf)while(b=bH[--c]){var a=f[b];if(a!=d[b]){if(bG.test(a)){bI(g,b,a)}else{g[b]=a}}}for(b in f)if(typeof d[b]=="undefined"){var a=f[b];if(g[b]&&typeof a=="function"&&bG.test(a)){bI(g,b,a)}else{g[b]=a}}}return g};function bI(g,f,d){var c=g[f];g[f]=function(){var b=this.base;this.base=c;var a=d.apply(this,arguments);this.base=b;return a}};function cs(d,c){if(!c)c=d;var b={};for(var a in d)b[a]=c[a];return b};function M(f){var d=arguments,c=new RegExp("%([1-"+arguments.length+"])","g");return String(f).replace(c,function(b,a){return a<d.length?d[a]:b})};function bi(b,a){return String(b).match(a)||[]};function ct(a){return String(a).replace(ci,"\\$1")};function bJ(a){return String(a).replace(cg,"").replace(ch,"")};function bE(a){return function(){return a}};var bK=D.extend({ignoreCase:true}),cu=/'/g,bL=/'(\d+)'/g,dc=/\\/g,bp=/\\([nrtf'"])/g,Q=[],cv=new bK({"<!\\-\\-|\\-\\->":"","\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/":"","@(namespace|import)[^;\\n]+[;\\n]":"","'(\\\\.|[^'\\\\])*'":bM,'"(\\\\.|[^"\\\\])*"':bM,"\\s+":" "});function cw(a){return cv.parse(a).replace(bp,"$1")};function bq(a){return a.replace(bL,cx)};function bM(b){var a=Q.length;Q[a]=b.slice(1,-1).replace(bp,"$1").replace(cu,"\\'");return"'"+a+"'"};function cx(c,b){var a=Q[b];if(a==null)return c;return"'"+Q[b]+"'"};function bN(a){return a.indexOf("'")===0?Q[a.slice(1,-1)]:a};var cy=new D({Width:"Height",width:"height",Left:"Top",left:"top",Right:"Bottom",right:"bottom",onX:"onY"});function bO(a){return cy.parse(a)};var bP=[];function br(a){cz(a);A(J,"onresize",a)};function A(c,b,a){c.attachEvent(b,a);bP.push(arguments)};function cA(c,b,a){try{c.detachEvent(b,a)}catch(ex){}};A(J,"onunload",function(){var a;while(a=bP.pop()){cA(a[0],a[1],a[2])}});function Y(c,b,a){if(!c.elements)c.elements={};if(a)c.elements[b.uniqueID]=b;else delete c.elements[b.uniqueID];return a};A(J,"onbeforeprint",function(){if(!i.CSS.print)new bQ("print");i.CSS.print.recalc()});var bR=/^\d+(px)?$/i,R=/^\d+%$/,E=function(d,c){if(bR.test(c))return parseInt(c);var b=d.style.left,a=d.runtimeStyle.left;d.runtimeStyle.left=d.currentStyle.left;d.style.left=c||0;c=d.style.pixelLeft;d.style.left=b;d.runtimeStyle.left=a;return c},bs="ie7-",bS=C.extend({constructor:function(){this.fixes=[];this.recalcs=[]},init:bc}),bt=[];function cz(a){bt.push(a)};i.recalc=function(){i.HTML.recalc();i.CSS.recalc();for(var a=0;a<bt.length;a++)bt[a]()};function bj(a){return a.currentStyle["ie7-position"]=="fixed"};function bu(b,a){return b.currentStyle[bs+a]||b.currentStyle[a]};function S(c,b,a){if(c.currentStyle[bs+b]==null){c.runtimeStyle[bs+b]=c.currentStyle[b]}c.runtimeStyle[b]=a};function bT(b){var a=r.createElement(b||"object");a.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";a.ie7_anon=true;return a};var cB="(e.nextSibling&&IE7._1(e,'next'))",cC=cB.replace(/next/g,"previous"),bU="e.nodeName>'@'",bV="if("+bU+"){",cD="(e.nodeName==='FORM'?IE7._0(e,'id'):e.id)",cE=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i,cF=/(.*)(:first-(line|letter))/,cG=/\s/,cH=/((?:\\.|[^{\\])+)\{((?:\\.|[^}\\])+)\}/g,cI=/(?:\\.|[^,\\])+/g,F=r.styleSheets,cJ=[];i.CSS=new(bS.extend({parser:new bK,screen:"",print:"",styles:[],rules:[],pseudoClasses:t<7?"first\\-child":"",dynamicPseudoClasses:{toString:function(){var b=[];for(var a in this)b.push(a);return b.join("|")}},init:function(){var h="^\x01$",g="\\[class=?[^\\]]*\\]",f=[];if(this.pseudoClasses)f.push(this.pseudoClasses);var d=this.dynamicPseudoClasses.toString();if(d)f.push(d);f=f.join("|");var c=t<7?["[>+~\\[(]|([:.])[\\w-]+\\1"]:[g];if(f)c.push(":("+f+")");this.UNKNOWN=new RegExp(c.join("|")||h,"i");var b=t<7?["\\[[^\\]]+\\]|[^\\s(\\[]+\\s*[+~]"]:[g],a=b.concat();if(f)a.push(":("+f+")");s.COMPLEX=new RegExp(a.join("|")||h,"ig");if(this.pseudoClasses)b.push(":("+this.pseudoClasses+")");Z.COMPLEX=new RegExp(b.join("|")||h,"i");d="not\\(:"+d.split("|").join("\\)|not\\(:")+"\\)|"+d;Z.MATCH=new RegExp(d?"(.*?):("+d+")(.*)":h,"i");this.createStyleSheet();this.refresh()},addEventHandler:function(){A.apply(null,arguments)},addFix:function(b,a){this.parser.add(b,a)},addRecalc:function(g,f,d,c){g=g.source||g;f=new RegExp("([{;\\s])"+g+"\\s*:\\s*"+f+"[^;}]*");var b=this.recalcs.length;if(typeof c=="string")c=g+":"+c;this.addFix(f,function(a){if(typeof c=="function")c=c(a);return(c?c:a)+";ie7-"+a.slice(1)+";ie7_recalc"+b+":1"});this.recalcs.push(arguments);return b},apply:function(){this.getInlineCSS();new bQ("screen");this.trash()},createStyleSheet:function(){r.getElementsByTagName("head")[0].appendChild(r.createElement("style"));this.styleSheet=F[F.length-1];this.styleSheet.ie7=true;this.styleSheet.owningElement.ie7=true;this.styleSheet.cssText=W},getInlineCSS:function(){var c=r.getElementsByTagName("style"),b;for(var a=c.length-1;b=c[a];a--){if(!b.disabled&&!b.ie7){b._6=b.innerHTML}}},getText:function(c,b){try{var a=c.cssText}catch(e){a=""}if(P)a=cf(c.href,b)||a;return a},recalc:function(){this.screen.recalc();var n=/ie7_recalc\d+/g,q=W.match(/[{,]/g).length,m=this.styleSheet.rules,j,l,k,h,g,f,d,c,b;for(f=q;j=m[f];f++){var a=j.style.cssText;if(l=a.match(n)){h=N(j.selectorText);if(h.length)for(d=0;d<l.length;d++){b=l[d];k=i.CSS.recalcs[b.slice(10)][2];for(c=0;(g=h[c]);c++){if(g.currentStyle[b])k(g,a)}}}}},refresh:function(){this.styleSheet.cssText=W+this.screen+this.print},trash:function(){for(var b=0;b<F.length;b++){if(!F[b].ie7){try{var a=F[b].cssText}catch(e){a=""}if(a)F[b].cssText=""}}}}));var bQ=C.extend({constructor:function(a){this.media=a;this.load();i.CSS[a]=this;i.CSS.refresh()},createRule:function(c,b){var a;if(bv&&(a=c.match(bv.MATCH))){return new bv(a[1],a[2],b)}else if(a=c.match(Z.MATCH)){if(!cE.test(a[0])||Z.COMPLEX.test(a[0])){return new Z(c,a[1],a[2],a[3],b)}}else{return new s(c,b)}return c+" {"+b+"}"},getText:function(){var u=/@media\s+([^{]+?)\s*\{([^@]+\})\s*\}/gi,T=/@import[^;\n]+/gi,O=/@import\s+url\s*\(\s*["']?|["']?\s*\)\s*/gi,U=/(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi,G=this,H={};function x(j,l,k,h){var g="";if(!h){k=n(j.media);h=0}if(k==="none"){j.disabled=true;return""}if(k==="all"||k===G.media){try{var f=!!j.cssText}catch(exe){}if(h<3&&f){var d=j.cssText.match(T);for(var c=0,b;c<j.imports.length;c++){var b=j.imports[c];var a=j._2||j.href;b._2=d[c].replace(O,"");g+=x(b,bo(a,l),k,h+1)}}g+=cw(j.href?q(j,l):j.owningElement._6);g=y(g,G.media)}return g};for(var v=0;v<F.length;v++){var o=F[v];if(!o.disabled&&!o.ie7)this.cssText+=x(o)}function y(b,a){p.value=a;return b.replace(u,p)};function p(c,b,a){b=n(b);switch(b){case"screen":case"print":if(b!==p.value)return"";case"all":return a}return""};function n(c){if(!c)return"all";var b=c.toLowerCase().split(/\s*,\s*/);c="none";for(var a=0;a<b.length;a++){if(b[a]==="all")return"all";if(b[a]==="screen"){if(c==="print")return"all";c="screen"}else if(b[a]==="print"){if(c==="screen")return"all";c="print"}}return c};function q(d,c){var b=d._2||d.href,a=bd(b,c);if(H[a])return"";H[a]=d.disabled?"":m(i.CSS.getText(d,c),bo(b,c));return H[a]};function m(b,a){return b.replace(U,"$1"+a.slice(0,a.lastIndexOf("/")+1)+"$2")}},load:function(){this.cssText="";this.getText();this.parse();if(cJ.length){this.cssText=parseInherited(this.cssText)}this.cssText=bq(this.cssText);be={}},parse:function(){var h=i.CSS.parser.parse(this.cssText),m="";this.cssText=h.replace(/@charset[^;]+;|@font\-face[^\}]+\}/g,function(a){m+=a+"\n";return""});this.declarations=bq(m);var j=i.CSS.rules.length,l=[],k;while((k=cH.exec(this.cssText))){var h=k[2];if(h){var g=t<7&&h.indexOf("AlphaImageLoader")!==-1;var f=k[1].match(cI),d;for(var c=0;d=f[c];c++){d=bJ(d);var b=i.CSS.UNKNOWN.test(d);f[c]=b?this.createRule(d,h):d+"{"+h+"}";if(g)f[c]+=this.createRule(d+">*","position:relative")}l.push(f.join("\n"))}}this.cssText=l.join("\n");this.rules=i.CSS.rules.slice(j)},recalc:function(){var b,a;for(a=0;(b=this.rules[a]);a++)b.recalc()},toString:function(){return this.declarations+"@media "+this.media+"{"+this.cssText+"}"}}),bv,s=i.Rule=C.extend({constructor:function(c,b){this.id=i.CSS.rules.length;this.className=s.PREFIX+this.id;var a=c.match(cF);this.selector=(a?a[1]:c)||"*";this.selectorText=this.parse(this.selector)+(a?a[2]:"");this.cssText=b;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");i.CSS.rules.push(this);this.init()},init:bc,add:function(a){a.className+=" "+this.className},recalc:function(){var b=N(this.selector);for(var a=0;a<b.length;a++)this.add(b[a])},parse:function(f){var d=f.replace(s.CHILD," ").replace(s.COMPLEX,"");if(t<7)d=d.replace(s.MULTI,"");var c=bi(d,s.TAGS).length-bi(f,s.TAGS).length,b=bi(d,s.CLASSES).length-bi(f,s.CLASSES).length+1;while(b>0&&s.CLASS.test(d)){d=d.replace(s.CLASS,"");b--}while(c>0&&s.TAG.test(d)){d=d.replace(s.TAG,"$1*");c--}d+="."+this.className;b=Math.min(b,2);c=Math.min(c,2);var a=-10*b-c;if(a>0){d=d+","+s.MAP[a]+" "+d}return d},remove:function(a){a.className=a.className.replace(this.MATCH,"$1")},toString:function(){return M("%1 {%2}",this.selectorText,this.cssText)}},{CHILD:/>/g,CLASS:/\.[\w-]+/,CLASSES:/[.:\[]/g,MULTI:/(\.[\w-]+)+/g,PREFIX:"ie7_class",TAG:/^\w+|([\s>+~])\w+/,TAGS:/^\w|[\s>+~]\w/g,MAP:{"1":"html","2":"html body","10":".ie7_html","11":"html.ie7_html","12":"html.ie7_html body","20":".ie7_html .ie7_body","21":"html.ie7_html .ie7_body","22":"html.ie7_html body.ie7_body"}}),Z=s.extend({constructor:function(f,d,c,b,a){this.negated=c.indexOf("not")===0;if(this.negated)c=c.slice(5,-1);this.attach=d||"*";this.dynamicPseudoClass=i.CSS.dynamicPseudoClasses[c];this.target=b;this.base(f,a)},recalc:function(){var d=N(this.attach),c;for(var b=0;c=d[b];b++){var a=this.target?N(this.target,c):[c];if(a.length)this.dynamicPseudoClass.apply(c,a,this)}}}),cK=C.extend({constructor:function(b,a){this.name=b;this.apply=a;this.instances={};i.CSS.dynamicPseudoClasses[b]=this},register:function(f,d){var c=f[2];if(!d&&c.negated){this.unregister(f,true)}else{f.id=c.id+f[0].uniqueID;if(!this.instances[f.id]){var b=f[1],a;for(a=0;a<b.length;a++)c.add(b[a]);this.instances[f.id]=f}}},unregister:function(f,d){var c=f[2];if(!d&&c.negated){this.register(f,true)}else{if(this.instances[f.id]){var b=f[1],a;for(a=0;a<b.length;a++)c.remove(b[a]);delete this.instances[f.id]}}}}),bk=new cK("hover",function(b){var a=arguments;i.CSS.addEventHandler(b,"onmouseenter",function(){bk.register(a)});i.CSS.addEventHandler(b,"onmouseleave",function(){bk.unregister(a)})});A(r,"onmouseup",function(){var b=bk.instances;for(var a in b)if(!b[a][0].contains(event.srcElement))bk.unregister(b[a])});var bW={"=":"%1==='%2'","~=":"(' '+%1+' ').indexOf(' %2 ')!==-1","|=":"%1==='%2'||%1.indexOf('%2-')===0","^=":"%1.indexOf('%2')===0","$=":"%1.slice(-'%2'.length)==='%2'","*=":"%1.indexOf('%2')!==-1"};bW[""]="%1!=null";var bw={"<#attr>":function(f,d,c,b){var a="IE7._0(e,'"+d+"')";b=bN(b);if(c.length>1){if(!b||c==="~="&&cG.test(b)){return"false&&"}a="("+a+"||'')"}return"("+M(bW[c],a,b)+")&&"},"<#id>":cD+"==='$1'&&","<#class>":"e.className&&(' '+e.className+' ').indexOf(' $1 ')!==-1&&",":first-child":"!"+cC+"&&",":link":"e.currentStyle['ie7-link']=='link'&&",":visited":"e.currentStyle['ie7-link']=='visited'&&"};i.HTML=new(bS.extend({fixed:{},init:bc,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var d=0;d<this.fixes.length;d++){var c=N(this.fixes[d][0]);var b=this.fixes[d][1];for(var a=0;a<c.length;a++)b(c[a])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var h=0;h<this.recalcs.length;h++){var g=N(this.recalcs[h][0]);var f=this.recalcs[h][1],d;var c=Math.pow(2,h);for(var b=0;(d=g[b]);b++){var a=d.uniqueID;if((this.fixed[a]&c)===0){d=f(d)||d;this.fixed[a]|=c}}}}}));if(t<7){r.createElement("abbr");i.HTML.addRecalc("label",function(b){if(!b.htmlFor){var a=N("input,textarea",b,true);if(a){A(b,"onclick",function(){a.click()})}}})}var bl="[.\\d]";(function(){var u=i.Layout={};W+="*{boxSizing:content-box}";u.boxSizing=function(a){if(!a.currentStyle.hasLayout){a.style.height="0cm";if(a.currentStyle.verticalAlign==="auto")a.runtimeStyle.verticalAlign="top";T(a)}};function T(a){if(a!=w&&a.currentStyle.position!=="absolute"){O(a,"marginTop");O(a,"marginBottom")}};function O(f,d){if(!f.runtimeStyle[d]){var c=f.parentElement;var b=d==="marginTop";if(c&&c.currentStyle.hasLayout&&!i._1(f,b?"previous":"next"))return;var a=f[b?"firstChild":"lastChild"];if(a&&a.nodeName<"@")a=i._1(a,b?"next":"previous");if(a&&a.currentStyle.styleFloat==="none"&&a.currentStyle.hasLayout){O(a,d);margin=U(f,f.currentStyle[d]);childMargin=U(a,a.currentStyle[d]);if(margin<0||childMargin<0){f.runtimeStyle[d]=margin+childMargin}else{f.runtimeStyle[d]=Math.max(childMargin,margin)}a.runtimeStyle[d]="0px"}}};function U(b,a){return a==="auto"?0:E(b,a)};var G=/^[.\d][\w]*$/,H=/^(auto|0cm)$/,x={};u.borderBox=function(a){x.Width(a);x.Height(a)};var v=function(o){x.Width=function(a){if(!R.test(a.currentStyle.width))y(a);if(o)T(a)};function y(b,a){if(!b.runtimeStyle.fixedWidth){if(!a)a=b.currentStyle.width;b.runtimeStyle.fixedWidth=G.test(a)?Math.max(0,q(b,a))+"px":a;S(b,"width",b.runtimeStyle.fixedWidth)}};function p(b){if(!bj(b)){var a=b.offsetParent;while(a&&!a.currentStyle.hasLayout)a=a.offsetParent}return(a||w).clientWidth};function n(b,a){if(R.test(a))return parseInt(parseFloat(a)/100*p(b));return E(b,a)};var q=function(d,c){var b=d.currentStyle["ie7-box-sizing"]==="border-box",a=0;if(B&&!b)a+=m(d)+j(d,"padding");else if(!B&&b)a-=m(d)+j(d,"padding");return n(d,c)+a};function m(a){return a.offsetWidth-a.clientWidth};function j(b,a){return n(b,b.currentStyle[a+"Left"])+n(b,b.currentStyle[a+"Right"])};W+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";u.minWidth=function(a){if(a.currentStyle["min-width"]!=null){a.style.minWidth=a.currentStyle["min-width"]}if(Y(arguments.callee,a,a.currentStyle.minWidth!=="none")){u.boxSizing(a);y(a);l(a)}};eval("IE7.Layout.maxWidth="+String(u.minWidth).replace(/min/g,"max"));function l(c){if(c==r.body){var b=c.clientWidth}else{var a=c.getBoundingClientRect();b=a.right-a.left}if(c.currentStyle.minWidth!=="none"&&b<q(c,c.currentStyle.minWidth)){c.runtimeStyle.width=c.currentStyle.minWidth}else if(c.currentStyle.maxWidth!=="none"&&b>=q(c,c.currentStyle.maxWidth)){c.runtimeStyle.width=c.currentStyle.maxWidth}else{c.runtimeStyle.width=c.runtimeStyle.fixedWidth}};function k(a){if(Y(k,a,/^(fixed|absolute)$/.test(a.currentStyle.position)&&bu(a,"left")!=="auto"&&bu(a,"right")!=="auto"&&H.test(bu(a,"width")))){h(a);u.boxSizing(a)}};u.fixRight=k;function h(c){var b=n(c,c.runtimeStyle._3||c.currentStyle.left),a=p(c)-n(c,c.currentStyle.right)-b-j(c,"margin");if(parseInt(c.runtimeStyle.width)===a)return;c.runtimeStyle.width="";if(bj(c)||o||c.offsetWidth<a){if(!B)a-=m(c)+j(c,"padding");if(a<0)a=0;c.runtimeStyle.fixedWidth=a;S(c,"width",a)}};var g=0;br(function(){if(!w)return;var f,d=(g<w.clientWidth);g=w.clientWidth;var c=u.minWidth.elements;for(f in c){var b=c[f];var a=(parseInt(b.runtimeStyle.width)===q(b,b.currentStyle.minWidth));if(d&&a)b.runtimeStyle.width="";if(d==a)l(b)}var c=u.maxWidth.elements;for(f in c){var b=c[f];var a=(parseInt(b.runtimeStyle.width)===q(b,b.currentStyle.maxWidth));if(!d&&a)b.runtimeStyle.width="";if(d!==a)l(b)}for(f in k.elements)h(k.elements[f])});if(B){i.CSS.addRecalc("width",bl,x.Width)}if(t<7){i.CSS.addRecalc("max-width",bl,u.maxWidth);i.CSS.addRecalc("right",bl,k)}else if(t==7){if(o)i.CSS.addRecalc("height","[\\d.]+%",function(element){element.runtimeStyle.pixelHeight=parseInt(p(element)*element.currentStyle["ie7-height"].slice(0,-1)/100)})}};eval("var _7="+bO(v));v();_7(true);if(t<7){i.CSS.addRecalc("min-width",bl,u.minWidth);i.CSS.addFix(/\bmin-height\s*/,"height")}})();var bx=bd("blank.gif",ce),by="DXImageTransform.Microsoft.AlphaImageLoader",bX="progid:"+by+"(src='%1',sizingMethod='%2')",ba,bb=[];function bY(b){if(ba.test(b.src)){var a=new Image(b.width,b.height);a.onload=function(){b.width=a.width;b.height=a.height;a=null};a.src=b.src;b.pngSrc=b.src;bz(b)}};if(t<7){i.CSS.addFix(/background(-image)?\s*:\s*([^};]*)?url\(([^\)]+)\)([^;}]*)?/,function(f,d,c,b,a){b=bN(b);return ba.test(b)?"filter:"+M(bX,b,a.indexOf("no-repeat")===-1?"scale":"crop")+";zoom:1;background"+(d||"")+":"+(c||"")+"none"+(a||""):f});i.CSS.addRecalc(/list\-style(\-image)?/,"[^};]*url",function(d){var c=d.currentStyle.listStyleImage.slice(5,-2);if(ba.test(c)){if(d.nodeName==="LI"){bZ(d,c)}else if(d.nodeName==="UL"){for(var b=0,a;a=d.childNodes[b];b++){if(a.nodeName==="LI")bZ(a,c)}}}});function bZ(g,f){var d=g.runtimeStyle,c=g.offsetHeight,b=new Image;b.onload=function(){var a=g.currentStyle.paddingLeft;a=a==="0px"?0:E(g,a);d.paddingLeft=(a+this.width)+"px";d.marginLeft=-this.width+"px";d.listStyleType="none";d.listStyleImage="none";d.paddingTop=Math.max(c-g.offsetHeight,0)+"px";bz(g,"crop",f);g.style.zoom="100%"};b.src=f};i.HTML.addRecalc("img,input",function(a){if(a.nodeName==="INPUT"&&a.type!=="image")return;bY(a);A(a,"onpropertychange",function(){if(!bA&&event.propertyName==="src"&&a.src.indexOf(bx)===-1)bY(a)})});var bA=false;A(J,"onbeforeprint",function(){bA=true;for(var a=0;a<bb.length;a++)cL(bb[a])});A(J,"onafterprint",function(){for(var a=0;a<bb.length;a++)bz(bb[a]);bA=false})}function bz(d,c,b){var a=d.filters[by];if(a){a.src=b||d.src;a.enabled=true}else{d.runtimeStyle.filter=M(bX,b||d.src,c||"scale");bb.push(d)}d.src=bx};function cL(a){a.src=a.pngSrc;a.filters[by].enabled=false};(function(){if(t>=7)return;i.CSS.addRecalc("position","fixed",m,"absolute");i.CSS.addRecalc("background(-attachment)?","[^};]*fixed",n);var x=B?"body":"documentElement";function v(){if(z.currentStyle.backgroundAttachment!=="fixed"){if(z.currentStyle.backgroundImage==="none"){z.runtimeStyle.backgroundRepeat="no-repeat";z.runtimeStyle.backgroundImage="url("+bx+")"}z.runtimeStyle.backgroundAttachment="fixed"}v=bc};var o=bT("img");function y(a){return a?bj(a)||y(a.parentElement):false};function p(c,b,a){setTimeout("document.all."+c.uniqueID+".runtimeStyle.setExpression('"+b+"','"+a+"')",0)};function n(a){if(Y(n,a,a.currentStyle.backgroundAttachment==="fixed"&&!a.contains(z))){v();h.bgLeft(a);h.bgTop(a);q(a)}};function q(b){o.src=b.currentStyle.backgroundImage.slice(5,-2);var a=b.canHaveChildren?b:b.parentElement;a.appendChild(o);h.setOffsetLeft(b);h.setOffsetTop(b);a.removeChild(o)};function m(a){if(Y(m,a,bj(a))){S(a,"position","absolute");S(a,"left",a.currentStyle.left);S(a,"top",a.currentStyle.top);v();i.Layout.fixRight(a);j(a)}};function j(c,b){r.body.getBoundingClientRect();h.positionTop(c,b);h.positionLeft(c,b,true);if(!c.runtimeStyle.autoLeft&&c.currentStyle.marginLeft==="auto"&&c.currentStyle.right!=="auto"){var a=w.clientWidth-h.getPixelWidth(c,c.currentStyle.right)-h.getPixelWidth(c,c.runtimeStyle._3)-c.clientWidth;if(c.currentStyle.marginRight==="auto")a=parseInt(a/2);if(y(c.offsetParent))c.runtimeStyle.pixelLeft+=a;else c.runtimeStyle.shiftLeft=a}if(!c.runtimeStyle.fixedWidth)h.clipWidth(c);if(!c.runtimeStyle.fixedHeight)h.clipHeight(c)};function l(){var b=n.elements;for(var a in b)q(b[a]);b=m.elements;for(a in b){j(b[a],true);j(b[a],true)}k=0};var k;br(function(){if(!k)k=setTimeout(l,100)});var h={},g=function(f){f.bgLeft=function(a){a.style.backgroundPositionX=a.currentStyle.backgroundPositionX;if(!y(a)){p(a,"backgroundPositionX","(parseInt(runtimeStyle.offsetLeft)+document."+x+".scrollLeft)||0")}};f.setOffsetLeft=function(b){var a=y(b)?"backgroundPositionX":"offsetLeft";b.runtimeStyle[a]=f.getOffsetLeft(b,b.style.backgroundPositionX)-b.getBoundingClientRect().left-b.clientLeft+2};f.getOffsetLeft=function(b,a){switch(a){case"left":case"top":return 0;case"right":case"bottom":return w.clientWidth-o.offsetWidth;case"center":return(w.clientWidth-o.offsetWidth)/2;default:if(R.test(a)){return parseInt((w.clientWidth-o.offsetWidth)*parseFloat(a)/100)}o.style.left=a;return o.offsetLeft}};f.clipWidth=function(d){var c=d.runtimeStyle.fixWidth;d.runtimeStyle.borderRightWidth="";d.runtimeStyle.width=c?f.getPixelWidth(d,c)+"px":"";if(d.currentStyle.width!=="auto"){var b=d.getBoundingClientRect();var a=d.offsetWidth-w.clientWidth+b.left-2;if(a>=0){d.runtimeStyle.borderRightWidth="0px";a=Math.max(E(d,d.currentStyle.width)-a,0);S(d,"width",a);return a}}};f.positionLeft=function(b,a){if(!a&&R.test(b.currentStyle.width)){b.runtimeStyle.fixWidth=b.currentStyle.width}if(b.runtimeStyle.fixWidth){b.runtimeStyle.width=f.getPixelWidth(b,b.runtimeStyle.fixWidth)}b.runtimeStyle.shiftLeft=0;b.runtimeStyle._3=b.currentStyle.left;b.runtimeStyle.autoLeft=b.currentStyle.right!=="auto"&&b.currentStyle.left==="auto";b.runtimeStyle.left="";b.runtimeStyle.screenLeft=f.getScreenLeft(b);b.runtimeStyle.pixelLeft=b.runtimeStyle.screenLeft;if(!a&&!y(b.offsetParent)){p(b,"pixelLeft","runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+x+".scrollLeft")}};f.getScreenLeft=function(c){var b=c.offsetLeft,a=1;if(c.runtimeStyle.autoLeft){b=w.clientWidth-c.offsetWidth-f.getPixelWidth(c,c.currentStyle.right)}if(c.currentStyle.marginLeft!=="auto"){b-=f.getPixelWidth(c,c.currentStyle.marginLeft)}while(c=c.offsetParent){if(c.currentStyle.position!=="static")a=-1;b+=c.offsetLeft*a}return b};f.getPixelWidth=function(b,a){return R.test(a)?parseInt(parseFloat(a)/100*w.clientWidth):E(b,a)}};eval("var _8="+bO(g));g(h);_8(h)})();if(t<7){var bB={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,borderLeftColor:"#000",borderTopColor:"#000",borderRightColor:"#000",borderBottomColor:"#000",height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};i.CSS.addRecalc("overflow","visible",function(c){if(c.currentStyle.position==="absolute")return;if(c.parentNode.ie7_wrapped)return;if(i.Layout&&c.currentStyle["max-height"]!=="auto"){i.Layout.maxHeight(c)}if(c.currentStyle.marginLeft==="auto")c.style.marginLeft=0;if(c.currentStyle.marginRight==="auto")c.style.marginRight=0;var b=r.createElement(cc);b.ie7_wrapped=c;for(var a in bB){b.style[a]=c.currentStyle[a];if(bB[a]!=null){c.runtimeStyle[a]=bB[a]}}b.style.display="block";b.style.position="relative";c.runtimeStyle.position="absolute";c.parentNode.insertBefore(b,c);b.appendChild(c)})}function cM(){var p="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var n=0;n<p.length;n++){p[p[n]]=p[n-1]||"0.67em"}i.CSS.addFix(/(font(-size)?\s*:\s*)([\w.-]+)/,function(d,c,b,a){return c+(p[a]||a)});var q=/^\-/,m=/(em|ex)$/i,j=/em$/i,l=/ex$/i;E=function(c,b){if(bR.test(b))return parseInt(b)||0;var a=q.test(b)?-1:1;if(m.test(b))a*=h(c);k.style.width=a<0?b.slice(1):b;z.appendChild(k);b=a*k.offsetWidth;k.removeNode();return parseInt(b)};var k=bT();function h(c){var b=1;k.style.fontFamily=c.currentStyle.fontFamily;k.style.lineHeight=c.currentStyle.lineHeight;while(c!=z){var a=c.currentStyle["ie7-font-size"];if(a){if(j.test(a))b*=parseFloat(a);else if(R.test(a))b*=(parseFloat(a)/100);else if(l.test(a))b*=(parseFloat(a)/2);else{k.style.fontSize=a;return 1}}c=c.parentElement}return b};i.CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");i.CSS.addFix(/display\s*:\s*list-item/,"display:block");function g(d){var c=d.parentElement,b=c.offsetWidth-d.offsetWidth-f(c),a=(d.currentStyle["ie7-margin"]&&d.currentStyle.marginRight==="auto")||d.currentStyle["ie7-margin-right"]==="auto";switch(c.currentStyle.textAlign){case"right":b=a?parseInt(b/2):0;d.runtimeStyle.marginRight=b+"px";break;case"center":if(a)b=0;default:if(a)b/=2;d.runtimeStyle.marginLeft=parseInt(b)+"px"}};function f(a){return E(a,a.currentStyle.paddingLeft)+E(a,a.currentStyle.paddingRight)};i.CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(a){if(Y(g,a,a.parentElement&&a.currentStyle.display==="block"&&a.currentStyle.marginLeft==="auto"&&a.currentStyle.position!=="absolute")){g(a)}});br(function(){for(var b in g.elements){var a=g.elements[b];a.runtimeStyle.marginLeft=a.runtimeStyle.marginRight="";g(a)}})};var I,N=(function(){var cN=/^[>+~]/,bm=false;function cO(d,c,b){d=bJ(d);if(!c)c=r;var a=c;bm=cN.test(d);if(bm){c=c.parentNode;d="*"+d}try{return q.create(d,bm)(c,b?null:[],a)}catch(ex){return b?null:[]}};var cP=/^(\\.|[' >+~#.\[\]:*(),\w-\^|$=]|[^\x00-\xa0])+$/,dd=/^(href|src)$/,ca={"class":"className","for":"htmlFor"},de=/\sie7_\w+/g,cQ=/^(action|cite|codebase|data|dynsrc|href|longdesc|lowsrc|src|usemap|url)$/i;i._0=function(d,c){if(d.getAttributeNode){var b=d.getAttributeNode(c)}c=ca[c.toLowerCase()]||c;if(!b)b=d.attributes[c];var a=b&&b.specified;if(d[c]&&typeof d[c]=="boolean")return c.toLowerCase();if((a&&cQ.test(c))||(!b&&B)||c==="value"||c==="type"){return d.getAttribute(c,2)}if(c==="style")return d.style.cssText.toLowerCase()||null;return a?String(b.nodeValue):null};var cb="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";bg(ca,cs(cb.toLowerCase().split(","),cb.split(",")));i._1=function(b,a){a+="Sibling";do{b=b[a];if(b&&b.nodeName>"@")break}while(b);return b};var cR=/(^|[, >+~])([#.:\[])/g,df=/\)\{/g,cS=/,/,dg=/^['"]/,cT=/\\([\da-f]{2,2})/gi,dh=/last/i;i._9=function(d,c){var b=d.all[c]||null;if(!b||(b.nodeType&&i._0(b,"id")===c))return b;for(var a=0;a<b.length;a++){if(i._0(b[a],"id")===c)return b[a]}return null};var V=D.extend({dictionary:new cq({ident:/\-?(\\.|[_a-z]|[^\x00-\xa0])(\\.|[\w-]|[^\x00-\xa0])*/,combinator:/[\s>+~]/,operator:/[\^~|$*]?=/,nth_arg:/[+-]?\d+|[+-]?\d*n(?:\s*[+-]\s*\d+)?|even|odd/,tag:/\*|<#ident>/,id:/#(<#ident>)/,'class':/\.(<#ident>)/,pseudo:/\:([\w-]+)(?:\(([^)]+)\))?/,attr:/\[(<#ident>)(?:(<#operator>)((?:\\.|[^\[\]#.:])+))?\]/,negation:/:not\((<#tag>|<#id>|<#class>|<#attr>|<#pseudo>)\)/,sequence:/(\\.|[~*]=|\+\d|\+?\d*n\s*\+\s*\d|[^\s>+~,\*])+/,filter:/[#.:\[]<#sequence>/,selector:/[^>+~](\\.|[^,])*?/,grammar:/^(<#selector>)((,<#selector>)*)$/}),ignoreCase:true}),cU=new V({"\\\\.|[~*]\\s+=|\\+\\s+\\d":D.IGNORE,"\\[\\s+":"[","\\(\\s+":"(","\\s+\\)":")","\\s+\\]":"]","\\s*([,>+~]|<#operator>)\\s*":"$1","\\s+$":"","\\s+":" "});function cV(a){a=cU.parse(a.replace(cT,"\\x$1")).replace(bp,"$1").replace(cR,"$1*$2");if(!cP.test(a))bC();return a};function di(a){return a.replace(bL,cW)};function cW(b,a){return Q[a]};var cX=/\{/g,cY=/\\{/g;function bD(a){return Array((a.replace(cY,"").match(cX)||"").length+1).join("}")};bw=new V(bw);var u=/:target/i,T=/:root/i;function O(b){var a="";if(T.test(b))a+=",R=d.documentElement";if(u.test(b))a+=",H=d.location;H=H&&H.hash.replace('#','')";if(a||b.indexOf("#")!==-1){a=",t=c.nodeType,d=t===9?c:c.ownerDocument||(c.document||c).parentWindow.document"+a}return"var ii"+a+";"};var U={" ":";while(e!=s&&(e=e.parentNode)&&e.nodeType===1){",">":".parentElement;if(e){","+":";while((e=e.previousSibling)&&!("+bU+"))continue;if(e){","~":";while((e=e.previousSibling)){"+bV},G=/\be\b/g;I=new V({"(?:(<#selector>)(<#combinator>))?(<#tag>)(<#filter>)?$":function(h,g,f,d,c){var b="";if(d!=="*"){var a=d.toUpperCase();b+="if(e.nodeName==='"+a+(a===d?"":"'||e.nodeName==='"+d)+"'){"}if(c){b+="if("+bw.parse(c).slice(0,-2)+"){"}b=b.replace(G,"e"+this.index);if(f){b+="var e=e"+(this.index++)+U[f];b=b.replace(G,"e"+this.index)}if(g){b+=this.parse(g)}return b}});var H="e0=IE7._9(d,'%1');if(e0){",x="var n=c.getElementsByTagName('%1');",v="if(r==null)return e0;r[k++]=e0;",o=1,y=new V({"^((?:<#selector>)?(?:<#combinator>))(<#tag>)(<#filter>)?$":true}),p={},n=new V({"^(<#tag>)#(<#ident>)(<#filter>)?( [^,]*)?$":function(h,g,f,d,c){var b=M(H,f),a="}";if(d){b+=I.parse(g+d);a=bD(b)}if(c){b+="s=c=e0;"+q.parse("*"+c)}else{b+=v}return b+a},"^([^#,]+)#(<#ident>)(<#filter>)?$":function(f,d,c,b){var a=M(H,c);if(d==="*"){a+=v}else{a+=I.parse(d+b)+v+"break"}return a+bD(a)},"^.*$":""}),q=new V({"<#grammar>":function(j,l,k){if(!this.groups)this.groups=[];var h=y.exec(" "+l);if(!h)bC();this.groups.push(h.slice(1));if(k){return this.parse(k.replace(cS,""))}var g=this.groups,f=g[0][o];for(var b=1;h=g[b];b++){if(f!==h[o]){f="*";break}}var d="",c=v+"continue filtering;";for(var b=0;h=g[b];b++){I.index=0;if(f!=="*")h[o]="*";h=h.join("");if(h===" *"){d=c;break}else{h=I.parse(h);if(bm)h+="if(e"+I.index+"==s){";d+=h+c+bD(h)}}var a=f==="*";return(a?"var n=c.all;":M(x,f))+"filtering:while((e0=n[i++]))"+(a?bV.replace(G,"e0"):"{")+d+"}"},"^.*$":bC}),m=/\&\&(e\d+)\.nodeType===1(\)\{\s*if\(\1\.nodeName=)/g;q.create=function(c){if(!p[c]){c=cV(c);this.groups=null;I.index=0;var b=this.parse(c);this.groups=null;I.index=0;if(c.indexOf("#")!==-1){var a=n.parse(c);if(a){b="if(t===1||t===11|!c.getElementById){"+b+"}else{"+a+"}"}}b=b.replace(m,"$2");b=O(c)+bq(b);p[c]=new Function("return function(c,r,s){var i=0,k=0,e0;"+b+"return r}")()}return p[c]};return cO})();function bC(){throw new SyntaxError("Invalid selector.");};i.loaded=true;(function(){try{if(!r.body)throw"continue";bn.doScroll("left")}catch(ex){setTimeout(arguments.callee,1);return}try{eval(bF.innerHTML)}catch(ex){}if(typeof IE7_PNG_SUFFIX=="object"){ba=IE7_PNG_SUFFIX}else{ba=new RegExp(ct(J.IE7_PNG_SUFFIX||"-trans.png")+"(\\?.*)?$","i")}z=r.body;w=B?z:bn;z.className+=" ie7_body";bn.className+=" ie7_html";if(B)cM();i.CSS.init();i.HTML.init();i.HTML.apply();i.CSS.apply();i.recalc()})()})(this,document);