iDavid Posted:
]Log in to see images!
// Create a container that allows us to suck content through in the background
// for a popup.
function create_popup_container(opts)
{
var id = opts.id
var w = opts.width
var h = opts.height
var pos = opts.fixed ? “fixed” : “absolute”
// Create a container if it doesn’t exist already
if (!$(id))
{
if ((h + ””Log in to see images! == -1)
h += “px”
var html = ”<div id=’” + id + ”’ style=’display:none; position: ” + pos + ”; width:” + w + “px; height: ” + h + ”’></div>”
new Insertion.Bottom(dogreat timesent.body, html)
}
}
function left_div (div_id)
{
info = prepare_div(div_id)
if (info)
Element.setStyle(info.div, {left: “0px”,
top: ((info.height / 2) – (info.dim.height / 2) + info.y) + “px”})
}
function top_left_div (div_id)
{
info = prepare_div(div_id)
if (info)
Element.setStyle(info.div, {left: “0px”, top: “0px”})
}
function top_right_div (div_id)
{
info = prepare_div(div_id)
if (info) {
var doc = parent ? parent.dogreat timesent : dogreat timesent;
var win = parent ? parent.window : window;
var y = null
if (doc.dogreat timesentElement && doc.dogreat timesentElement.scrollTop) {
y = doc.dogreat timesentElement.scrollTop;
} else if (doc.body) {
y = doc.body.scrollTop;
} else if (win.innerHeight) {
y = win.pageYOffset;
}
Element.setStyle(info.div, {right: “0px”, top: parseInt(y) + “px”})
}
}
// A notification popup, note don’t put var before it, or it won’t be available for chats and such
Notification = {
id : ‘notification_popup’,
POPUP_DELAY : 3000,
SHOW_DELAY : 1000,
PULSATE_DELAY : 300,
queue : $A(),
follower : null,
popping_up : false,
popup : function (title, contents, options)
{
this.enqueue(title, contents, options)
this.start_popping()
},
enqueue : function(title, contents, options)
{
this.queue.push({title: title, contents:contents, optionsLog in to see images!ptions})
},
start_popping : function() {
if ((!this.popping_up) && this.queue.length > 0)
this.popup_from_queue()
},
popup_from_queue : function () {
this.popping_up = true
var pop = this.queue.first()
create_popup_container({id: this.id, width: 170, height: 100})
if (pop.options && pop.options.callback)
this.callback = pop.options.callback
var e = $(this.id)
e.setStyle({bottom: (dogreat timesent.dogreat timesentElement.scrollTop * -1) + “px”})
if (pop.options && pop.options.clbumName) {
e.clbumName = pop.options.clbumName
} else {
e.clbumName = ‘default’
}
e.update(”<div clbum=’message’><h1>” + pop.title + ”</h1>” + (pop.contents || ’’Log in to see images!
Effect.BlindDown(e)
for(var i=0; i<4; i++)
setTimeout(function () { Notification.cycle() }, this.SHOW_DELAY + (this.PULSATE_DELAY * i))
setTimeout(function () { Notification.hide() }, this.SHOW_DELAY + (this.PULSATE_DELAY * 5))
this.clear_follower()
this.follower = new PeriodicalExecuter(function () {
e.setStyle({bottom: (dogreat timesent.dogreat timesentElement.scrollTop * -1) + “px”})
}, 0.1);
},
cycle : function () {
var e = $(this.id)
if (e.clbumName.indexOf(‘flashing’Log in to see images! != -1)
e.clbumName = e.clbumName.replace(“_flashing”, ””Log in to see images!
else
e.clbumName = e.clbumName + (‘_flashing’Log in to see images!
},
hide : function () {
Effect.BlindUp(this.id, {afterFinish: function () {
Notification.clear_follower()
if (Notification.callback)
{
Notification.callback()
Notification.callback = null
}
Notification.queue.splice(0, 1)
if (Notification.queue.length > 0) {
Notification.popup_from_queue()
} else {
Notification.popping_up = false
// See if we have a new notification callback, like on the character page
try {
notification_callback()
} catch(e) { }
}
}})
},
clear_follower : function () {
if (this.follower)
{
this.follower.stop()
this.follower = null
}
}
};
create_popup_container({“id”:”who_online”,”width”:250,”height”:450,”partial”:”who_online”,”position”:”top_right”,”effect”:”slide_down”});
Element.update(“who_online”, ”\u003Cdiv id=’who_online_container’\u003E\n\u003Cdiv clbum=’close’\u003E\n\u003Ca href=\”#\” onclick=\”new Effect.SlideUp(\u0026quot;who_online\u0026quot;,{});; return false;\”\u003EClose\u003C/a\u003E\u003C/div\u003E\n\u003Cdiv clbum=’title_bar’\u003EOnline Players\u003C/div\u003E\n\u003Cdiv clbum=’scroll_list’\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/89/2a6a4590-aa2e-11de-8bb0-001ec94d5d3f.gif\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/ERECTILE_DEATH\” only_path=\”false\” title=\”ERECTILE_DEATH\”\u003EERECTILE_DEATH\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003Ca href=\”/klans/profile/pizza_party\”\u003Epizza party\u003C/a\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/51/bbf2a1e8-8c46-11de-8943-001ec94d5d3f.gif\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/man-man\” only_path=\”false\” title=\”man-man\”\u003Eman-man\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003Ca href=\”/klans/profile/pizza_party\”\u003Epizza party\u003C/a\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/19/a570fdb4-cb2c-11de-b8b6-001ec94d5d3f.png\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/Master_Troll\” only_path=\”false\” title=\”Master_Troll\”\u003EMaster_Troll\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003Ca href=\”/klans/profile/****_bucket\”\u003E**** Bucket\u003C/a\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/5/fdf2ad2c-09b0-11de-b614-001c23d677ba.jpg\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/SaisBlade\” only_path=\”false\” title=\”SaisBlade\”\u003ESaisBlade\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003Ca href=\”/klans/profile/wechall\”\u003EWeChall\u003C/a\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/27/02bed28a-c82a-11de-8cdb-001ec94d5d3f.png\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/spacekadt\” only_path=\”false\” title=\”spacekadt\”\u003Espacekadt\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003Ca href=\”/klans/profile/brainfreeze\”\u003EBrainfreeze\u003C/a\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/22/99b43baa-09b0-11de-b614-001c23d677ba.jpg\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/Spiticus\” only_path=\”false\” title=\”Spiticus\”\u003ESpiticus\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/15/d18d366c-09b0-11de-b614-001c23d677ba.jpg\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/tracylee\” only_path=\”false\” title=\”tracylee\”\u003Etracylee\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003Ca href=\”/klans/profile/wechall\”\u003EWeChall\u003C/a\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003Cdiv clbum=’idc_member’\u003E\n\u003Cimg alt=\”Image\” height=\”50\” src=\”http://uploads.forumwarz.com/cdn/92/718055e8-26ba-11de-9474-00221924d7d8.gif\” width=\”50\” /\u003E\n\u003Ch1\u003E\u003Ca href=\”/profiles/wtfmcnuggets\” only_path=\”false\” title=\”wtfmcnuggets\”\u003Ewtfmcnuggets\u003C/a\u003E\u003C/h1\u003E\n\u003Ch2\u003E\u003Ca href=\”/klans/profile/pizza_party\”\u003Epizza party\u003C/a\u003E\u003C/h2\u003E\n\u003C/div\u003E\n\u003C/div\u003E\n\u003C/div\u003E\n”Log in to see images!;
top_right_div(“who_online”Log in to see images!;
new Effect.SlideDown(“who_online”,{afterFinishLog in to see images!