function addOnloadEvent(b){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",b,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",b)}else{if(window.onload!=null){var a=window.onload;window.onload=function(c){a(c);window[b]()}}else{window.onload=b}}}};var includeCaption=true;var zoomTime=5;var zoomSteps=15;var includeFade=1;var minBorder=-500;var shadowSettings="0px 5px 25px rgba(0,0,0,";var zoomImagesURI="/blogparts/";var myWidth=0,myHeight=0,myScroll=0;myScrollWidth=0;myScrollHeight=0;var zoomOpen=false,preloadFrame=1,preloadActive=false,preloadTime=0,imgPreload=new Image();var preloadAnimTimer=0;var zoomActive=new Array();var zoomTimer=new Array();var zoomOrigW=new Array();var zoomOrigH=new Array();var zoomOrigX=new Array();var zoomOrigY=new Array();var zoomID="ZoomBox";var theID="ZoomImage";var zoomCaption="ZoomCaption";var zoomCaptionDiv="ZoomCapDiv";if(navigator.userAgent.indexOf("MSIE")!=-1){var browserIsIE=true}function setupZoom(){prepZooms();insertZoomHTML();zoomdiv=document.getElementById(zoomID);zoomimg=document.getElementById(theID)}function prepZooms(){if(!document.getElementsByTagName){return}var a=document.getElementsByTagName("a");for(i=0;i<a.length;i++){if(a[i].getAttribute("href")){if(a[i].getAttribute("href").search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)/gi)!=-1){if(a[i].getAttribute("rel")!="lightbox"){a[i].onclick=function(b){return zoomClick(this,b)};a[i].onmouseover=function(){zoomPreload(this)}}}}}}function zoomPreload(b){var a=b.getAttribute("href");if(imgPreload.src.indexOf(b.getAttribute("href").substr(b.getAttribute("href").lastIndexOf("/")))==-1){preloadActive=true;imgPreload=new Image();imgPreload.onload=function(){preloadActive=false};imgPreload.src=a}}function preloadAnimStart(){preloadTime=new Date();document.getElementById("ZoomSpin").style.left=(myWidth/2)+"px";document.getElementById("ZoomSpin").style.top=((myHeight/2)+myScroll)+"px";document.getElementById("ZoomSpin").style.visibility="visible";preloadFrame=1}function preloadAnim(a){if(preloadActive!=false){preloadFrame++;if(preloadFrame>12){preloadFrame=1}}else{document.getElementById("ZoomSpin").style.visibility="hidden";clearInterval(preloadAnimTimer);preloadAnimTimer=0;zoomIn(preloadFrom)}}function zoomClick(c,b){var a=getShift(b);if(!b&&window.event&&(window.event.metaKey||window.event.altKey)){return true}else{if(b&&(b.metaKey||b.altKey)){return true}}getSize();if(preloadActive==true){if(preloadAnimTimer==0){preloadFrom=c;preloadAnimStart()}}else{zoomIn(c,a)}return false}function zoomIn(b,a){zoomimg.src=b.getAttribute("href");if(b.childNodes[0].width){startW=b.childNodes[0].width;startH=b.childNodes[0].height;startPos=findElementPos(b.childNodes[0])}else{startW=50;startH=12;startPos=findElementPos(b)}hostX=startPos[0];hostY=startPos[1];if(document.getElementById("scroller")){hostX=hostX-document.getElementById("scroller").scrollLeft}endW=imgPreload.width;endH=imgPreload.height;if(zoomActive[theID]!=true){if(document.getElementById("ShadowBox")){document.getElementById("ShadowBox").style.visibility="hidden"}else{if(!browserIsIE){if(fadeActive.ZoomImage){clearInterval(fadeTimer.ZoomImage);fadeActive.ZoomImage=false;fadeTimer.ZoomImage=false}document.getElementById("ZoomImage").style.webkitBoxShadow=shadowSettings+"0.0)"}}document.getElementById("ZoomClose").style.visibility="hidden";if(includeCaption){document.getElementById(zoomCaptionDiv).style.visibility="hidden";if(b.getAttribute("title")&&includeCaption){document.getElementById(zoomCaption).innerHTML=b.getAttribute("title")}else{document.getElementById(zoomCaption).innerHTML=""}}zoomOrigW[theID]=startW;zoomOrigH[theID]=startH;zoomOrigX[theID]=hostX;zoomOrigY[theID]=hostY;zoomimg.style.width=startW+"px";zoomimg.style.height=startH+"px";zoomdiv.style.left=hostX+"px";zoomdiv.style.top=hostY+"px";if(includeFade==1){setOpacity(0,zoomID)}zoomdiv.style.visibility="visible";sizeRatio=endW/endH;if(endW>myWidth-minBorder){endW=myWidth-minBorder;endH=endW/sizeRatio}if(endH>myHeight-minBorder){endH=myHeight-minBorder;endW=endH*sizeRatio}zoomChangeX=((myWidth/2)-(endW/2)-hostX);zoomChangeY=(((myHeight/2)-(endH/2)-hostY)+myScroll);zoomChangeW=(endW-startW);zoomChangeH=(endH-startH);if(a){tempSteps=zoomSteps*7}else{tempSteps=zoomSteps}zoomCurrent=0;if(includeFade==1){fadeCurrent=0;fadeAmount=(0-100)/tempSteps}else{fadeAmount=0}zoomTimer[theID]=setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+hostX+", "+zoomChangeX+", "+hostY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDoneIn(zoomID)')",zoomTime);zoomActive[theID]=true}}function zoomOut(b,a){if(getShift(a)){tempSteps=zoomSteps*7}else{tempSteps=zoomSteps}if(zoomActive[theID]!=true){if(document.getElementById("ShadowBox")){document.getElementById("ShadowBox").style.visibility="hidden"}else{if(!browserIsIE){if(fadeActive.ZoomImage){clearInterval(fadeTimer.ZoomImage);fadeActive.ZoomImage=false;fadeTimer.ZoomImage=false}document.getElementById("ZoomImage").style.webkitBoxShadow=shadowSettings+"0.0)"}}document.getElementById("ZoomClose").style.visibility="hidden";if(includeCaption&&document.getElementById(zoomCaption).innerHTML!=""){document.getElementById(zoomCaptionDiv).style.visibility="hidden"}startX=parseInt(zoomdiv.style.left);startY=parseInt(zoomdiv.style.top);startW=zoomimg.width;startH=zoomimg.height;zoomChangeX=zoomOrigX[theID]-startX;zoomChangeY=zoomOrigY[theID]-startY;zoomChangeW=zoomOrigW[theID]-startW;zoomChangeH=zoomOrigH[theID]-startH;zoomCurrent=0;if(includeFade==1){fadeCurrent=0;fadeAmount=(100-0)/tempSteps}else{fadeAmount=0}zoomTimer[theID]=setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+startX+", "+zoomChangeX+", "+startY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDone(zoomID, theID)')",zoomTime);zoomActive[theID]=true}}function zoomDoneIn(a,b){zoomOpen=true;a=document.getElementById(a);if(document.getElementById("ShadowBox")){setOpacity(0,"ShadowBox");shadowdiv=document.getElementById("ShadowBox");shadowLeft=parseInt(a.style.left)-13;shadowTop=parseInt(a.style.top)-8;shadowWidth=a.offsetWidth+26;shadowHeight=a.offsetHeight+26;shadowdiv.style.width=shadowWidth+"px";shadowdiv.style.height=shadowHeight+"px";shadowdiv.style.left=shadowLeft+"px";shadowdiv.style.top=shadowTop+"px";document.getElementById("ShadowBox").style.visibility="visible";fadeElementSetup("ShadowBox",0,100,5)}else{if(!browserIsIE){fadeElementSetup("ZoomImage",0,0.8,5,0,"shadow")}}if(includeCaption&&document.getElementById(zoomCaption).innerHTML!=""){zoomcapd=document.getElementById(zoomCaptionDiv);zoomcapd.style.top=parseInt(a.style.top)+(a.offsetHeight+15)+"px";zoomcapd.style.left=(myWidth/2)-(zoomcapd.offsetWidth/2)+"px";zoomcapd.style.visibility="visible"}if(!browserIsIE){setOpacity(0,"ZoomClose")}document.getElementById("ZoomClose").style.visibility="visible";if(!browserIsIE){fadeElementSetup("ZoomClose",0,100,5)}document.onkeypress=getKey}function zoomDone(a,b){zoomOpen=false;zoomOrigH[b]="";zoomOrigW[b]="";document.getElementById(a).style.visibility="hidden";zoomActive[b]==false;document.onkeypress=null}function zoomElement(zoomdiv,theID,zoomCurrent,zoomStartW,zoomChangeW,zoomStartH,zoomChangeH,zoomStartX,zoomChangeX,zoomStartY,zoomChangeY,zoomSteps,includeFade,fadeAmount,execWhenDone){if(zoomCurrent==(zoomSteps+1)){zoomActive[theID]=false;clearInterval(zoomTimer[theID]);if(execWhenDone!=""){eval(execWhenDone)}}else{if(includeFade==1){if(fadeAmount<0){setOpacity(Math.abs(zoomCurrent*fadeAmount),zoomdiv)}else{setOpacity(100-(zoomCurrent*fadeAmount),zoomdiv)}}moveW=cubicInOut(zoomCurrent,zoomStartW,zoomChangeW,zoomSteps);moveH=cubicInOut(zoomCurrent,zoomStartH,zoomChangeH,zoomSteps);moveX=cubicInOut(zoomCurrent,zoomStartX,zoomChangeX,zoomSteps);moveY=cubicInOut(zoomCurrent,zoomStartY,zoomChangeY,zoomSteps);document.getElementById(zoomdiv).style.left=moveX+"px";document.getElementById(zoomdiv).style.top=moveY+"px";zoomimg.style.width=moveW+"px";zoomimg.style.height=moveH+"px";zoomCurrent++;clearInterval(zoomTimer[theID]);zoomTimer[theID]=setInterval("zoomElement('"+zoomdiv+"', '"+theID+"', "+zoomCurrent+", "+zoomStartW+", "+zoomChangeW+", "+zoomStartH+", "+zoomChangeH+", "+zoomStartX+", "+zoomChangeX+", "+zoomStartY+", "+zoomChangeY+", "+zoomSteps+", "+includeFade+", "+fadeAmount+", '"+execWhenDone+"')",zoomTime)}}function getKey(a){if(!a){theKey=event.keyCode}else{theKey=a.keyCode}if(theKey==27){zoomOut(this,a)}}function fadeOut(a){if(a.id){fadeElementSetup(a.id,100,0,10)}}function fadeIn(a){if(a.id){fadeElementSetup(a.id,0,100,10)}}var fadeActive=new Array();var fadeQueue=new Array();var fadeTimer=new Array();var fadeClose=new Array();var fadeMode=new Array();function fadeElementSetup(d,f,c,b,e,a){if(fadeActive[d]==true){fadeQueue[d]=new Array(d,f,c,b)}else{fadeSteps=b;fadeCurrent=0;fadeAmount=(f-c)/fadeSteps;fadeTimer[d]=setInterval("fadeElement('"+d+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')",15);fadeActive[d]=true;fadeMode[d]=a;if(e==1){fadeClose[d]=true}else{fadeClose[d]=false}}}function fadeElement(b,d,a,c){if(d==c){clearInterval(fadeTimer[b]);fadeActive[b]=false;fadeTimer[b]=false;if(fadeClose[b]==true){document.getElementById(b).style.visibility="hidden"}if(fadeQueue[b]&&fadeQueue[b]!=false){fadeElementSetup(fadeQueue[b][0],fadeQueue[b][1],fadeQueue[b][2],fadeQueue[b][3]);fadeQueue[b]=false}}else{d++;if(fadeMode[b]=="shadow"){if(a<0){document.getElementById(b).style.webkitBoxShadow=shadowSettings+(Math.abs(d*a))+")"}else{document.getElementById(b).style.webkitBoxShadow=shadowSettings+(100-(d*a))+")"}}else{if(a<0){setOpacity(Math.abs(d*a),b)}else{setOpacity(100-(d*a),b)}}clearInterval(fadeTimer[b]);fadeTimer[b]=setInterval("fadeElement('"+b+"', '"+d+"', '"+a+"', '"+c+"')",15)}}function setOpacity(c,a){var b=document.getElementById(a).style;if(navigator.userAgent.indexOf("Firefox")!=-1){if(c==100){c=99.9999}}b.filter="alpha(opacity="+c+")";b.opacity=(c/100)}function linear(e,a,g,f){return g*e/f+a}function sineInOut(e,a,g,f){return -g/2*(Math.cos(Math.PI*e/f)-1)+a}function cubicIn(e,a,g,f){return g*(e/=f)*e*e+a}function cubicOut(e,a,g,f){return g*((e=e/f-1)*e*e+1)+a}function cubicInOut(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e+a}return g/2*((e-=2)*e*e+2)+a}function bounceOut(e,a,g,f){if((e/=f)<(1/2.75)){return g*(7.5625*e*e)+a}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+a}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+a}else{return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+a}}}}function getSize(){if(self.innerHeight){myWidth=window.innerWidth;myHeight=window.innerHeight;myScroll=window.pageYOffset}else{if(document.documentElement&&document.documentElement.clientHeight){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;myScroll=document.documentElement.scrollTop}else{if(document.body){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;myScroll=document.body.scrollTop}}}if(window.innerHeight&&window.scrollMaxY){myScrollWidth=document.body.scrollWidth;myScrollHeight=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){myScrollWidth=document.body.scrollWidth;myScrollHeight=document.body.scrollHeight}else{myScrollWidth=document.body.offsetWidth;myScrollHeight=document.body.offsetHeight}}}function getShift(b){var a=false;if(!b&&window.event){a=window.event.shiftKey}else{if(b){a=b.shiftKey;if(a){b.stopPropagation()}}}return a}function findElementPos(a){var c=0;var b=0;do{c+=a.offsetLeft;b+=a.offsetTop}while(a=a.offsetParent);return Array(c,b)};function insertZoomHTML(){var k=document.getElementsByTagName("body").item(0);var G=document.createElement("div");G.setAttribute("id","ZoomSpin");G.style.position="absolute";G.style.left="10px";G.style.top="10px";G.style.visibility="hidden";G.style.zIndex="525";k.insertBefore(G,k.firstChild);var s=document.createElement("img");s.setAttribute("id","SpinImage");s.setAttribute("src",zoomImagesURI+"shadow.png");G.appendChild(s);var j=document.createElement("div");j.setAttribute("id","ZoomBox");j.style.position="absolute";j.style.left="10px";j.style.top="10px";j.style.visibility="hidden";j.style.zIndex="499";k.insertBefore(j,G.nextSibling);var t=document.createElement("img");t.onclick=function(N){zoomOut(this,N);return false};t.setAttribute("src",zoomImagesURI+"shadow.png");t.setAttribute("id","ZoomImage");t.setAttribute("border","0");t.setAttribute("style","-webkit-box-shadow: "+shadowSettings+"0.0)");t.style.display="block";t.style.width="10px";t.style.height="10px";t.style.cursor="pointer";j.appendChild(t);var p=document.createElement("div");p.setAttribute("id","ZoomClose");p.style.position="absolute";if(browserIsIE){p.style.left="-1px";p.style.top="0px"}else{p.style.left="-15px";p.style.top="-15px"}p.style.visibility="hidden";j.appendChild(p);var q=document.createElement("img");q.onclick=function(N){zoomOut(this,N);return false};q.setAttribute("src",zoomImagesURI+"closebox.png");q.setAttribute("width","30");q.setAttribute("height","30");q.setAttribute("border","0");q.style.cursor="pointer";p.appendChild(q);if(!document.getElementById("ZoomImage").style.webkitBoxShadow&&!browserIsIE){var o=document.createElement("div");o.setAttribute("id","ShadowBox");o.style.position="absolute";o.style.left="50px";o.style.top="50px";o.style.width="100px";o.style.height="100px";o.style.visibility="hidden";o.style.zIndex="498";k.insertBefore(o,j.nextSibling);var r=document.createElement("table");r.setAttribute("border","0");r.setAttribute("width","100%");r.setAttribute("height","100%");r.setAttribute("cellpadding","0");r.setAttribute("cellspacing","0");o.appendChild(r);var d=document.createElement("tbody");r.appendChild(d);var n=document.createElement("tr");n.style.height="25px";d.appendChild(n);var K=document.createElement("td");K.style.width="27px";n.appendChild(K);var D=document.createElement("img");D.setAttribute("src",zoomImagesURI+"shadow.png");D.setAttribute("width","27");D.setAttribute("height","25");D.style.display="block";K.appendChild(D);var J=document.createElement("td");J.setAttribute("background",zoomImagesURI+"shadow.png");n.appendChild(J);var c=document.createElement("img");c.setAttribute("src",zoomImagesURI+"shadow.png");c.setAttribute("height","1");c.setAttribute("width","1");c.style.display="block";J.appendChild(c);var I=document.createElement("td");I.style.width="27px";n.appendChild(I);var A=document.createElement("img");A.setAttribute("src",zoomImagesURI+"shadow.png");A.setAttribute("width","27");A.setAttribute("height","25");A.style.display="block";I.appendChild(A);inRow2=document.createElement("tr");d.appendChild(inRow2);var H=document.createElement("td");H.setAttribute("background",zoomImagesURI+"shadow.png");inRow2.appendChild(H);var b=document.createElement("img");b.setAttribute("src",zoomImagesURI+"shadow.png");b.setAttribute("height","1");b.setAttribute("width","1");b.style.display="block";H.appendChild(b);var F=document.createElement("td");F.setAttribute("bgcolor","#000000");inRow2.appendChild(F);var a=document.createElement("img");a.setAttribute("src",zoomImagesURI+"shadow.png");a.setAttribute("height","1");a.setAttribute("width","1");a.style.display="block";F.appendChild(a);var E=document.createElement("td");E.setAttribute("background",zoomImagesURI+"shadow.png");inRow2.appendChild(E);var M=document.createElement("img");M.setAttribute("src",zoomImagesURI+"shadow.png");M.setAttribute("height","1");M.setAttribute("width","1");M.style.display="block";E.appendChild(M);var m=document.createElement("tr");m.style.height="26px";d.appendChild(m);var C=document.createElement("td");C.style.width="27px";m.appendChild(C);var y=document.createElement("img");y.setAttribute("src",zoomImagesURI+"shadow.png");y.setAttribute("width","27");y.setAttribute("height","26");y.style.display="block";C.appendChild(y);var B=document.createElement("td");B.setAttribute("background",zoomImagesURI+"shadow.png");m.appendChild(B);var L=document.createElement("img");L.setAttribute("src",zoomImagesURI+"shadow.png");L.setAttribute("height","1");L.setAttribute("width","1");L.style.display="block";B.appendChild(L);var z=document.createElement("td");z.style.width="27px";m.appendChild(z);var x=document.createElement("img");x.setAttribute("src",zoomImagesURI+"shadow.png");x.setAttribute("width","27");x.setAttribute("height","26");x.style.display="block";z.appendChild(x)}if(includeCaption){var f=document.createElement("div");f.setAttribute("id","ZoomCapDiv");f.style.position="absolute";f.style.visibility="hidden";f.style.marginLeft="auto";f.style.marginRight="auto";f.style.zIndex="501";k.insertBefore(f,j.nextSibling);var h=document.createElement("table");h.setAttribute("border","0");h.setAttribute("cellPadding","0");h.setAttribute("cellSpacing","0");f.appendChild(h);var l=document.createElement("tbody");h.appendChild(l);var i=document.createElement("tr");l.appendChild(i);var w=document.createElement("td");w.setAttribute("align","right");i.appendChild(w);var g=document.createElement("img");g.setAttribute("src",zoomImagesURI+"shadow.png");g.setAttribute("width","13");g.setAttribute("height","26");g.style.display="block";w.appendChild(g);var v=document.createElement("td");v.setAttribute("background",zoomImagesURI+"shadow.png");v.setAttribute("id","ZoomCaption");v.setAttribute("valign","middle");v.style.fontSize="14px";v.style.fontFamily="Helvetica";v.style.fontWeight="bold";v.style.color="#000000";v.style.textShadow="0px 2px 4px #000000";v.style.whiteSpace="nowrap";i.appendChild(v);var u=document.createElement("td");i.appendChild(u);var e=document.createElement("img");e.setAttribute("src",zoomImagesURI+"shadow.png");e.setAttribute("width","13");e.setAttribute("height","26");e.style.display="block";u.appendChild(e)}};function RePlace(d,f){var123=("atarasi");varABC=("furui");if(document.getElementById){if(document.getElementById(var123).style.display){if(f!=0){document.getElementById(var123).style.display="block";document.getElementById(varABC).style.display="none"}else{document.getElementById(var123).style.display="none";document.getElementById(varABC).style.display="block"}}else{location.href=f;return true}}else{location.href=f;return true}var c=new Array();var a=new Array();var b;var e=document.getElementById("main").getElementsByTagName("dd");for(b in e){if(e[b].className=="cattoptitle"){c[c.length]=e[b];a[a.length]=e[b].innerHTML}}a.reverse();for(b in c){c[b].innerHTML=a[b]}};
