// --------------------
// swapImage
// --------------------
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_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];}
}


// --------------------
// go_top
// --------------------
virtualTop  = 0;
virtualTopId  = "goTop";
adjPosition = -10;

callExternal = "pSc";
delayExternal= 200



// --------------------
// JustSizeWindow
// --------------------
function JustSizeWindow(img,width,height){
        var opt = "";
        opt+='top=0,left=0';
        opt+=',width='+width+',height='+height+',';
								opt+='top='+(window.screen.height-height)/2+',left='+(window.screen.width-width)/2;
        opt+='directories=0,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0';
        jsw=window.open('','jsw',opt);
        jsw.focus();
        jsw.document.open();
        htm  = '<html><head>';
        htm+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
        htm+='<title>拡大<\/title>';
        htm+='<\/head>';
        htm+='<bod' + 'y style="margin:0; padding:0;">';
        htm+='<a href="javascript:window.close();">';
        htm+='<img src="'+img+'" width="'+width+'" height="'+height+'" border="0" alt="画像をクリックするとウィンドウを閉じます">';
        htm+='<\/a>';
        htm+='<\/bod'+'y><\/html>';
        jsw.document.write(htm);
        jsw.document.close();
    }
