Index: lams_tool_images/web/includes/javascript/imageGalleryitem.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/javascript/imageGalleryitem.js,v diff -u -r1.2 -r1.3 --- lams_tool_images/web/includes/javascript/imageGalleryitem.js 25 Dec 2008 14:28:02 -0000 1.2 +++ lams_tool_images/web/includes/javascript/imageGalleryitem.js 23 Jul 2013 17:52:54 -0000 1.3 @@ -25,20 +25,26 @@ } function cancelImageGalleryItem(){ - window.top.hideMessage(); + window.hidenMessage ? window.hideMessage() : window.top.hideMessage(); } /** * Launches the popup window for the instruction files */ function showMessage(url) { - var area=window.top.document.getElementById("reourceInputArea"); + var area=window.document.getElementById("reourceInputArea"); + var elem = window.document.getElementById("saveCancelButtons"); + if (!area) { + area = window.top.document.getElementById("reourceInputArea"); + elem = window.top.document.getElementById("saveCancelButtons"); + } + if(area != null){ area.style.width="650px"; area.style.height="100%"; area.src=url; area.style.display="block"; } - var elem = window.top.document.getElementById("saveCancelButtons"); + if (elem != null) { elem.style.display="none"; }