Kotisivukone={popup:function(b,c,a){var d=window.open(b,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+c+", height="+a);d.focus();return false;}};function init(){if(window.initEdit!=null){initEdit();Initialize.checkContentWidth("content_view");}else{Initialize.checkContentWidth("content");}if(window.stateFunction!=null){stateFunction();}if(window.pageInit!=null){pageInit();}}Initialize={checkContentWidth:function(f){if(document.getElementById&&document.getElementById(f)){var d=document.getElementById(f);var g=d.innerHTML;if(window.disableWidthCheckIfScripts!=null&&window.disableWidthCheckIfScripts!=undefined&&window.disableWidthCheckIfScripts==true&&g.indexOf("script")!=-1){return;}if(window.disableWidthCheck!=null&&window.disableWidthCheck!=undefined&&window.disableWidthCheck==true){return;}var b=40;if(window.decreaseWidthBy!=null&&window.decreaseWidthBy!=undefined&&window.decreaseWidthBy>0){b=window.decreaseWidthBy;}var e=0;if(window.XMLHttpRequest){e=d.offsetWidth;}else{d.innerHTML="";var e=d.offsetWidth;d.innerHTML=g;}if(e>100){var a=document.getElementById(f).getElementsByTagName("img");for(var c=0;c<a.length;c++){if(a[c].offsetWidth>e){a[c].style.width=(e-b)+"px";}}a=document.getElementById(f).getElementsByTagName("table");for(var c=0;c<a.length;c++){if(a[c].offsetWidth>e){a[c].style.width=(e-b)+"px";}}}}}};menu=function(){if(document.getElementById&&document.getElementById("navi")){var a=document.getElementById("navi").getElementsByTagName("LI");for(var b=0;b<a.length;b++){a[b].onmouseover=function(){this.className+=" hover";};a[b].onmouseout=function(){this.className=this.className.replace(new RegExp(" hover\\b"),"");};}}};if(window.attachEvent){window.attachEvent("onload",menu);}function swapImage(b,a){if(document.getElementById&&document.getElementById(b)){document.getElementById(b).src=a;}}function popUpImage(d,b,a){if(document.getElementById&&document.getElementById(d)){var c=window.open(document.getElementById(d).src,"image","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+b+", height="+a);c.focus();return false;}}function popup(a){var b=window.open(a,"kotisivukone_popup","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=250, height=300");b.focus();return false;}function changeCalendarDate(b,h,e,c,g,a,d,f){new Ajax.Updater(d,a+"?ajax",{parameters:"resource=calendar_block_change_date&action="+e+"&year="+c+"&month="+g+"&subset="+f+"&pageid="+b+"&hash="+h+"&page_root_url="+a,asynchronous:true,evalScripts:true});}