<script type="text/javascript">
var i, c, nw, mr, w=element.offsetWidth, h=element.offsetHeight, odd=false;
//if (2*Math.floor(w/2)!=w) odd=true;
//if (odd) nw=w+1; else nw=w;
mr=parseInt(element.parentNode.currentStyle['marginRight']);

if (!mr) mr=0;
for (i=0; i<element.childNodes.length; i++)
{
   c=element.childNodes[i];
   if (c.className=='tr c' || c.className=='br c' || c.className=='r')
   {
      c.style.marginLeft='0px';
      c.style.left=w-c.offsetWidth+mr+'px';
   }
   if (c.className=='t' || c.className=='b' || c.className=='l' || c.className=='r')
   {
      if (c.className=='t' || c.className=='b') c.style.width=w+'px';
      if (c.className=='l' || c.className=='r') c.style.height=h+'px';
      c.firstChild.firstChild.firstChild.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod="scale")';
   }
}
element.style.width=w+'px';
element.style.height=h+'px';
element.parentNode.parentNode.style.width=w+'px';
</script>
