|
Revision 21, 2.0 kB
(checked in by admin, 18 years ago)
|
|
|
| Line | |
|---|
| 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> |
|---|
| 7 | var GB = parent.GB_CURRENT; |
|---|
| 8 | document.write('<script type="text/javascript" src="AJS.js"><\/script>'); |
|---|
| 9 | if(GB.use_fx) { |
|---|
| 10 | document.write('<script type="text/javascript" src="AJS_fx.js"><\/script>'); |
|---|
| 11 | } |
|---|
| 12 | </script> |
|---|
| 13 | <style> |
|---|
| 14 | body { |
|---|
| 15 | padding: 0; |
|---|
| 16 | margin: 0; |
|---|
| 17 | overflow: hidden; |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | #GB_frame { |
|---|
| 21 | visibility: hidden; |
|---|
| 22 | width: 100%; |
|---|
| 23 | height: 100%; |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | #loading { |
|---|
| 27 | padding-top: 50px; |
|---|
| 28 | position: absolute; |
|---|
| 29 | width: 100%; |
|---|
| 30 | top: 0; |
|---|
| 31 | text-align: center; |
|---|
| 32 | vertical-align: middle; |
|---|
| 33 | } |
|---|
| 34 | </style> |
|---|
| 35 | </head> |
|---|
| 36 | <body> |
|---|
| 37 | |
|---|
| 38 | <div id="loading"> |
|---|
| 39 | <img src="indicator.gif"> |
|---|
| 40 | </div> |
|---|
| 41 | |
|---|
| 42 | <script> |
|---|
| 43 | var loading = AJS.$('loading'); |
|---|
| 44 | var gb_type = GB.type; |
|---|
| 45 | var gb_url = GB.url; |
|---|
| 46 | |
|---|
| 47 | //Start loading in the iframe |
|---|
| 48 | if(gb_type == "page") { |
|---|
| 49 | document.write('<iframe id="GB_frame" src="' + gb_url + '" frameborder="0"></iframe>'); |
|---|
| 50 | } |
|---|
| 51 | else { |
|---|
| 52 | var img_holder = new Image(); |
|---|
| 53 | img_holder.src = gb_url; |
|---|
| 54 | document.write('<img id="GB_frame" src="' + gb_url + '">'); |
|---|
| 55 | } |
|---|
| 56 | var frame = AJS.$('GB_frame'); |
|---|
| 57 | </script> |
|---|
| 58 | |
|---|
| 59 | </body> |
|---|
| 60 | <script> |
|---|
| 61 | function setupOuterGB() { |
|---|
| 62 | frame.style.visibility = 'visible'; |
|---|
| 63 | GB.setFrameSize(); |
|---|
| 64 | GB.setWindowPosition(); |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | function loaded() { |
|---|
| 68 | AJS.removeElement(loading); |
|---|
| 69 | |
|---|
| 70 | GB.overlay.innerHTML += " "; //Safari bugfix |
|---|
| 71 | |
|---|
| 72 | if(gb_type == "image") { |
|---|
| 73 | if(img_holder.width != 0 && img_holder.height != 0) { |
|---|
| 74 | var width = img_holder.width; |
|---|
| 75 | var height = img_holder.height; |
|---|
| 76 | |
|---|
| 77 | GB.width = width; |
|---|
| 78 | GB.height = height; |
|---|
| 79 | |
|---|
| 80 | setupOuterGB(); |
|---|
| 81 | |
|---|
| 82 | if(GB.use_fx) { |
|---|
| 83 | AJS.setOpacity(frame, 0); |
|---|
| 84 | AJS.fx.fadeIn(frame); |
|---|
| 85 | } |
|---|
| 86 | } |
|---|
| 87 | } |
|---|
| 88 | else { |
|---|
| 89 | GB.width = frame.offsetWidth; |
|---|
| 90 | GB.height = frame.offsetHeight; |
|---|
| 91 | setupOuterGB(); |
|---|
| 92 | } |
|---|
| 93 | } |
|---|
| 94 | |
|---|
| 95 | if(GB.show_loading) { |
|---|
| 96 | AJS.AEV(window, 'load', function(e) { |
|---|
| 97 | loaded(); |
|---|
| 98 | }); |
|---|
| 99 | } |
|---|
| 100 | else { |
|---|
| 101 | loaded(); |
|---|
| 102 | } |
|---|
| 103 | </script> |
|---|
| 104 | </html> |
|---|