/*
WinOpen(src,width,height)について
----------------------------------------------------
htmlから幅と高さを指定して別窓を開く関数です。
以下のようにaタグにonclick属性に書き込みます。

<a href="popup.html" target="_blank" onClick="WinOpen(this.href,550,600); return false;"></a>

・jsを切っている人のためにtarget属性は入れておいてください
・this.hrefはaタグのhref属性に入っている値を入れるので変更する必要はありません
・widthには別窓の幅、heightには別窓の高さを数値で指定してください
*/
function WinOpen(src,width,height){
   if(! WinOpen.arguments[1]) width  = 500;
   if(! WinOpen.arguments[2]) height = 500;
   var wo = window.open(src,"_blank","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height);
   wo.window.focus();
}

/*
WinFixOpen(src)について
----------------------------------------------------
jsであらかじめ設定した幅と高さの別窓を開く関数です。
以下のようにaタグにonclick属性に書き込みます。

<a href="popup.html" target="_blank" onClick="WinFixOpen(this.href); return false;"></a>

・jsを切っている人のためにtarget属性は入れておいてください
・this.hrefはaタグのhref属性に入っている値を入れるので変更する必要はありません
*/
function WinFixOpen(src){
   var wo = window.open(src,"_blank","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=300,height=400");
   wo.window.focus();
}

/*
WinClose()について
----------------------------------------------------
閉じるボタンで使用してください。

<a href="javascript:void(0)" onClick="WinClose()"></a>
*/
function WinClose(){
   self.window.close();
}