GK = (document.getElementById) ? 1 : 0; IE = (document.all) ? 1 : 0; defcol = "#ffd700"; sttcol = new Array(255,255,0); endcol = new Array(255,165,0); span = 30; speed = 10; var fd var lock; marge = new Array(); intcol = new Array(); resept = new Image(); resept.src = "/image/resept.gif"; clr = new Image(); clr.src = "/image/clr.gif"; flock = 1; var FD; sp = 100; for(i in endcol) marge[i] = (sttcol[i] - endcol[i]) / span; function init() { list = (GK) ? document.getElementById("menu").getElementsByTagName("a"): document.all("menu").document.all.tags("a"); for(i = 0; i < list.length; i ++) { list[i].onmouseover = over; list[i].onmouseout = out; list[i].onfocus = active; list[i].onblur = unactive; } for(i = 0; i < list.length; i ++) { out(0,list[i]); } if(document.forms["diary"]) if(document.forms["diary"].elements["reg_date"][1]) if(document.forms["diary"].elements["reg_date"][1].checked) rd_disable(1); an = document.getElementsByTagName("a"); for(i = 0; i < an.length; i ++) { if(String(an[i].href).match(/\/image\//)) an[i].onclick = function() { im_open(this.href); return false; } } document.getElementById("overlay").onclick = im_close; document.getElementById("imtbl").onclick = im_close; agt = navigator.userAgent; cmd = (agt.match(/firefox/i)) ? 'MozOpacity' : (agt.match(/safari/i)) ? 'Opacity' : (document.all && ! window.opera) ? 'filter' : ''; sel = document.getElementsByTagName("select"); flock = 0; } function over() { lock = 0; setcol = new Array(sttcol[0], sttcol[1], sttcol[2]); s = 0; fade(this); } function fade(p) { obj = p; for(i in setcol) { if(s) setcol[i] -= marge[i]; intcol[i] = Math.floor(setcol[i]); } obj.style.background = "rgb(" + intcol.join(",") + ")"; if(s++ < span) fd = setTimeout("fade(obj)", speed); } function out(x,p) { obj = (p) ? p : this; if(lock) return; clearTimeout(fd); obj.style.background = defcol; } function active() { lock = 1; clearTimeout(fd); this.style.background = "rgb(" + endcol.join(",") + ")"; } function unactive() { lock = 0; this.style.background = defcol; } function rd_disable(n) { rd = new Array("y", "m", "d", "h", "mn"); if(n) { for(i in rd) document.forms["diary"].elements[rd[i]].disabled = false; } else for(i in rd) document.forms["diary"].elements[rd[i]].disabled = true; } function del_conf(s, n) { if(confirm("■タイトル\n→" + s + "\n\n■日付\n→" + n + "\n\nこの記事を削除します。宜しいですか?")) return true; else return false; } function im_view(loc, w, h) { view = window.open("", "view", "width=650,height=650,resizable"); view.moveTo(0, 0); view.focus(); with(view.document) { open(); write("