I did a workaround.. from the lightbox (URL) I am calling a parent javascript. Setting the DOM element directly.
In lightbox
if(typeof parent.window !== 'undefined' && typeof parent.window.closelightbox === 'function'){
parent.closelightbox(); //Call the function only if it exists
}
In parent
function closelightbox(){
element=document.getElementById('easyCenter');
element.style.display="none";
element=document.getElementById('easyOverlay');
//simulate a click...
element.click();
}
//this works in chrome, firefox, IE and Opera. I have not tested any other browser