//=======================================================================
// pophtml.js - pop up html script
// Copyright (c) 2009 softama, All rights reserved.
//=======================================================================
function ai(id,c5){return(c5||document).getElementById(id);}function af(d3,c5){return(c5||document).createElement(d3);}function ag(bw,c5){if(!c5)c5=document;return(c5.documentElement&&c5.documentElement[bw]!=undefined)?c5.documentElement[bw]:c5.body[bw];}function as(c6,d7,dg){if(typeof c6=="string")c6=document.getElementById(c6);if(c6){c6.innerHTML=bl.bn(d7,dg);}}function aj(c6,c8){var cp={x:0,y:0};var cj=c6.parentNode;while(c6){cp.x+=c6.offsetLeft;cp.y+=c6.offsetTop;c6=c6.offsetParent;}if(!c8&&!b5.b7){while(cj&&cj.nodeType==1&&cj.nodeName!="BODY"){cp.x-=cj.scrollLeft;cp.y-=cj.scrollTop;cj=cj.parentNode;}}return cp;}function ah(cx){var cy={x:ap(),y:aq(),w:ac(),h:ab()};if(cx){cy.w=parseInt(cy.w*cx);cy.h=parseInt(cy.h*cx);}return cy;}function ap(){return window.pageXOffset||ag("scrollLeft");}function aq(){return window.pageYOffset||ag("scrollTop");}function ac(){return window.innerWidth||ag("clientWidth");}function ab(){return window.innerHeight||ag("clientHeight");}function a6(){var bu=Array.apply(null,arguments);var cl=bu.shift();var c9=bu.shift();return function(){return c9.apply(cl,bu)};}function a7(){var bu=Array.apply(null,arguments);var cl=bu.shift();var c9=bu[0];return function(e){bu[0]=e||window.event;return c9.apply(cl,bu);};}function ad(cm,cn){for(var i in cm){if(cm[i]!=cn[i])return false;}return true;}function ae(cm,cn){return!ad(cm,cn);}a1={a2:function(id,bw){var c6=af("DIV");if(id)c6.id=id;c6.style.position="absolute";c6.style.display="none";document.body.appendChild(c6);if(bw)ar(c6,bw);return c6;}};function a3(c6,dd,c9,c0){c6.addEventListener?c6.addEventListener(dd,c9,c0):c6.attachEvent("on"+dd,c9);}function ao(c6,dd,c9,c0){c6.removeEventListener?c6.removeEventListener(dd,c9,c0):c6.detachEvent("on"+dd,c9);}function aw(e){if(e.stopPropagation){e.stopPropagation();e.preventDefault();}else{e.cancelBubble=true;e.returnValue=false;}}function am(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}}function av(c9,c3){return window.setTimeout(c9,c3||100);}function aa(d4){return window.clearTimeout(d4);}function al(c6,d3){while(c6&&c6.nodeName.toUpperCase()!=d3)c6=c6.parentNode;return c6;}function a9(c6,d3,bw){var ce=c6.getElementsByTagName(d3);for(var i=0;i<ce.length;i++){if(!bw||ad(bw,ce[i]))return ce[i];}return null;}function a5(c6,d3,bw){c6=c6.appendChild(af(d3));if(bw)ar(c6,bw);return c6;}function ak(c6,d3,bw){c6=c6.parentNode.insertBefore(af(d3),c6);if(bw)ar(c6,bw);return c6;}function ar(c6,bw){for(var i in bw){switch(i){case"style":au(c6,bw[i]);break;case"html":c6.innerHTML=bw[i];break;case"text":c6.appendChild(document.createTextNode(bw[i]));break;default:c6[i]=bw[i];break;}}}function au(c6,d2){for(var i in d2)c6.style[i]=d2[i];}function an(c6){c6.parentNode.removeChild(c6);}function a8(){var de=navigator.userAgent;var c1=["MSIE","Firefox","Opera"];for(var i in c1)c1[i]=de.indexOf(c1[i]);var cc={b6:c1[0]>=0&&c1[2]==-1,cd:c1[1]>=0,b7:c1[2]>=0};if(cc.b6)cc.b8=parseFloat(de.substr(c1[0]+5));if(cc.cd)cc.b8=parseFloat(de.substr(c1[1]+8));return cc;}function at(c6,cp,co){if(co==undefined)co=2;var cy=ah();var br=(c6.style.position!="fixed");var x=br?cy.x:0;var y=br?cy.y:0;var c4={left:x+co,top:y+co,right:x+cy.w-co,bottom:y+cy.h-co};if(c6.style.display=="none")c6.style.display="block";c4.right-=c6.offsetWidth;c4.bottom-=c6.offsetHeight;switch(cp){case"upper":x=(c4.left+c4.right)/2;y=c4.top;break;case"upperLeft":x=c4.left;y=c4.top;break;case"center":x=(c4.left+c4.right)/2;y=(c4.top+c4.bottom)/2;break;}c6.style.left=parseInt(x)+"px";c6.style.top=parseInt(y)+"px";}
var bl={bn:function(id,dg){var out="";if(typeof dg=="object"){with(dg)eval(bl.bp(id));}else{eval(bl.bp(id));}return out;},bp:function(id){if(typeof bl.bm[id]!="string"){var c2=bl.bm[id];for(var i=1;i<c2.length;i+=2)c2[i]=bl.bp(c2[i]);bl.bm[id]=c2.join("");}return bl.bm[id];},bo:{'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;','&amp;':'&','&lt;':'<','&gt;':'>','&quot;':'"'},c7:function(cz,ci){if(typeof cz!="string")cz=String(cz);cz=cz.replace(/[&<>"]/g,function(m){return bl.bo[m]});if(ci)cz=cz.replace(/\r?\n/g,"<br>");return cz;},df:function(cz,by){if(typeof cz!="string")cz=String(cz);cz=cz.replace(/&amp;|&lt;|&gt;|&quot;/g,function(m){return bl.bo[m]});if(by)cz=cz.replace(/<br>/g,"\n");return cz;},ck:function(cz){if(typeof cz!="string")cz=String(cz);var d=cz.split(".",2);d[0]=d[0].replace(/\d(?=(?:\d{3})+$)/g,function(m){return m+","});return d.join(".");},cu:function(cz,cr,c0){if(bl.bq&&c0!=-1)return cz.split(cr);var cw=[],m;while(m=cr.exec(cz)){cw.push(RegExp.leftContext);if(c0){if(c0>0){for(var i=1;i<=c0;i++)cw.push(m[i]);}else{cw.push(m[0]);}}cz=RegExp.rightContext;}cw.push(cz);return cw;},ct:function(cz){return cz.replace(/[.\\+*?\[^\]$(){}=!<>|:]/g,function(m){return"\\"+m});},d0:function(cz,q){q=q||'"';return q+cz.replace(new RegExp("["+q+"\\\\]|\\r?\\n","g"),function(m){return"\\"+m})+q;},db:function(cz){return cz.replace(/^[\s\u3000]+|[\s\u3000]+$/g,"");},d1:function(cz){return cz.replace(/<[^<>]*>/g,"");},dc:function(cz){return cz.match(/^(["'])(.*)\1$/)?RegExp.$2:cz;}};try{bl.bq=("A".split(/(A)/).length==3);}catch(e){};
function ax(cf,bs,bv){this.cf=cf.toUpperCase();this.bs=bs;this.bv=(bv!=undefined)?bv:true;}ax.ay=function(){if(window.XMLHttpRequest)return new XMLHttpRequest();var ch=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var i in ch){try{return new ActiveXObject(ch[i])}catch(e){}}return null;};ax.b4=function(cf,bs,cq,bz){var bt=new ax(cf,bs);bt.b3(cq,function(){if(bz)bz(bt);});};ax.prototype.b3=function(cq,bz){if(this.d5)this.az();var bs=this.bs;var bx=null;if(cq!=undefined){if(typeof cq=="string"){bx=encodeURIComponent(cq);}else{bx=[];for(var i in cq){bx[bx.length]=encodeURIComponent(i)+"="+encodeURIComponent(cq[i]);}bx=bx.join("&");}if(this.cf=="GET"){bs+=((bs.indexOf("?")==-1)?"?":"&")+bx;bx=null;}}this.d5=ax.ay();if(!this.d5)return false;this.d5.onreadystatechange=a6(this,this.b2,bz);this.d5.open(this.cf,bs,this.bv);if(this.cf=="POST"){this.d5.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}this.d5.send(bx);return true;};ax.prototype.az=function(){if(this.d5&&this.d5.readyState>0&&this.d5.readyState<4){this.d5.onreadystatechange=function(){};this.d5.abort();}this.d5=null;};ax.prototype.b2=function(bz){if(this.d5&&this.d5.readyState==4){if(bz)bz();this.d5=null;}};ax.prototype.b1=function(){try{return this.d5&&this.d5.readyState==4&&this.d5.status==200;}catch(e){return false;}};ax.prototype.b0=function(){if(this.b1()){return this.d5.responseText;}return null;};
bh={bi:1};ba={be:function(){ba.html=a1.a2("popup_html");ba.bb=a1.a2("popup_back");ba.html.style.position=ba.bb.style.position=bh.bi?"fixed":"absolute";bh.bj=1;},ca:function(e,cb){var m=cb.src.match(/^(.+?)(_hvr)?\.gif$/);if(!m)return;switch(e.type){case"mouseover":cb.src=m[1]+"_hvr.gif";break;case"mouseout":cb.src=m[1]+".gif";break;}},bd:function(e){am(e);var c6=e.target||e.srcElement;if(!bh.bj)ba.be();ba.bb.onclick=a7(null,ba.bc);ba.bb.style.display=ba.html.style.display="block";if(bh.bk){ba.bb.style.width=ac()+"px";ba.bb.style.height=ab()+"px";}if(e.type=="click"){c6=al(c6,"A");var cf="GET";var bs=c6.href;}else{var f=al(c6,"FORM");var cq={};for(var i=0;i<f.elements.length;i++){c6=f.elements[i];if((c6.tagName=="INPUT"&&(c6.type=="text"||c6.type=="hidden"))||c6.tagName=="TEXTAREA")cq[c6.name]=c6.value;}var cf=f.method||"GET";var bs=f.action;}var bu={d6:"ポップアップ",cg:"読み込み中...",dd:"load"};as(ba.html,"d9",{bu:bu});ax.b4(cf,bs,cq,ba.bf);var cs=ah(0.85);ba.html.style.width=cs.w+"px";c6=[a9(ba.html,"DIV",{className:"popup_head"}),a9(ba.html,"DIV",{className:"popup_body"})];c6[1].style.height=cs.h+"px";ba.html.style.height=c6[0].offsetHeight+c6[1].offsetHeight;at(ba.bb,"upperLeft",0);at(ba.html,"center",0);},bf:function(bt){var html=bt.b0();if(html){html=html.match(/<!-- pophtml start -->((?:.|\r|\n)*)<!-- pophtml end -->/)&&RegExp.$1;}else{html=bl.bn("da",{bu:{cg:"読み込みに失敗しました。",dd:"err"}});}var c6=a9(ba.html,"DIV",{className:"popup_body"});c6.innerHTML=html;c6.scrollTop=0;ba.bg(c6);a5(c6,"DIV",{className:"popup_foot",html:bl.bn("d8")});},bg:function(c6){var ce=c6.getElementsByTagName("A");for(var i=0;i<ce.length;i++){if(ce[i].href)ce[i].onclick=a7(null,ba.bd);}var ce=c6.getElementsByTagName("FORM");for(var i=0;i<ce.length;i++){if(ce[i].action)ce[i].onsubmit=a7(null,ba.bd);}},bc:function(e){if(e)aw(e);ba.html.style.display=ba.bb.style.display="none";}};function a0(c6,dd,c9,c0){this.bu=[c6,dd,c9,c0];a3.a4(null,this.bu);}a0.prototype={cv:function(){if(this.bu){ao.a4(null,this.bu);delete this.bu;}}};function b9(dd,c9,c0){this.bu=[document.documentElement||document.body,dd,c9,c0];a3.a4(null,this.bu);}b9.prototype=a0.prototype;bl.bm={d9:['out+=\'<div class="popup_head"><span class="btns"><a href="#" onclick="ba.bc(event)" title="閉じる"><img src="/image/btn_close.gif" onmouseover="ba.ca(event,this)" onmouseout="ba.ca(event,this)"></a></span><span class="title">\'+(bl.c7(bu.d6))+\'</span></div><div class="popup_body">\';','da','out+=\'</div>\';'],da:'if(bu.dd=="err"){out+=\'<span class="error">エラー: \'+(bl.c7(bu.cg))+\'</span>\';}else{out+=\'<span class="notify">\'+(bl.c7(bu.cg));if(bu.dd=="load"){out+=\' <img src="/image/load1.gif" class="mid">\';}out+=\'</span>\';}',d8:'out+=\'<input type="button" onclick="ba.bc()" value="ポップアップを閉じる">\';'};window.onload=function(){b5=a8();if(b5.b6){if(b5.b8<7){bh.bi=0;bh.bk=1;}}if(ax.ay)pophtml=ba.bd;};document.write('<!--[if IE]><style type="text/css">#popup_back {filter:alpha	(opacity=80)}</style><![endif]-->');var pophtml=function(){};
