  var iWidth=800;var iHeight=600;var iXOffset=0;var iYOffset=0;var cRainFallInterval;function getWindowSize() {if (self.innerHeight) {iWidth=self.innerWidth;iHeight=self.innerHeight;iXOffset=self.pageXOffset;iYOffset=self.pageYOffset;}else if (document.documentElement && document.documentElement.clientHeight) {iWidth=document.documentElement.clientWidth;iHeight=document.documentElement.clientHeight;iXOffset=document.documentElement.scrollLeft;iYOffset=document.documentElement.scrollTop;}else if (document.body) {iWidth=document.body.clientWidth;iHeight=document.body.clientHeight;iXOffset=document.body.scrollLeft;iYOffset=document.body.scrollTop;}return 0;}function getAbsolutePosition(obj) {var x=0;var y=0;if(obj.offsetParent) {do {x += obj.offsetLeft;y += obj.offsetTop;}while(obj=obj.offsetParent);}return [x, y];}function mozWrap(txtarea, open, close) {var selLength=txtarea.textLength;var selStart=txtarea.selectionStart;var selEnd=txtarea.selectionEnd;if (selEnd == 1 || selEnd == 2) {selEnd=selLength;}var s1=txtarea.value.substring(0,selStart);var s2=txtarea.value.substring(selStart, selEnd);var s3=txtarea.value.substring(selEnd, selLength);txtarea.value=s1+open+s2+close+s3;return;}function diashow(knopf, par, mod) {var l=par.getElementsByTagName("img");if(l.length != 1) {return;}var oldimg=l[0].getAttribute("src");var num=parseInt(oldimg.replace(/(.*)(\d+)(\..*)$/, "$2"), 10);if(num+mod > parseInt(knopf.value, 10) ) {num=0;}else if(num+mod < 0) {num=parseInt(knopf.value, 10);}else {num += mod;}var newimg=oldimg.replace(/(.*)(\d+)(\..*)$/, "$1"+num+"$3");l[0].setAttribute("src", newimg, 0);}function dia_magnifie(mod, par) {var l=par.getElementsByTagName("img");if(l.length != 1) {return;}var ozoom=l[0].style.width;var num=parseInt(ozoom.replace(/(\d+)/, "$1"), 10);if(!ozoom) {num=60;}num += mod;l[0].style.width=num.toString()+"%";l[0].parentNode.style.width=l[0].style.width;}function isBetween(comp, int1, int2) {return( comp > int1 && comp < int2);}function colorizeChildNodes(parentID, color) {var parent=document.getElementById(parentID);var length=parent.childNodes.length;var c;for(c=0;c < length;++c) {var child=parent.childNodes[c];if(child.nodeType == 1) {child.style.backgroundColor=color;}}}function tiritin_switch(schalter) {document.cookie="tiritin="+((schalter === true) ? "1" : "");location.reload();}function work_preview(id, type, checkbox) {var p=document.getElementById("work_preview");if(p === undefined) {return;}if(!checkbox.checked) {for(var i=0;i < p.childNodes.length;++i) {p.removeChild(p.childNodes[i]);}}else {var o=document.createElement("object");var data=document.createAttribute("data");data.nodeValue="?s=w&a=d&e=5&werk_id="+id;o.setAttributeNode(data);var t=document.createAttribute("type");t.nodeValue=type;o.setAttributeNode(t);getWindowSize();var style=document.createAttribute("style");if(iWidth) {style.nodeValue="max-width: "+iWidth/2+"px;width: 100%";}else {style.nodeValue="width: 100%";}o.setAttributeNode(style);p.appendChild(o);}}function blog_admin_change() {var button=document.getElementById("blog_admin");if(button === undefined) {return;}if(button.checked === false) {document.getElementById("blog_admin_user").disabled=true;document.getElementById("blog_admin_place").disabled=true;}else {document.getElementById("blog_admin_user").disabled=false;document.getElementById("blog_admin_place").disabled=false;}}function werk_admin_change() {var button=document.getElementById("werk_admin");if(button === undefined) {return;}if(button.checked === false) {document.getElementById("werk_admin_user").disabled=true;}else {document.getElementById("werk_admin_user").disabled=false;}}function blog_insert(o) {var tag=o.tagName;var p;var BB1="";var BB2="";if(tag == "img") {p=o.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;}else {p=o.parentNode.parentNode.parentNode.parentNode;}var n=parseInt(p.getAttribute("id", 0).replace(/(\D*)(\d+)$/, "$2"), 10);var text;if(n == 100 && !document.getElementById("blog_context"+n)) {text=document.getElementById("werk_context");}else {text=document.getElementById("blog_context"+n);}if(tag == "button") {BB1="["+o.innerHTML+"]";BB2= "[/"+o.innerHTML+"]";}else if(tag == "select") {BB1="["+o.name+"="+o.childNodes[o.selectedIndex].value+"]";BB2= "[/"+o.name+"]";o.selectedIndex=0;}else if(tag == "img") {BB1="["+o.getAttribute("alt",1)+"]";BB2= "";}if (text.selectionEnd && (text.selectionEnd-text.selectionStart > 0)) {mozWrap(text, BB1, BB2);return;}else {text.value=text.value+BB1+BB2;}}function changeLanguage(sel) {document.cookie="language="+sel.selectedIndex;location.reload();}function reflectCategory(cat, sub) {var i=cat.options[cat.selectedIndex].value;var str=cat.options[cat.selectedIndex].text;for(var c=sub.firstChild;c !== null;c=c.nextSibling) {if(i === 0 || c.getAttribute("value", 1) === "0" || c.label === str ) {c.removeAttribute("disabled", 1);}else {c.setAttribute("disabled", "disabled", 1);}}}function reflectSubCategory(form, cat) {form.werk_cat.selectedIndex=cat.options[cat.selectedIndex].parentNode.getAttribute("title", 1);reflectCategory(form.werk_cat, form.werk_subcat);reflectCategory(form.werk_cat, form.werk_altcat);}function _modifyFontSize(mod, nodes) {for(var i=0;i < nodes.length;++i) {var value=12;if(nodes[i].style.fontSize) {value=parseInt( nodes[i].style.fontSize.replace("px","") );}value += mod;nodes[i].style.fontSize=value+"px";}}function modifyFontSize(mod) {_modifyFontSize(mod, document.getElementsByTagName('p'));_modifyFontSize(mod, document.getElementsByTagName('td'));_modifyFontSize(mod, document.getElementsByTagName('div'));}