function	fn_Create_wBef(){if( $("#X_BefHd").length>=1){$("#X_BefHd").prepend("<div id='X_BefCBox'>");$("#X_BefCBox").append("<ul>");$("#X_BefCBox ul").append("<li id='X_ClsBefCB'>");$("#X_ClsBefCB").append("<a id='X_aBef_Cls' href='javascript:fn_close_wBef();' title='閉じる'>閉じる</a>");$("#X_BefCBox ul").append("<li id='X_MaxBefCB'>");$("#X_MaxBefCB").append("<a id='X_aBef_Max' href='javascript:fn_max_wBef();' title='最大化'>最大化</a>");$("#X_BefCBox ul").append("<li id='X_MinBefCB'>");$("#X_MinBefCB").append("<a id='X_aBef_Min' href='javascript:fn_min_wBef();' title='最小化'>最小化</a>");$("#X_SbBtnBef").hover(function(){$("#X_SbBtnBef").css("background-position","0px -44px");},function(){if($("#X_Bef").css("z-index")==fn_get_wBef_ShowIndex()){$("#X_SbBtnBef").css("background-position","right top");}else{$("#X_SbBtnBef").css("background-position","left top");}});}}
function	fn_control_wBef(){if($("#X_BefBd").length>=1){var	v_ShowIndex=fn_get_wBef_ShowIndex();var	v_HideIndex=fn_get_wBef_HideIndex();var	v_zIndex=$("#X_Bef").css("z-index");if(v_zIndex==v_ShowIndex){fn_close_wBef();}else{fn_max_wBef();$("#X_SbBtnBef").css("background-position","right top");}}}
function	fn_min_wBef(){if($("#X_BefBd").size()>=1){$("#X_MinBefCB").css("display","none");$("#X_MaxBefCB").css("display","");$("#X_BefBdBG").css("display","none");$("#X_BefBd").css("display","none");$("#X_BefHdH2").css("display","none");$("#X_BefCBox").css("width","30px").css("height","200px");$("#X_BefHd").css("width","30px").css("height","350px");$("#X_Bef").css("width","40px").css("height","345px");fn_show_wBef();}}
function	fn_max_wBef(){if($("#X_BefBd").size()>=1){$("#X_MinBefCB").css("display","");$("#X_MaxBefCB").css("display","none");$("#X_BefCBox").css("width","100px").css("height","30px");$("#X_BefHd").css("width","600px").css("height","30px");$("#X_BefHdH2").css("display","");$("#X_BefBdBG").css("display","");$("#X_BefBd").css("display","");$("#X_Bef").css("width","630px").css("height","370px");fn_show_wBef();}}
function	fn_show_wBef(){if($("#X_BefBd").length>=1){var	v_ShowIndex=fn_get_wBef_ShowIndex();var	v_BefBd_zIndex=v_ShowIndex+1;$("#X_Bef").css("z-index",v_ShowIndex);$("#X_BefBd").css("z-index",v_BefBd_zIndex);}}
function	fn_close_wBef(){if($("#X_BefBd").length>=1){var	v_HideIndex=fn_get_wBef_HideIndex();var	v_BefBd_zIndex=v_HideIndex+1;$("#X_Bef").css("z-index",v_HideIndex);$("#X_BefBd").css("z-index",v_BefBd_zIndex);$("#X_SbBtnBef").css("background-position","left top");}}
function	fn_get_wBef_ShowIndex(){return	550;}
function	fn_get_wBef_HideIndex(){return	30;}