/*--	サブメニュー表示	--*/
function MenuOn(x){ 
	obj=document.getElementById("submenu"+x).style.visibility="visible";
}

function MenuOff(x){ 
	obj=document.getElementById("submenu"+x).style.visibility="hidden"; 
}

/*-- クリップボードにコピー --*/
function clip_copy() {
  if (document.all && navigator.userAgent.match(/windows/i) && document.obj.area.value) {
    copy_obj = document.obj.area.createTextRange()
    copy_obj.execCommand("Copy")
    alert("クリップボードにコピーしました。");
  }
}


/*-- 画像専用ポップアップ 400x600用（リンク先の指定は → javascript:openImageSizedWindow1('画像のURL');） --*/

function openImageSizedWindow1(src){
    // 画像のサイズに合った空ウィンドウを開く
    var i1 = new Image(); i1.src = src;
    var pop_win1 = window.open(
                      "",
                      "_blank",
                      "width=400,height=600,scrollbars=no,resizable=yes"
                  );
    // 空ウィンドウに画像を出力するためのHTML
    pop_win1.window.document.open();
    pop_win1.window.document.write(
     '<html>'
    +'<head><title>'+i1.alt+'</title></head>'
    +'<body style="margin:0;padding:0;border:0;">'
    +'<a href="javascript:window.close();"><img src="'+i1.src+'" width="400" height="600" alt="クリックすると画面を閉じます。" /></a>'
    +'</body>'
    +'</html>'
    );
    pop_win1.window.document.close();
}

/*-- 画像専用ポップアップ 600x400用（リンク先の指定は → javascript:openImageSizedWindow2('画像のURL');） --*/

function openImageSizedWindow2(src){
    // 画像のサイズに合った空ウィンドウを開く
    var i2 = new Image(); i2.src = src;
    var pop_win2 = window.open(
                      "",
                      "_blank",
                      "width=600,height=400,scrollbars=no,resizable=yes"
                  );
    // 空ウィンドウに画像を出力するためのHTML
    pop_win2.window.document.open();
    pop_win2.window.document.write(
     '<html>'
    +'<head><title>'+i2.alt+'</title></head>'
    +'<body style="margin:0;padding:0;border:0;">'
    +'<a href="javascript:window.close();"><img src="'+i2.src+'" width="600" height="400" alt="クリックすると画面を閉じます。" /></a>'
    +'</body>'
    +'</html>'
    );
    pop_win2.window.document.close();
}
/*-- 画像専用ポップアップ 800x566用（リンク先の指定は → javascript:openImageSizedWindow3('画像のURL');） --*/

function openImageSizedWindow3(src){
    // 画像のサイズに合った空ウィンドウを開く
    var i3 = new Image(); i3.src = src;
    var pop_win3 = window.open(
                      "",
                      "_blank",
                      "width=800,height=566,scrollbars=no,resizable=yes"
                  );
    // 空ウィンドウに画像を出力するためのHTML
    pop_win3.window.document.open();
    pop_win3.window.document.write(
     '<html>'
    +'<head><title>'+i3.alt+'</title></head>'
    +'<body style="margin:0;padding:0;border:0;">'
    +'<a href="javascript:window.close();"><img src="'+i3.src+'" width="800" height="566" alt="クリックすると画面を閉じます。" /></a>'
    +'</body>'
    +'</html>'
    );
    pop_win3.window.document.close();
}
/*-- 画像専用ポップアップ 459×600用（リンク先の指定は → javascript:openImageSizedWindow4('画像のURL');） --*/

function openImageSizedWindow4(src){
    // 画像のサイズに合った空ウィンドウを開く
    var i4 = new Image(); i4.src = src;
    var pop_win4 = window.open(
                      "",
                      "_blank",
                      "width=459,height=600,scrollbars=no,resizable=yes"
                  );
    // 空ウィンドウに画像を出力するためのHTML
    pop_win4.window.document.open();
    pop_win4.window.document.write(
     '<html>'
    +'<head><title>'+i4.alt+'</title></head>'
    +'<body style="margin:0;padding:0;border:0;">'
    +'<a href="javascript:window.close();"><img src="'+i4.src+'" width="459" height="600" alt="クリックすると画面を閉じます。" /></a>'
    +'</body>'
    +'</html>'
    );
    pop_win4.window.document.close();
}