var pnir;
var document;
var window;


pnir     = new ActiveXObject("Sleipnir.API");
id       = pnir.GetDocumentID(pnir.ActiveIndex);
document = pnir.GetDocumentObject(id);
window   = pnir.GetWindowObject(id);


if (document == null)  {
	pnir.MessageBox("Document オブジェクトを作成できません");
}
else {
	// ここから

t = document.selection?document.selection.createRange().text:(document.getSelection?document.getSelection():(window.getSelection?window.getSelection():''));
d=document;
w=window;
e=w.getSelection;
k=d.getSelection;
x=d.selection;
s=(e?e():(k)?k():(x?x.createRange().text:0));
f='http://www.tumblr.com/share';
l=d.location;
e=encodeURIComponent;
p='?v=3&u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s);
u=f+p;
window.open(u,'t','toolbar=0,resizable=0,status=1,width=450,height=430');


// ここまで

	document = null;

}

pnir = null;
