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' href='css/classdescription.jsp' type='text/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 class='classdescription'>\n";
    this.layout += "        <p class='classdescription_caption'>" + this.name + "</p>\n";
    this.layout += "        <p class='classdescription_text'>" + this.description + "</p>\n";
    this.layout += "        <p align='right'><a class='classdescription_close' href='' onclick='window.close(); return false'>Close</a></p>\n";
    this.layout += "    </body>\n";
    this.layout += "</html>\n";

}

