var userVars = "nowhynovotes=1&wufoot=c%3asocial%2cc%3avote%2cc%3acfull&specialties=%20&mission=%20&thewar=%7b%22inventory%22%3a%7b%7d%2c%22strike%22%3a93%2c%22laststrike%22%3a1207132023%2c%22health%22%3a%2d39%2c%22fallen%22%3a1%7d&ipaddy=62%2e253%2e128%2e7&employment=%20&votetime=2002%2d10%2d11&hasRecalculated=1&nwriteups=%20&showmessages_replylink=1&nwriteupsupdate=1261493864&chatterbox_msgs_descend=1&votesrefreshed=1&zenadinheader=1&displaypref_e2node=displayfull&oldexp=%20&nodelets=262%2c1922511%2c263&userstyle=1882070&numwriteups=%20&motto=%20&level=0%20%28Initiate%29%20%2f%200&can_weblog=%20&preferred_theme=1854183&favorite_noders=%2c1704834%2c1909366%2c1914469%2c1918487%2c1918596%2c1920070&includedJS=%2c1872965%2c1930065%2c1872990%2c1951752%2c1878034%2c&wuhead=r%3atype%2cl%3aauthor%2cr%3adtcreate";
var siteVars = { node_id: 932040, nodetype: "writeup"};
document.write('');document.write('');
var Deferrer = {
defer: function (callback, requiredObject) {
if (!Deferrer.interval) {
Deferrer.interval = window.setInterval(Deferrer.checkInterval, 500);
}
Deferrer.callbacks.push({callback: callback, requiredObject: requiredObject});
},
callbacks: [],
checkInterval: function () {
var c = Deferrer.callbacks;
var remaining = [];
for (var i=0; i < c.length; i++) {
var req = eval("typeof(" + c[i].requiredObject + ")");
if (req != 'undefined' && eval(c[i].requiredObject)) {
c[i].callback();
} else {
remaining.push(c[i]);
}
}
Deferrer.callbacks = remaining;
if (Deferrer.callbacks.length == 0) {
window.clearInterval(Deferrer.interval);
}
},
onLoad: function (callback) {
Deferrer.defer(callback, "document.getElementsByTagName('body').length");
}
}
var Debugger = {
log: function (str) {
if (!Debugger.enabled) {
return;
}
if (!Debugger.window) {
Debugger.showWindow();
}
Debugger.window.innerHTML += "LOG: " + str + "
";
},
showWindow: function () {
Debugger.window = document.createElement('div');
with (Debugger.window.style) {
width = '400px';
height = '200px';
backgroundColor = '#ffffff';
border = '1px black solid';
position = 'fixed';
bottom = '10px';
left = '20px';
overflow = 'auto';
}
$$('body')[0].appendChild(Debugger.window);
},
window: false,
enabled: false
}
void new function() { // no exposed names...
function activateActions() {
for ( var i=0 , l=document.getElementsByClassName( 'showwidget' ) ; l[i] ; i++ ) {
var classtest = /\bwidget\b/ ;
for ( var j=0 , family = [ l[i].previousSibling , l[i].nextSibling , l[i].parentNode ,
( l[i].previousSibling ? l[i].previousSibling.previousSibling : null ) ,
( l[i].nextSibling ? l[i].nextSibling.nextSibling : null ) ]; j<5 ; j++ ) {
if ( family[j] && classtest.test( family[j].className ) ) {
l[i].href = l[i].href || 'javascript:' ;
l[i].onclick = showhide ;
l[i].targetwidget = family[j] ;
if (( family[j].parentNode.style.position || "static") == "static" )
family[j].parentNode.style.position = "relative" ;
break ;
}
}
}
for ( var i=0 , l=document.getElementsByClassName( 'confirm' ) ; l[i] ; i++ ) {
l[i].originalhref = l[i].href ;
l[i].onclick = confirmAction ;
}
}
function showhide() {
if ( typeof( this.targetwidget ) == 'undefined' ) alert('Sorry, this widget opener has lost its widget.') ;
var x = this.targetwidget ;
if ( x.style.display == 'none' ) {
x.style.display = 'block' ;
x.openedBy = this ;
this.className += ' open' ;
} else {
x.style.display = 'none' ;
x.openedBy.className = x.openedBy.className.replace( ' open' , '' ) ;
}
return false ;
}
function confirmAction() {
if ( confirm( "Really " + this.title + "?" ) ) {
parent.location= this.originalhref ;
}
return false ;
}
var oldOnLoad = window.onload ;
window.onload = function() {
if (oldOnLoad) oldOnLoad() ;
activateActions() ;
}
} ;
Deferrer.defer( function () {
USERVARS = userVars.toQueryParams();
isZen = USERVARS.preferred_theme == 1854183;
}, "Prototype");
var resizeTextarea = function (e) {
var el = Event.element(e);
var init = el.scrollHeight;
el.setStyle({height: (el.scrollHeight + 10) + 'px'});
var diff = init - el.scrollHeight;
el.setStyle({height: (el.scrollHeight + (2 * diff) + 10) + 'px'});
}
Deferrer.defer(function () {$$('textarea.expandable').each(function(o) {
Event.observe(o, 'keyup', resizeTextarea);
Event.observe(o, 'textInput', resizeTextarea);
o.setStyle({height: '2em', overflow: 'hidden'});
})}, "Prototype");
var ZenCollapser = {
ajaxUrl : "/index.pl",
varChange: function(name, value) {
data = {
mode: "var",
node_id: 1873513,
name: name,
value: value};
myAjax = new Ajax.Request(
ZenCollapser.ajaxUrl,
{method: 'get', parameters: data, onComplete: ZenCollapser.ajax_response}
);
},
ajax_response: function(response) {
is_hidden = eval( '('+response.responseText +')' );
nodelet_id=is_hidden.name.substring(5);
if (is_hidden.value) {
Effect.BlindUp($(nodelet_id).select('.nodelet_content').first());
}
else {
Effect.BlindDown($(nodelet_id).select('.nodelet_content').first());
}
ZenCollapser.hasInitted = true;
},
init: function() {
$$('.nodelet').each( function(nodelet) {
if(USERVARS['hide_'+nodelet.id] == 1) {
nodelet.select('.nodelet_content').first().hide();
}
});
$$('.nodelet_title').invoke('observe','click',function(event){
nodelet_id = Event.element(event).parentNode.id;
new Effect.Highlight(nodelet_id);
if ($(nodelet_id).select('.nodelet_content').first().visible()) {
ZenCollapser.varChange('hide_'+nodelet_id, 1);
}
else {
ZenCollapser.varChange('hide_'+nodelet_id, 0);
}
});
$$('.nodelet_title').invoke('setStyle', {cursor: 'pointer'});
},
hasInitted: false
};
Deferrer.onLoad(ZenCollapser.init);
var writeupAjaxExists = undefined;
var WriteupAJAX = undefined;
Deferrer.defer( function() {
WriteupAJAX = Class.create( {
header: "",
initialize: function (el) {
this.header = el;
this.node_id = el.id.substring(8);
this.author = el.select(".writeup_author a").first().innerHTML;
},
getItem: function(item) {
if (item == "box") {
box = this.header.select(".writeup_"+item).first();
box.style.display = "block";
return box;
}
return this.header.select(".writeup_"+item).first();
},
writeupMessage: function() {
this.getItem("box").update(" ");
},
sendmessage: function() {
E2AJAX.privateMessage(this.author.gsub(" ","_"), $("msg_"+this.node_id).value);
this.getItem("box").update("message sent");
Element.hide.delay(2, this.getItem("box"));
},
bookmark: function() {
E2AJAX.bookmarkNode(this.node_id);
this.getItem("bookmark").update("bookmarked");
},
favorite: function() {
this.getItem("favorite").update("favorited");
},
vote: function(weight) {
E2AJAX.voteNode(this.node_id, weight);
show = "up";
if (weight == -1) {show = "down";}
this.getItem("vote").update("voted " + show);
},
cool: function () {
E2AJAX.coolNode(this.node_id);
this.getItem("cool").update("cooled");
},
killBox: function() {
this.getItem("box").update("kill box");
},
kill: function() {
this.getItem("kill").update("killed");
},
toolSet: function() {
this.getItem("box").update("Publish Hide");
}
});
writeupAjaxExists = 1;},"Prototype");
var nsCollapser = {
init: function() {$$('.nodelet_section .ns_title').invoke('observe','click',function(event){ Event.element(event).nextSibling.toggle(); });}
};
if (window.onload) {
var f = window.onload;
window.onload = function() { nsCollapser.init(); f() };
} else {
window.onload = nsCollapser.init;
}
var E2AJAX = {
ajaxNode : 1873513,
ajaxUrl : "/index.pl",
varChange: function(name, value, callback) {
USERVARS[name] = value;
varString = Hash.toQueryString(USERVARS);
data = {node_id: E2AJAX.ajaxNode,
mode: "allvars",
varString: varString,
name: name
};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl,{method: 'get', parameters: data, onComplete: callback});
},
privateMessage: function(recipient, msgText) {
E2AJAX.sendMessage("/msg "+recipient+" "+msgText);
},
getLastMessage: function() {
},
sendMessage: function(msgText,checkmsg,callback) {
if ((msgText.length ==0)&&(checkmsg == '')) {
E2AJAX.update("chatterbox_chatter", "showchatter", {}, 0);
$('talk_button').update('');
}
else {
data = {
node_id: E2AJAX.ajaxNode,
mode: "message",
deletelist: checkmsg,
msgtext: msgText.replace( /[^ -~]/gm , function(x) { return "" + x.charCodeAt(0) + ";" ; } )
};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl,{method: 'get', parameters: data, requestHeaders: ["If-Modified-Since", "Thu, 1 Jan 1970 00:00:00 GMT"], onComplete: callback});
}
},
update: function(id, htmlcode, args, replaceID, callback) {
args = Object.toJSON(args);
if (replaceID == null) {replaceID = 1;}
data = {node_id: E2AJAX.ajaxNode,
mode: "update",
htmlcode: htmlcode,
args: args
};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl,{method: 'get', parameters: data, requestHeaders: ["If-Modified-Since", "Thu, 1 Jan 1970 00:00:00 GMT"], onComplete: function(response) {
if (callback != null) {
callback();
}
if (replaceID) {
$(id).replace(response.responseText);
}
else {
$(id).update(response.responseText);
}
}
});
},
voteNode: function(node_vote, weight) {
data = {node_id: E2AJAX.ajaxNode,
mode: "vote"
};
data["vote__" + node_vote] = weight;
$("voteinfo_"+node_vote).select(".vote_buttons").first().update("Voting ...");
myAjax = new Ajax.Request(E2AJAX.ajaxUrl,
{
method: 'get',
parameters: data,
onSuccess: function() { E2AJAX.update("voteinfo_"+node_vote, "voteit", node_vote+",2", 0);} } );
},
bookmarkNode: function(node_bookmark) {
data = {
op : "bookmark",
node_id : node_bookmark
};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl, {method: 'get', parameters: data});
},
coolNode: function (node_cool) {
data = {
op : "cool",
cool_id : node_cool
};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl, {method: 'get', parameters: data});
},
updateNodelet: function(nodeletName, args) {
nodeletID = nodeletName.toLowerCase().replace(/\W/g,'');
if (args == null) {args = {};}
args.nodelet = nodeletName;
E2AJAX.update(nodeletID,'updateNodelet',args);
},
createTitle: function(title) {
data = {type : "e2node",
op : "new",
node : title};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl, {parameters: data, onSuccess: function() {E2AJAX.titleCreated = 1;}});
},
createWriteup: function(parent_e2node, doctext, writeuptype) {
data = {op: "new",
type: "writeup",
writeup_doctext: doctext,
writeup_parent_e2node: parent_e2node,
writeuptype: writeuptype
};
new Ajax.Request(E2AJAX.ajaxUrl, {parameters: data, method: "post"});
},
postWriteup: function(title, doctext, writeuptype) {
E2AJAX.createTitle(title);
Deferrer.defer(function() {E2AJAX.getNodeInfo(title,"e2node","node_id");}, "E2AJAX.titleCreated");
Deferrer.defer(function() {E2AJAX.createWriteup(E2AJAX.parentNode, doctext, writeuptype);}, "E2AJAX.parentNode");
},
getNodeInfo: function(nodeTitle, nodeType, field) {
data = {node_id: E2AJAX.ajaxNode,
mode: "getNodeInfo",
type: nodeType,
field: field,
title: nodeTitle
};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl,{method: "get", parameters: data, onComplete: function(response) { E2AJAX.parentNode = response.responseText;} });
},
markNotificationSeen: function(notified_id) {
//$("notified_"+notified_id).fade();
Effect.BlindUp("notified_"+notified_id);
data = {
node_id: E2AJAX.ajaxNode,
notified_id: notified_id,
mode: "markNotificationSeen"
};
myAjax = new Ajax.Request(E2AJAX.ajaxUrl,{method: "get", parameters: data});
},
checkNotifications: function() {
E2AJAX.checkList("checkNotifications", E2AJAX.notificationOn, E2AJAX.notificationOff, ".notified", "notified_");
},
checkCools: function(){
E2AJAX.checkList("checkCools", E2AJAX.coolOn, E2AJAX.coolOff, ".cooled", "cooled_");
},
checkMessages: function(){
E2AJAX.checkList("checkMessages", E2AJAX.messageOn, E2AJAX.messageOff, ".messaged", "messaged_");
},
checkFeedItems: function(){
E2AJAX.checkList("checkFeedItems", E2AJAX.feedItemOn, E2AJAX.feedItemOff, ".feeditem", "feeditem_");
},
itemOff: function(id) {
Effect.BlindUp($(id));
},
itemOn: function(id, IDGroup, holder, content, position) {
if (position == "top") {
$(holder).insert({ top: content});
}
else {
$(holder).insert({ bottom: content});
}
Effect.BlindDown($(IDGroup+id));
new Effect.Highlight.defer($(IDGroup+id));
},
messageOff: function(messaged_id) {
E2AJAX.itemOff(messaged_id);
},
messageOn: function(id, content, position) {
content = "