///on mouse
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
;}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];;};}
;}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);;}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
;}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];;}
;}


///on mouse用スクリプト
function fSwImgS(fImgNm, fSrc) {
        document.images[fImgNm].src = fSrc
;}


///プルダウンメニュー用スクリプト
function replaceEle(){   
    if(document.getElementById){   
        var obj = document.getElementById("menu");   
        obj.innerHTML = obj.innerHTML.replace(/<dt>/gi, '<dt onmouseover="popupMenu(this);" onmouseout="hiddenMenu(this);">');   
        obj.innerHTML = obj.innerHTML.replace(/<li>/gi, '<li onmouseover="popupMenu(this);" onmouseout="hiddenMenu(this);">');   
    ;}   
;}   
       
function popupMenu( obj ){   
    var menu = obj.getElementsByTagName("ul").item(0);   
    if(menu){   
        menu.style.display = "block";   
    ;}   
       
    if(obj.tagName.match(/li/i)){   
        obj.style.backgroundColor = "#E8E8E8";   
    ;}   
;}   
       
function hiddenMenu( obj ){   
    var menu = obj.getElementsByTagName("ul").item(0);   
    if(menu){   
        menu.style.display = "none";   
    ;}   
       
    if(obj.tagName.match(/li/i)){   
        obj.style.backgroundColor = "#E8E8E8";   
    ;}   
;} 


///スライドショー用スクリプト
//--設定部分↓--

var hayasa=7000;  //--スライドショーの速さ（ミリ秒単位）
var min=2;        //--切り替え速度（数値が大きい程速い）

//--設定部分↑--

var f_no=0,l_no,ii=50,i=f_no,hata_sl=false,tid_sl,tid2,joutai,f_tid,fe,tyosaku;
p_obj=new Array();for(t=f_no;t<ii+1;t++){p_obj[t]=new Image();p_obj[t].src=t+".jpg";;}
var one=function(){if(ii>-1){document.getElementById("text3").firstChild.nodeValue=ii+" ]";ii--;l_no=ii;tid2=setTimeout("tyousa();",1);;};},onl=function(){if(tyosaku.href=="http://www.geocities.jp/miyake_kobo/"){joutai="STOP";j_hyouji();document.getElementById("butdiv").style.visibility="visible";;};},tyousa=function(){document.getElementById("timg").src=ii+".jpg";;},top=function(){tyosaku=document.getElementById("c");tyousa();;},k_t=function(){if(hata_sl){teisi();hata_sl=false;;}else{kaisi();hata_sl=true;;};;},kaisi=function(){clearInterval(tid_sl);clearInterval(f_tid);joutai="PLAY >";j_hyouji();tugi();tid_sl=setInterval("tugi();",hayasa);;},teisi=function(){clearInterval(tid_sl);joutai="STOP";j_hyouji();;},saisyo=function(){if(i!=f_no){i=f_no;p_hyouji_fe();n_hyouji();;};},mae=function(){i--;i+=l_no+1;i%=l_no+1;p_hyouji_fe();n_hyouji();;},tugi=function(){i++;i%=l_no+1;p_hyouji_fe();n_hyouji();;},n_hyouji=function(){document.getElementById("text2").firstChild.nodeValue="[ "+(i+1)+"/";;},j_hyouji=function(){document.getElementById("text1").firstChild.nodeValue=joutai;n_hyouji();;},p_hyouji_fe=function(){if(tyosaku.firstChild.nodeValue==String.fromCharCode(77,105,121,97,107,101,95,107,111,98,111,46)){clearInterval(f_tid);fe=100;fe_out();;};},fe_out=function(){if(fe>0){fade_core("myimg",fe);fe-=min*3;f_tid=setTimeout("fe_out();",20);;}else{p_hyouji("myimg",i);n_hyouji("nougaki",i);clearTimeout(f_tid);fe=0;fe_in();;};},fe_in=function(){if(fe<100){fade_core("myimg",fe);fe+=min;f_tid=setTimeout("fe_in();",20);;}else{clearTimeout(f_tid);fade_core("myimg",100);;};},fade_core=function(mono,suu){if(window.ActiveXObject){document.getElementById(mono).filters["alpha"].opacity=suu;;}else{document.getElementById(mono).style.opacity=suu/100;;};},p_hyouji=function(mono,suu){document.getElementById(mono).src=p_obj[suu].src;;};


