var LightBox = new Object();
LightBox = {
    
    initialize: function()
    {
        this.pos = 0;
        this.containerWidth = 1000;
        this.maxImgWidth = 1000;
    },
    
    showImg : function(_url) {
        var hauteur = document.documentElement.clientHeight;
        var largeur = document.documentElement.clientWidth;
        var content = '<div class="lightbox" id="lightbox"><div class="lightbox_background" style="height:'+hauteur+'px; width:'+largeur+'px;" onclick="LightBox.closeImg(); return false;"></div><div class="lightbox_content" id="lightbox_content" onclick="LightBox.closeImg(); return false;"><div id="container_img"><div id="close_lightbox"></div><img id="img_lightboxed" src="' + _url + '" /></div></div></div>';
        $(document.body).insert({top:content});
        /*if ($('img_lightboxed').width > this.maxImgWidth) {
            $('img_lightboxed').style.width = "1000px";*/
        /*$('lightbox_content').style.left = (document.documentElement.clientWidth - this.containerWidth)/2 + "px";
        */
        /*if ($('lightbox_content').clientHeight > document.documentElement.clientHeight)
            $('lightbox_content').style.position = "relative";*/
        /*$(close_lightbox).style.right = ((1000 - $('img_lightboxed').clientWidth)/2 + 5) + "px";*/
    },
    
    closeImg: function()
    {
        $('lightbox').remove();
    }
    
};
LightBox.initialize();
