priceBoxId = 0;
function printPrice(price)
{
    var priceTextMargin = 5;
    function w(s) { document.writeln(s); }
    
    w('<div class="box" id="priceBox' + priceBoxId + '">');
        w('<div class="right"></div>');
        w('<div class="middle">');
            w('<div class="shadowText">' + price + '</div>');
            w('<div class="topText">' + price + '</div>');
        w('</div>');
    w('</div>');
    
    var box = document.getElementById("priceBox" + priceBoxId);    
    var text = box.children[1].children[0];
    box.style.width = (text.offsetWidth + priceTextMargin * 3) + "px";    
    priceBoxId++;
}

