////////////////////////////////////////////////////////////////
// //
// BYKLEIN CHROMELESS WINDOW OBJECT 1.0 //
// FOR MICROSOFT IEXPLORER 5.5 & UP //
// //
// (c) Copyright 2002. Mariano Klein || www.byklein.com //
// Distributed under the terms of the GNU GPL //
// //
// Thanks to Gabriel Suchowolski || www.microbians.com //
////////////////////////////////////////////////////////////////
ChromelessWindow = function ()
{
this.URL = null;
this.title = null;
this.titleFont = null;
this.titleSize = 0;
this.titleColor = null;
this.titlebarImage = null;
this.titlebarHeight = 0;
this.scrollbars = null;
this.w = 0;
this.h = 0;
this.centered = null;
this.xPos = 0;
this.yPos = 0;
this.borderColor = null;
this.borderSize = 0;
this.closeBottom = null;
this.minimizeBottom = null;
this.chromelessCompatible = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4 ? true:false;
this.titlebarContent = null;
this.chromelessWW = null;
}
ChromelessWindow.prototype.openChromeless = function()
{
this.runCode();
}
ChromelessWindow.prototype.closeChromeless = function()
{
this.chromelessWW.close();
}
ChromelessWindow.prototype.setURL = function(newURL)
{
this.URL = newURL;
if(this.chromelessWW)
{
this.chromelessWW.execScript("b.all.canvas.URL='"+newURL+"'");
this.chromelessWW.execScript("showChromeless()");
}
}
ChromelessWindow.prototype.moveTo = function()
{
this.xPos = arguments[0];
this.yPos = arguments[1];
if(this.chromelessWW)
{
this.chromelessWW.execScript('var cx='+this.xPos+';');
this.chromelessWW.execScript('var cy='+this.yPos+';');
this.chromelessWW.execScript("showChromeless()");
}
}
ChromelessWindow.prototype.resizeTo = function()
{
this.w = arguments[0];
this.h = arguments[1];
this.cH = (this.h-this.titlebarHeight)-this.borderSize;
this.cW = this.w -(this.borderSize*2);
if(this.chromelessWW)
{
this.chromelessWW.execScript('var cw='+this.w+';');
this.chromelessWW.execScript('var ch='+this.h+';');
this.chromelessWW.execScript("b.all.canvas.style.width='"+this.cW+"'");
this.chromelessWW.execScript("b.all.canvas.style.height='"+this.cH+"'");
this.chromelessWW.execScript("b.all.closeBottom.style.right='"+this.borderSize+"'");
this.chromelessWW.execScript("b.all.minimizeBottom.style.right='"+(this.borderSize+20)+"'");
this.chromelessWW.execScript("showChromeless()");
}
}
ChromelessWindow.prototype.runCode = function()
{
if(this.centered=="yes")
{
var tempX = this.w;
var tempY = this.h;
this.xPos = (screen.availWidth/2)-(tempX/2);
this.yPos = (screen.availHeight/2)-(tempY/2);
}
if (this.chromelessCompatible)
{
this.chromelessWW = window.open("about:blank","","top=5000,left=5000,width=100,height=100,scrollbars="+this.scrollbars);
}
else
{
this.chromelessWW = window.open(this.URL, "chromelessWindow", "top="+this.yPos+",left="+this.xPos+",width="+this.w+",height="+this.h+",toolbar=0,scrollbars="+this.scrollbars+",resizable=0");
}
this.cH = (this.h-this.titlebarHeight)-this.borderSize;
this.cW = this.w -(this.borderSize*2);
this.c = "";
if((this.titlebarImage==undefined)||(this.titlebarImage==null)||(this.titlebarImage==""))
{
this.titlebarContent="";
this.tb = false;
}
else
{
this.titlebarContent="";
this.tb = true;
}
this.menu = "\