/*
HEAVYBOX - MODIFIED v1.0.4
--------
Modification for proxy websites. Originally for Colin Palmer, funkyproxy.com
No iframe, just a div. Meant for loading Advanced Options in.
--------
Copyright ©2007 Nick Berlette, Riuv International
Developed by Nick Berlette
Parent website - http://www.heading1.com
More information and guide - http://www.heading1.com/exploration/heavybox/
LEGAL NOTICE:
Go ahead and use it, and feel free to share it. But PLEASE do not claim any of my code as your own. Thanks :)
------------------------------------------------------
------------------
CONFIGURATIONS, FEEL FREE TO EDIT THESE.
------------------
*/
var loading = true; // Show "Loading..." page before displaying actual page's contents? true means yes, false means no.
var position = 'absolute'; // Choose between fixed (stays put) or absolute (scrolls with the content)
var top = '150'; // Distance from the top of the page (in pixels)
var left = '150'; // Distance from the left of the page (in pixels)
/*
------------------
CONFIGURATIONS DONE, DO NOT EDIT BELOW THIS LINE
------------------
*/
function $ (element) {
return document.getElementById(element);
}
function $$ (tag) {
return document.getElementsByTagName(tag);
}
function getElementsByClassName (className) {
children = document.getElementsByTagName('*') || document.all;
elements = new Array();
for (i = 0; i < children.length; i++) {
child = children[i];
classNames = child.className.split(' ');
for (var x = 0; x < classNames.length; x++) {
if (classNames[x] == className) {
elements.push(child);
break;
}
}
}
return elements;
}
function change_opacity (element, opacity) {
object = $(element);
object.style.filter = 'alpha(opacity=' + opacity + ')';
object.style.MozOpacity = opacity / 100;
object.style.KhtmlOpacity = opacity / 100;
object.opacity = opacity / 100;
}
function fade_out (id) {
for (i = 0; i <= 100; i++) {
x = 100 - i;
setTimeout('change_opacity(\'' + id + '\', ' + x + ')', i+100);
}
}
function fade_in (id) {
for (i = 0; i <= 100; i++) {
setTimeout('change_opacity(\'' + id + '\', ' + i + ')', i+100);
}
}
function heavybox_deploy (contents) {
if(loading) {
$('loader_frame').innerHTML = '
Loading…';
}
change_opacity('heavybox', 0);
$('heavybox').style.visibility = 'visible';
setTimeout("fade_in('heavybox')", 400);
setTimeout("$('loader_frame').innerHTML = '" + contents + "'", 2000);
}
function heavybox_withdraw () {
fade_out('heavybox');
setTimeout("$('heavybox').style.visibility = 'hidden'", 1500);
withdraw = function () {
if(loading) {
$('loader_frame').innerHTML = '
Loading…';
}
$('heavybox').style.top = top + 'px';
$('heavybox').style.left = left + 'px';
}
setTimeout('withdraw()', 1600);
}
function heavybox_write () {
position = position ? position : 'fixed';
document.write('