target: null,
show: function(obj) {
var div = $('lightbox');
if (!div) {
div = document.createElement('div');
div.id = 'lightbox';
var css = new Array();
css[css.length] = 'position: absolute';
css[css.length] = 'top: 0px';
css[css.length] = 'left: 0px';
css[css.length] = 'display: block';
css[css.length] = 'background-color: #000000';
css[css.length] = 'z-index: 9999';
css[css.length] = 'opacity: 0.7';
css[css.length] = 'MozOpacity: 0.7';
css[css.length] = 'KhtmlOpacity: 0.7';
css[css.length] = "filter: alpha(opacity=70)";
div.style.cssText = css.join(';');
document.body.appendChild(div);
}
this.target = obj;
obj.style.display = 'block';
div.style.display = 'block';
div.style.width = getDocumentWidth() + 'px';
div.style.height = getDocumentHeight() + 'px';
},
hide: function() {
if (this.target) {
this.target.style.display = 'none';
}
$('lightbox').style.display = 'none';
}
};
0 comments:
Post a Comment