<component lightWeight="true"><attach event="onpropertychange"onevent="handlePropertychange()"/><attach event="ondetach"onevent="restore()"/><attach event="onresize"for="window"onevent="handleResize()"/><script type="text/javascript">var rsrc=/url\(["']?(.*?)["']?\)/,positions={top:0,left:0,bottom:1,right:1,center:.5},doc=element.document;init();function init(){var a=doc.createElement("div"),img=doc.createElement("img"),expando,pos;a.style.position="absolute";a.style.zIndex=-1;a.style.top=0;a.style.right=0;a.style.left=0;a.style.bottom=0;a.style.overflow="hidden";img.alt="";img.style.position="absolute";img.style.top=0;img.style.left=0;img.style.width=img.style.width="auto";a.appendChild(img);element.insertBefore(a,element.firstChild);pos=[element.currentStyle.backgroundPositionX,element.currentStyle.backgroundPositionY];element.bgsExpando=expando={wrapper:a,img:img,backgroundSize:element.currentStyle['background-size'],backgroundPositionX:positions[pos[0]]||parseFloat(pos[0])/100,backgroundPositionY:positions[pos[1]]||parseFloat(pos[1])/100};if(element.currentStyle.zIndex=="auto"){element.style.zIndex=0}if(element.currentStyle.position=="static"){element.style.position="relative"}if(refreshDisplay(element,expando)){refreshDimensions(element,expando);refreshBackgroundImage(element,expando,function(){updateBackground(element,expando)})}}function refreshDisplay(a,b){var c=a.currentStyle.display;if(c!=b.display){b.display=c;b.somethingChanged=true}return c!="none"}function refreshDimensions(a,b){var c=a.offsetWidth-(parseFloat(a.currentStyle.borderLeftWidth)||0)-(parseFloat(a.currentStyle.borderRightWidth)||0),innerHeight=a.offsetHeight-(parseFloat(a.currentStyle.borderTopWidth)||0)-(parseFloat(a.currentStyle.borderBottomWidth)||0);if(c!=b.innerWidth||innerHeight!=b.innerHeight){b.innerWidth=c;b.innerHeight=innerHeight;b.somethingChanged=true}}function refreshBackgroundImage(b,c,d){var e=c.img,src=(rsrc.exec(b.currentStyle.backgroundImage)||[])[1];if(src&&src!=c.backgroundSrc){c.backgroundSrc=src;c.somethingChanged=true;e.onload=function(){var a=e.width,height=e.height;if(a==1&&height==1){return}c.imgWidth=a;c.imgHeight=height;c.constrain=false;d();e.style.visibility="visible";e.onload=null};e.style.visibility="hidden";e.src=c.backgroundSrc;if(e.readyState||e.complete){e.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.src=c.backgroundSrc}c.ignoreNextPropertyChange=true;b.style.backgroundImage="none"}else{d()}}function updateBackground(a,b){if(!b.somethingChanged){return}var c=b.img,elemRatio=b.innerWidth/b.innerHeight,imgRatio=b.imgWidth/b.imgHeight,prevConstrain=b.constrain,curConstrain,delta;if(b.backgroundSize=="contain"){if(imgRatio>elemRatio){b.constrain=curConstrain="width";delta=Math.floor((b.innerHeight-b.innerWidth/imgRatio)*b.backgroundPositionY);c.style.top=delta+"px";if(curConstrain!=prevConstrain){c.style.width="100%";c.style.height="auto";c.style.left=0}}else{b.constrain=curConstrain="height";delta=Math.floor((b.innerWidth-b.innerHeight*imgRatio)*b.backgroundPositionX);c.style.left=delta+"px";if(curConstrain!=prevConstrain){c.style.width="auto";c.style.height="100%";c.style.top=0}}}else if(b.backgroundSize=="cover"){if(imgRatio>elemRatio){b.constrain=curConstrain="height";delta=Math.floor((b.innerHeight*imgRatio-b.innerWidth)*b.backgroundPositionX);if(isNaN(delta))delta=0;c.style.left=-delta+"px";if(curConstrain!=prevConstrain){c.style.width="auto";c.style.height="100%";c.style.top=0}}else{b.constrain=curConstrain="width";delta=Math.floor((b.innerWidth/imgRatio-b.innerHeight)*b.backgroundPositionY);if(isNaN(delta))delta=0;c.style.top=-delta+"px";if(curConstrain!=prevConstrain){c.style.width="100%";c.style.height="auto";c.style.left=0}}}b.somethingChanged=false}function handlePropertychange(){var a=element.bgsExpando;if(a.ignoreNextPropertyChange){a.ignoreNextPropertyChange=false;return}if(refreshDisplay(element,a)){refreshDimensions(element,a);refreshBackgroundImage(element,a,function(){updateBackground(element,a)})}}function handleResize(){var a=element.bgsExpando;if(a.display!="none"){refreshDimensions(element,a);updateBackground(element,a)}}function restore(){var a=element.bgsExpando;try{element.style.backgroundImage="url('"+a.backgroundSrc+"')";element.removeChild(a.wrapper);element.bgsExpando=null}catch(e){}}</script>