if (navigator.product == "Gecko")
{
var BwCapturedEvents = ["click","mousedown","mouseup","mousemove","mouseover","mouseout" ];
HTMLElement.prototype.setCapture = function()
{
if (this._capture != null) this.releaseCapture();
var _this = this;
this._capture = function (e)
{
e.preventDefault();
e.stopPropagation();
var f = _this['on'+e.type];
if (f) f.call (_this, e);
};
var c = BwCapturedEvents;
var l = c.length;
for (var i = 0; i < l; i++)
{
window.addEventListener (c[i], this._capture, true);
window.captureEvents (Event[c[i]]);
}
};
HTMLElement.prototype.releaseCapture = function()
{
var c = BwCapturedEvents;
var l = c.length;
for (var i = 0; i < l; i++)
{
window.releaseEvents (Event[c[i]]);
window.removeEventListener (c[i], this._capture, true);
}
this._capture = null;
};
}
Bw = {};
Bw.Core =
{
bind: function (el, proto)
{
var p = null;
var n = null;
try {
p = (typeof proto == 'string') ? eval(proto) : proto;
}
catch (e){}
if (p && p.selfclassName)
{
p.selfclass = eval (p.selfclassName);
if (p.superclassName)
{
p.superclass = eval (p.superclassName);
Bw.Core.bind (el, p.superclassName);
}
for (e in p) el[e] = p[e];
el.className = p.selfclassName.replace (/\./g, "");
return p;
}
},
bootstrap: function (el, c)
{
var n = c || el.className;
if (n && Bw.Core.bind(el, n) && !el.initialize()) return;
var e = el.firstChild;
while (e != null)
{
try
{
Bw.Core.bootstrap(e);
}
catch (ex){
// log (ex);
}
e = e.nextSibling;
}
},
load: function (parent, url, force)
{
var q = Bw.IO.Query.create();
if (force) q.setNoCache();
q.get (url);
parent.innerHTML = q.getText();
Bw.Core.bootstrap (parent);
Bw.Core.evalScript(parent.innerHTML, force);
},
evalScript : function (html, force)
{
var idx = html.toLowerCase().indexOf('', idx + 8);
var script = html.substring(idxEnd + 1, idxSlashScript);
eval(script);
}
else
{
if( balise.charAt(idxSrc + 4) == '"' || balise.charAt(idxSrc + 4) == "'" )
{
idxSrc++;
}
var idxSrcEnd = -1;
for(var i = idxSrc + 4; i < balise.length ; i ++ )
{
if( balise.charAt(i) == ' ' || balise.charAt(i) == '"' || balise.charAt(i) == "'" )
{
idxSrcEnd = i;
}
}
var source = balise.substring(idxSrc + 4, idxSrcEnd);
var q = Bw.IO.Query.create();
if (force) q.setNoCache();
q.get (source);
if(q.getStatus() == 200)
{
eval(q.getText());
}
}
idx = html.toLowerCase().indexOf('