function ShowPriceClass(sName, sDescription) {

    this.name = sName;
    this.description = sDescription;
    this.layout;

    this.doLayout();
    this.setVisible(true);

    this.winRef = null;

}



ShowPriceClass.prototype.setVisible = function(bFlag) {

    if (this.winRef) {
        this.winRef.close();
    }

    this.winRef = window.open('about:blank', 'navn', 'height=200,width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes');
    this.winRef.document.write(this.layout);
    this.winRef.document.close();
    this.winRef.focus();

}



ShowPriceClass.prototype.indexOf = function(iId) {

    for (var a = 0; a < this.priceClasses.length && this.priceClasses[a].getId() != iId; a++) {
        alert(iId + " - " + this.priceClasses[a].getId());
    }
    return a == this.priceClasses.length ? -1 : a;

}



ShowPriceClass.prototype.doLayout = function() {

    this.layout = '';
    this.layout += '<html>\n';
    this.layout += '    <head>\n';
    this.layout += '        <link rel="stylesheet" type="text/css" href="css/allpages.css"/>\n';
    this.layout += '        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n';
    this.layout += '        <title>' + this.name + '</title>\n';
    this.layout += '    </head>\n';
    this.layout += '    <body style="margin: 10px;">\n';
    this.layout += '        <table width="100%" cellpadding="0" cellspacing="0">\n';
    this.layout += '            <tr class="bg-blue">\n';
    this.layout += '            <td class="c1 top"><img src="img/c1.gif" width="5" height="5"/></td>\n';
    this.layout += '            <td width="100%" class="large white bold">' + this.name + '</td>\n';
    this.layout += '            <td class="c2 top"><img src="img/c2.gif" width="5" height="5"/></td>\n';
    this.layout += '        </tr>\n';
    this.layout += '    </table>\n';
    this.layout += '    <table width="100%" cellpadding="0" cellspacing="0" class="border">\n';
    this.layout += '        <tr>\n';
    this.layout += '            <td class="border">' + this.description + '</td>\n';
    this.layout += '        </tr>\n';
    this.layout += '    </table>\n';
    this.layout += '    <table border="0" cellpadding="0" cellspacing="0" onclick="window.close(); return false;" align="right" class="activebutton">\n';
    this.layout += '        <xsl:attribute name="title"><xsl:value-of select="book_alt_text"/></xsl:attribute>\n';
    this.layout += '        <tr>\n';
    this.layout += '            <td class="activebutton1"/>\n';
    this.layout += '            <td class="activebutton2"><nobr>Close</nobr></td>\n';
    this.layout += '            <td class="activebutton3"/>\n';
    this.layout += '        </tr>\n';
    this.layout += '    </table>\n';
    this.layout += '    </body>\n';
    this.layout += '</html>\n';

}
