    function onResize() {getWindowSize();var box=document.getElementById("shoutbox");if(box && box.getAttribute("class") == "werkebox") {if(iWidth < 1024 && box.style.visibility != "hidden") {changeWerkebox(0);}else if(box.style.visibility == "hidden") {changeWerkebox(1);}}var pole=document.getElementById("shoutbox_pole");if(pole) {while(pole.hasChildNodes()) {pole.removeChild(pole.lastChild);}if(pole.style.visibility == "visible") {setTimeout(shoutboxPole, 1000);}}}function changeWerkebox(visible) {if(typeof changeWerkebox.visible == 'undefined') {changeWerkebox.visible=2;}var box=document.getElementById("shoutbox");var main=document.getElementById("loop");var button=document.getElementById("changeWerkebox");var pole=document.getElementById("shoutbox_pole");if(box && main && button && visible != changeWerkebox.visible) {if(visible == 0) {changeWerkebox.boxwidth=box.style.width;changeWerkebox.mainwidth=main.style.width;box.style.visibility="hidden";box.style.width="0px";main.style.width="100%";button.innerHTML="<a href=\"javascript:changeWerkebox(1)\">&#8594;</a>";if(pole) {pole.style.visibility="hidden";}}else if(visible == 1 && typeof changeWerkebox.boxwidth != 'undefined') {box.style.visibility="visible";box.style.width=changeWerkebox.boxwidth;main.style.width=changeWerkebox.mainwidth;button.innerHTML="<a href=\"javascript:changeWerkebox(0)\">&#8592;</a>";if(pole) {pole.style.visibility="visible";}}}}function fastdesc_switch(use) {use_fastdesc=use;document.cookie="use_fastdesc="+use;var check=document.getElementById("use_fastdesc");if(check) {check.checked=(use == 1) ? true : false;}}function fastdesc_close(obj) {var act;if(obj.getAttribute) {if(obj.getAttribute("href", 0)) {act="desc_"+obj.getAttribute("href", 0).replace(/.*a=(.+)/, "$1");}else {act="desc_"+obj.getAttribute("longdesc", 0).replace(/.*a=(.+)/, "$1");}}else {act=obj;}var prey=document.getElementById(act);if(!prey) {return;}prey.parentNode.removeChild(prey);}function fastdesc(obj) {if(use_fastdesc === 0) {return;}var act;if(obj.getAttribute("href", 0)) {act=obj.getAttribute("href", 0).replace(/.*a=(.+)/, "$1");}else {act=obj.getAttribute("longdesc", 0).replace(/.*a=(.+)/, "$1");}if(document.getElementById("desc_" +act) === undefined) {return;}var div=document.createElement("div");var id=document.createAttribute("id");id.nodeValue="desc_"+act;div.setAttributeNode(id);var style=document.createAttribute("style");style.nodeValue=    "background-color:white;"+     "color:black;"+     "position:fixed;"+     "left:5%;"+     "top:5%;"+     "width:50%;"+     "border:3px groove gray;"+     "padding:0.5em;margin: 2px;"+     "height:50%;"+     "z-index:1000;";div.setAttributeNode(style);var i=document.createElement("object");var data=document.createAttribute("data");data.nodeValue="?fastdesc="+act;i.setAttributeNode(data);var type=document.createAttribute("type");type.nodeValue="text/html";i.setAttributeNode(type);var width=document.createAttribute("width");width.nodeValue="100%";i.setAttributeNode(width);var height=document.createAttribute("height");height.nodeValue="100%";i.setAttributeNode(height);var br=document.createElement("br");var ok=document.createElement("button");var txt=document.createTextNode(gettext("Close"));ok.appendChild(txt);var onclick=document.createAttribute("onclick");onclick.nodeValue="fastdesc_close('"+"desc_"+act+"');";ok.setAttributeNode(onclick);var nomore=document.createElement("button");txt=document.createTextNode(gettext("Do not show me any hints"));nomore.appendChild(txt);onclick=document.createAttribute("onclick");onclick.nodeValue="fastdesc_switch(0);";nomore.setAttributeNode(onclick);div.appendChild(i);div.appendChild(br);div.appendChild(ok);div.appendChild(nomore);document.getElementById("body").appendChild(div);}function options_colors(sel) {var vals=["800000", "FF0000", "FFA500", "A52A2A", "FFFF00", "008000", "808000", "00FFFF", "0000FF", "000080", "4B0082", "EE82EE", "FFFFFF", "000000"];for(var i=0;i != vals.length;++i) {var o=document.createElement("option");o.innerHTML=options_colors_names[i];var value=document.createAttribute("value");value.nodeValue="#"+vals[i];o.setAttributeNode(value);o.style.color=value.nodeValue;sel.appendChild(o);}}function options_fontsize(sel) {var vals=["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", "larger"];for(var i=0;i != vals.length;++i) {var o=document.createElement("option");o.innerHTML=options_fontsize_names[i];var value=document.createAttribute("value");value.nodeValue=vals[i];o.setAttributeNode(value);o.style.font_size=value.nodeValue;sel.appendChild(o);}}function options_list(sel) {var vals=["0", "1", "a", "A", "g", "i", "I", "c", "d", "s",  "H", "J", "h", "k", "N"];for(var i=0;i != vals.length;++i) {var o=document.createElement("option");o.innerHTML=options_list_names[i];var value=document.createAttribute("value");value.nodeValue=vals[i];o.setAttributeNode(value);sel.appendChild(o);}}function options_smiley(o) {var code=[":-)", ":-(", ":-C", ":-P", ":-D", ":-O", ":-/", ":-|", ":-{", ":-$", ":-*", ":-X", ":-W", ":-8", ":-0"] ;var url=["big_smile", "despair", "crying", "tongue_out_happy", "toothy_grin", "frightened", "bandaged", "nervous_happy", "vampire", "money", "girlie", "no_speak", "whistle", "ill", "oh_my"];var rows=Math.ceil(Math.sqrt(code.length));var table=document.createElement("table");o.appendChild(table);var tr;for(var i=0;i != code.length;++i) {if(i % rows === 0) {tr=document.createElement("tr");table.appendChild(tr);}var td=document.createElement("td");var img=document.createElement("img");var onclick=document.createAttribute("onclick");onclick.nodeValue="blog_insert(this)";img.setAttributeNode(onclick);var src=document.createAttribute("src");src.nodeValue="http://localhost/images/smileys/"+url[i]+".png";img.setAttributeNode(src);var alt=document.createAttribute("alt");alt.nodeValue=code[i];img.setAttributeNode(alt);var title=document.createAttribute("title");title.nodeValue=options_smiley_names[i];img.setAttributeNode(title);alt=document.createAttribute("class");alt.nodeValue="smiley";img.setAttributeNode(alt);img.style.width="1em";td.appendChild(img);tr.appendChild(td);}while(i % rows !== 0) {tr.appendChild(document.createElement("td"));++i;}}function isSame(first, sec, out) {var f=document.getElementById(first);var s=document.getElementById(sec);var o=document.getElementById(out);if(f.value == s.value) {o.innerHTML=gettext("Both values are equal.");}else {o.innerHTML=gettext("Both values differ!");}}if (top != self) {if(window.opera) {top.location=self.location;}else {document.links["deprison_opera"].click();}}function navi_onclick(obj) {if(!obj.getAttribute("value")) {obj.setAttribute("value", 1, true);}var val=( parseInt(obj.getAttribute("value"), 10)+1 ) % 2;var children=obj.getElementsByTagName("ul");if(val == 0) {obj.style.backgroundColor="#8494BF;";for (var i=0;i < children.length;++i) {children[i].style.display="block";children[i].style.position="absolute";children[i].style.backgroundColor="#8494BF;";}}else {obj.style.backgroundColor="";for (var i=0;i < children.length;++i) {children[i].style.display="";children[i].style.position="";children[i].style.backgroundColor="";}}obj.setAttribute("value", val, true);}function preview_suggest(obj) {var prev=document.getElementById("werk_preview_suggest");if(!prev) {var div=document.createElement("div");var id=document.createAttribute("id");id.nodeValue="werk_preview_suggest";div.setAttributeNode(id);obj.parentNode.appendChild(div);prev=document.getElementById("werk_preview_suggest");}var ending=obj.value.match(/\.[a-zA-Z0-9]+$/);if(!ending || ending.length < 1) prev.innerHTML=gettext("Please select the file type of your preview in the selection below.");var end=ending[0].substr(1);var t;if(end == "jpg" || end == "jpeg") {t="image/jpeg";}else if(end == "gif") {t="image/gif";}else if(end == "png") {t="image/png";}else if(end == "avi" || end == "mkv" || end == "ogm" || end == "ogg" || end == "mp3") {t="application/x-mplayer2";}else if(end == "mpg" || end == "mpeg") {t="video/mpeg";}else if(end == "txt") {t="text/plain";}else if(end == "mid") {t="audio/x-midi";}else if(end == "flv" || end == "swf") {t="application/x-shockwave-flash";}else if(end == "pdf") {t="application/pdf";}else {prev.innerHTML=gettext("Please select the file type of your preview in the selection below.");return;}{var a=document.createElement("a");var href=document.createAttribute("href");href.nodeValue="javascript:preview_suggested(\""+t+"\")";a.setAttributeNode(href);var txt=document.createTextNode(gettext("Use this file type: ")+t);a.appendChild(txt);prev.appendChild(a);}}function preview_suggested(val) {var pre=document.getElementById("werk_preview");for(var i=0;i < pre.length;++i) {if(pre.options[i].value == val) {pre.selectedIndex=i;break;}}var prev=document.getElementById("werk_preview_suggest");prev.parentNode.removeChild(prev);}function shoutboxPole() {var pole_width=50;var pole_offsetX=-25;var pole_offsetY=-20;var pole_beginHeight=182;var pole_extHeight=1275;var pole=document.getElementById("shoutbox_pole");var main=document.getElementById("loop");var footer=document.getElementById("div_field_error");if(pole && main && footer) {pole.style.visibility="visible";var posfooter=getAbsolutePosition(footer);var posmain=getAbsolutePosition(main);var img=document.createElement("img");var src=document.createAttribute("src");src.nodeValue="images/pole.png";img.setAttributeNode(src);img.style.position="absolute";img.style.top=(posmain[1]+pole_offsetY)+"px";img.style.left=(posmain[0]+pole_offsetX)+"px";pole.appendChild(img);var extensions;for(extensions=0;pole_offsetY+pole_beginHeight+pole_extHeight*(extensions+1) < posfooter[1];++extensions) {img=document.createElement("img");src=document.createAttribute("src");src.nodeValue="images/pole_ext.png";img.setAttributeNode(src);img.style.position="absolute";img.style.top=(posmain[1]+pole_offsetY+pole_beginHeight+pole_extHeight*extensions)+"px";img.style.left=(posmain[0]+pole_offsetX)+"px";pole.appendChild(img);}var height=posfooter[1] -(posmain[1]+pole_offsetY+pole_beginHeight+pole_extHeight*(extensions) );if(height > 0) {div=document.createElement("div");div.style.position="absolute";div.style.top=(posmain[1]+pole_offsetY+pole_beginHeight+pole_extHeight*extensions)+"px";div.style.left=(posmain[0]+pole_offsetX)+"px";div.style.height=height+"px";div.style.width=pole_width+"px";div.style.overflow="hidden";img=document.createElement("img");src=document.createAttribute("src");src.nodeValue="images/pole_ext.png";img.setAttributeNode(src);img.width=pole_width;div.appendChild(img);pole.appendChild(div);}}}function shoutboxPoleHide() {if(typeof shoutboxPoleHide.hide == 'undefined') {shoutboxPoleHide.hide=false;}var pole=document.getElementById("shoutbox_pole");if(!pole) {return;}shoutboxPoleHide.hide=!shoutboxPoleHide.hide;pole.style.visibility=shoutboxPoleHide.hide ? "hidden" : "visible";}getWindowSize();window.onresize=onResize;