3 if (document.getElementsByClassName(
"header").length)
4 for each (var n in document.getElementsByClassName(
"header")[0].childNodes){
5 if (n.nodeName && n.nodeName.toLowerCase() ==
"h1"){
6 var
d = n.parentNode.insertBefore(document.createElement(
"div"), n);
10 var n1 = n.cloneNode(
true);
11 n1.className =
"js outline";
13 var n2 = n.cloneNode(
true);
14 n2.className =
"js filling";
20 for each (var n
in document.getElementsByTagName(
"a")){
21 if (n.href && (n.href.indexOf(
"http://") != -1))
25 for each (var r
in document.getElementsByClassName(
"imagerow")){
26 if (r.childNodes)
for each (var n
in r.childNodes){
27 if (n.nodeName && n.nodeName.toLowerCase() ==
"img"){
28 var img =
new Image();
34 var MAX_IMAGE_HEIGHT = 300;
35 if (size.height > MAX_IMAGE_HEIGHT){
36 var f = size.height / MAX_IMAGE_HEIGHT;
37 size.height = size.height / f;
38 size.width = size.width / f;
40 var
style =
"min-width: " + (img.width/2) +
"px;max-width: " + (size.width) +
"px;";
41 n.setAttribute(
"style", style);
43 if ((img.width <= 260) && (img.height <= MAX_IMAGE_HEIGHT))
46 n.style.cursor =
"pointer";
48 n.ostyle =
"max-width: " + (img.width) +
"px;width:100%;";
50 n.onclick =
function(e){
51 if (!e.target.collapsed){
52 e.target.setAttribute(
"style", e.target.cstyle);
53 e.target.collapsed =
true;
54 for each (var
i in e.target.parentNode.childNodes){
55 if (i.nodeName && (i.nodeName.toLowerCase() ==
"img"))
60 e.target.setAttribute(
"style", e.target.ostyle);
61 e.target.collapsed =
false;
62 for each (var i
in e.target.parentNode.childNodes){
63 if (i.nodeName && (i.nodeName.toLowerCase() ==
"img") && (i!=e.target))
64 i.style.display =
"none";
67 e.target.style.cursor =
"pointer";
_getSelectedPageStyle s i