function Bolek(x, y, width, height, border, padding, item) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.border = border;
this.padding = padding;
this.item = item;
this.created = false;
this.fontKlas = "bolo";
this.setKlas = bolekSetKlas;
this.create = bolekCreate;
this.show = bolekShow;
this.hide = bolekHide;
this.moveTo = bolekMoveTo;
this.moveBy = bolekMoveBy;
this.clipp = bolekClipp;
this.clipBy = bolekClippBy;
this.getzIndex = bolekGetzIndex;
this.setzIndex = bolekSetzIndex;
this.gfiltr = bolekGetFiltr;
this.sfiltr = bolekSetFiltr;
this.filtruj = bolekFilter_It;
this.gvis = bolekGetVis;
}
function bolekSetKlas(klas) {
if (!this.created) {
this.fontKlas = klas;
}
}
function bolekCreate() {
var start, end;
var str;
var i, j;
var x, y;
if (!isMinNS4 && !iswp)
return;
if (this.created)
return;
this.created = true;
start = '<table border=' + this.border
        + ' cellpadding=' + (this.padding + this.border) + ' cellspacing=0'
        + ' width=' + this.width + ' height=' + this.height + '>'
        + '<tr><td>'
        + '<font class="' + this.fontKlas + '">';
  end   = '</td></tr></table>';
if (isMinNS4) {
this.boLayer = new Layer(this.width);
this.boLayer.document.open();
this.boLayer.document.writeln(start + this.item + end);
this.boLayer.document.close();
}
if(isDOMi){
i = bolekList.length;
this.boLayer = document.createElement("DIV");
this.boLayer.id = "bolek"+i+"_boLayer";
this.boLayer.style.position = "absolute"
this.boLayer.style.left = "0px";
this.boLayer.style.top = "0px";
this.boLayer.style.width = this.width +"px";
this.boLayer.style.height = this.height +"px";
this.boLayer.style.visibility = "hidden";
this.boLayer.style.overflow = "hidden";
this.boLayer.innerHTML = start + this.item + end;
document.body.appendChild(this.boLayer);
}
if(isMinIE4) {
i = bolekList.length;
str = '<div id="bolek' + i + '_boLayer"'
        + ' style="position:absolute;'
        + 'left:0px; top:0px;'
        + 'width:' + this.width + 'px;'
        + 'height:' + this.height + 'px;'
        + 'overflow:hidden;'
        + 'visibility:hidden;">'
       + start + this.item + end +  '</div>';
if (!isMinIE5&&!isMinIE6) {
x = getPageScrollX();
y = getPageScrollY();
window.scrollTo(getPageWidth(), getPageHeight());
}
document.body.insertAdjacentHTML("beforeEnd", str);
if (!isMinIE5&&!isMinIE6){
window.scrollTo(x, y);
}
this.boLayer = getLayer("bolek" + i + "_boLayer");
}
moveLayerTo(this.boLayer, this.x, this.y);
bolekList[bolekList.length] = this;

}
function bolekShow() {
if (this.created)
showLayer(this.boLayer);
}
function bolekHide() {
if (this.created)
hideLayer(this.boLayer);
}
function bolekMoveTo(x, y) {
if (this.created)
moveLayerTo(this.boLayer, x, y);
}
function bolekMoveBy(dx, dy) {
if (this.created)
moveLayerBy(this.boLayer, dx, dy);
}
function bolekGetzIndex() {
if (this.created)
return(getzIndex(this.boLayer));
else
return(0);
}

function bolekSetzIndex(z) {
if (this.created)
setzIndex(this.boLayer, z);
}
function bolekClipp(cx, cy, cw, ch) {
if (this.created)
clipLayer(this.boLayer, cx, cy, cw, ch);
}
function bolekClippBy(dx, dy, dw, dh) {
if (this.created);
clipLayerBy(this.boLayer, dx, dy, dw, dh)
}
function bolekGetVis(){
if (this.created)
return(getVisibility(this.boLayer));
}
function bolekGetFiltr(){
if(!isMinOp){
if (isMinIE4 && this.created){
return(getfiltr(this.boLayer));
}
}
}
function bolekSetFiltr(f){
if(!isMinOp){
if (isMinIE4 && this.created){
setfiltr(this.boLayer, f);
}
}
}
function bolekFilter_It(){
if(!isMinOp){
if (isMinIE4 && this.created){
filter_it(this.boLayer);
}
}
}
var bolekList  = new Array();

var origWidth;
var origHeight;
if (isMinNS4 || isDOMi) {
origWidth  = window.innerWidth;
origHeight = window.innerHeight;
}

window.onresize = bolekReload;
function bolekReload() {
if ((isMinNS4 || isDOMi) && origWidth == window.innerWidth && origHeight == window.innerHeight)
return;
if (isMinIE4)
setTimeout('window.location.href = window.location.href', 2000);
else
window.location.href = window.location.href;
}


