You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.1 KiB

  1. <!--
  2. Notice: I feel so dirty doing this, but its the only way to make it cross browser.
  3. -->
  4. <html>
  5. <head>
  6. <script>var GB = parent.GB_CURRENT;
  7. document.write('<script type="text/javascript" src="AJS.js"><\/script>');
  8. if(GB.use_fx) {
  9. document.write('<script type="text/javascript" src="AJS_fx.js"><\/script>');
  10. }</script>
  11. <style>
  12. body {
  13. padding: 0;
  14. margin: 0;
  15. overflow: hidden;
  16. }
  17. #GB_frame {
  18. visibility: hidden;
  19. width: 800px;
  20. height: 500px;
  21. }
  22. #loading {
  23. padding-top: 50px;
  24. position: absolute;
  25. width: 100%;
  26. top: 0;
  27. text-align: center;
  28. vertical-align: middle;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <div id="loading">
  34. <img src="indicator.gif">
  35. </div>
  36. <script>var loading = AJS.$('loading');
  37. var gb_type = GB.type;
  38. var gb_url = GB.url;
  39. //Start loading in the iframe
  40. if(gb_type == "page") {
  41. document.write('<iframe id="GB_frame" src="' + gb_url + '" frameborder="0"></iframe>');
  42. }
  43. else {
  44. var img_holder = new Image();
  45. img_holder.src = gb_url;
  46. document.write('<img id="GB_frame" src="' + gb_url + '">');
  47. }
  48. var frame = AJS.$('GB_frame');</script>
  49. </body>
  50. <script>function setupOuterGB() {
  51. frame.style.visibility = 'visible';
  52. GB.setFrameSize();
  53. GB.setWindowPosition();
  54. }
  55. function loaded() {
  56. AJS.removeElement(loading);
  57. GB.overlay.innerHTML += "&nbsp;"; //Safari bugfix
  58. if(gb_type == "image") {
  59. if(img_holder.width != 0 && img_holder.height != 0) {
  60. var width = img_holder.width;
  61. var height = img_holder.height;
  62. GB.width = width;
  63. GB.height = height;
  64. setupOuterGB();
  65. if(GB.use_fx) {
  66. AJS.setOpacity(frame, 0);
  67. AJS.fx.fadeIn(frame);
  68. }
  69. }
  70. }
  71. else {
  72. GB.width = frame.offsetWidth;
  73. GB.height = frame.offsetHeight;
  74. setupOuterGB();
  75. }
  76. }
  77. if(GB.show_loading) {
  78. AJS.AEV(window, 'load', function(e) {
  79. loaded();
  80. });
  81. }
  82. else {
  83. loaded();
  84. }</script>
  85. </html>