var PATH_SUBMIT="http://dc.kousokubiyori.jp/dc/DriveCompass.html",PATH_DC="http://dc.kousokubiyori.jp/dc/DriveCompass.html",PATH_IC_DATA="/dc/dc_data/data_091127.js",icFormName=["s_ic","e_ic"],icCodeFormName=["s_ic_cd","e_ic_cd"],rosenFormName=["s_rd","e_rd"],rosenCodeFormName=["s_rd_cd","e_rd_cd"],CLOSED_LIST=[["1830","096","このICは11月30日をもって閉鎖されております。"]],IC_SUG_WIDTH=220,IC_SUG_HEIGHT=400,IC_SUG_WIDTH_INDEX=300,IC_SUG_HEIGHT_INDEX=220,IDX_RTCD=0,IDX_RTNM=1,IDX_ICCD=2,IDX_ICNM=3,IDX_ICYM=4,IDX_ICP1=5,IDX_ICP2=6,IDX_ICP3=7,IDX_ICP4=8,IDX_ICMPX=9,IDX_ICMPY=10,IDX_ICMPD=11,IDX_IC_STR_D=12,IDX_IC_STR_O=13,IDX_IC_STR_T=14,OBSERVER_LIST=[],IC_DATA_LENGTH=0,isAutoStartAimai=false,flagIcDataLoaded=false,flagIcDataLoading=false,timerCheckIcDataLoaded=0,isIE7=false,isIE6=false,isGecko=false,isSafari=false,isOpera=false,currentFocusedForm=0,currentSuggestForm=0,currentSuggestSelected=0,currentSuggestTotal=0,flagSuggestStandBy=false,flagSuggestListEntered=false,flagSuggestKeepFocus=false,timerSuggestDelay=0,timerSuggestBlur=0,timerFxSuggest=0,fxInputTemp=["",""],fxInputTempC=["",""],fxInputTempR=["",""],fxInputTempRC=["",""],suggestKeyDown=0,MSG_ERR_IC_DATA="ICデータが読み込まれていません。",MSG_ERR_NO_HOLDER="ドライブコンパスが表示できません。\n詳細：DC_holder要素がありません。",MSG_ERR_NO_DC="ドライブコンパスが表示できません。\n詳細：DC_holder要素にドライブコンパスが読み込まれていません。";function dc_startUpIndex(){if(!$("DC_holder")){alert(MSG_ERR_NO_HOLDER);return }if(!$("DC_holder").innerHTML){alert(MSG_ERR_NO_DC);return }dc_getBrowser();dc_setObserving($(icFormName[0]),"keydown",dc_checkArrowKey0);dc_setObserving($(icFormName[1]),"keydown",dc_checkArrowKey1);dc_setObserving($(icFormName[0]),"keyup",dc_checkInput0);dc_setObserving($(icFormName[1]),"keyup",dc_checkInput1)}function dc_loadIcData(){if(flagIcDataLoaded||flagIcDataLoading){return }dc_createScript(PATH_IC_DATA);flagIcDataLoading=true;timerCheckIcDataLoaded=setInterval(dc_checkIcDataLoaded,100)}function dc_checkIcDataLoaded(){if(!dc_checkIcData()){return }flagIcDataLoaded=true;flagIcDataLoading=false;clearInterval(timerCheckIcDataLoaded)}function dc_checkIcData(){try{icData}catch(e){return false}if(!IC_DATA_LENGTH){IC_DATA_LENGTH=icData.length}return IC_DATA_LENGTH}function $(v){return document.getElementById(v)}function h(v){$(v).style.display="none"}function s(v){$(v).style.display="block"}function dc_setObserving(elem,name,func){OBSERVER_LIST.push([elem,name,func]);dc_addEvent(elem,name,func)}function dc_stopObserving(){for(var i=0,len=OBSERVER_LIST.length;i<len;i++){dc_deleteEvent(OBSERVER_LIST[i][0],OBSERVER_LIST[i][1],OBSERVER_LIST[i][2]);OBSERVER_LIST[i]=null}}function dc_addEvent(elem,name,func){if(elem.addEventListener){elem.addEventListener(name,func,false)}else{if(elem.attachEvent){try{elem.attachEvent("on"+name,func)}catch(e){}}}}function dc_deleteEvent(elem,name,func){if(elem.removeEventListener){elem.removeEventListener(name,func,false)}else{if(elem.detachEvent){try{elem.detachEvent("on"+name,func)}catch(e){}}}}function dc_getBrowser(){var ua=navigator.userAgent;var IEVer=Number(ua.substring(ua.indexOf("MSIE",0)+5,ua.indexOf(";",ua.indexOf("MSIE",0))));isIE7=!!(window.attachEvent&&!window.opera)&&IEVer>=7;isIE6=!!(window.attachEvent&&!window.opera)&&IEVer>=6&&IEVer<7;isOpera=!!window.opera;isGecko=ua.indexOf("Gecko")>-1&&ua.indexOf("KHTML")==-1;isChrome=ua.indexOf("Chrome/")>-1;isSafari=!isChrome&&ua.indexOf("AppleWebKit/")>-1}function dc_checkFixed(fm){return $(rosenCodeFormName[fm]).value&&$(rosenFormName[fm]).value}function dc_decodeURL(str){var s0,i,j,s,ss,u,n,f;s0="";for(i=0;i<str.length;i++){s=str.charAt(i);if(s=="+"){s0+=" "}else{if(s!="%"){s0+=s}else{u=0;f=1;while(true){ss="";for(j=0;j<2;j++){sss=str.charAt(++i);if(((sss>="0")&&(sss<="9"))||((sss>="a")&&(sss<="f"))||((sss>="A")&&(sss<="F"))){ss+=sss}else{--i;break}}n=parseInt(ss,16);if(n<=127){u=n;f=1}if((n>=192)&&(n<=223)){u=n&31;f=2}if((n>=224)&&(n<=239)){u=n&15;f=3}if((n>=240)&&(n<=247)){u=n&7;f=4}if((n>=128)&&(n<=191)){u=(u<<6)+(n&63);--f}if(f<=1){break}if(str.charAt(i+1)=="%"){i++}else{break}}s0+=String.fromCharCode(u)}}}return s0}function dc_encodeURL(str){var s0,i,s,u;s0="";for(i=0;i<str.length;i++){s=str.charAt(i);u=str.charCodeAt(i);if(s==" "){s0+="+"}else{if(u==42||u==45||u==46||u==95||((u>=48)&&(u<=57))||((u>=65)&&(u<=90))||((u>=97)&&(u<=122))){s0=s0+s}else{if((u>=0)&&(u<=127)){s="0"+u.toString(16);s0+="%"+s.substr(s.length-2)}else{if(u>2097151){s0+="%"+(oxf0+((u&1835008)>>18)).toString(16);s0+="%"+(128+((u&258048)>>12)).toString(16);s0+="%"+(128+((u&4032)>>6)).toString(16);s0+="%"+(128+(u&63)).toString(16)}else{if(u>2047){s0+="%"+(224+((u&61440)>>12)).toString(16);s0+="%"+(128+((u&4032)>>6)).toString(16);s0+="%"+(128+(u&63)).toString(16)}else{s0+="%"+(192+((u&1984)>>6)).toString(16);s0+="%"+(128+(u&63)).toString(16)}}}}}}return s0}function dc_createScript(src){var scrElem=document.createElement("script");scrElem.setAttribute("type","text/javascript");scrElem.setAttribute("language","JavaScript");scrElem.setAttribute("src",src);document.getElementsByTagName("head")[0].appendChild(scrElem)}function dc_showSugList(){s("sug")}function dc_hideSugList(){h("sug")}function getClosed(rtcd,iccd){var b=false;for(var i=0,len=CLOSED_LIST.length;i<len;i++){b=((rtcd==CLOSED_LIST[i][0])&&(iccd==CLOSED_LIST[i][1]))||b}return b}function getClosedString(rtcd,iccd){for(var i=0,len=CLOSED_LIST.length;i<len;i++){if((rtcd==CLOSED_LIST[i][0])&&(iccd==CLOSED_LIST[i][1])){return CLOSED_LIST[i][2]}}return"このICは閉鎖されております。"}function dc_checkAimai(isCheckOnly){var vDepIcCode=$(icCodeFormName[0]).value;var vDepIc=$(icFormName[0]).value;var vDepRosenCode=$(rosenCodeFormName[0]).value;var vDepRosen=$(rosenFormName[0]).value;var vArrIcCode=$(icCodeFormName[1]).value;var vArrIc=$(icFormName[1]).value;var vArrRosenCode=$(rosenCodeFormName[1]).value;var vArrRosen=$(rosenFormName[1]).value;isAutoStartAimai=false;if(!vDepIc&&!vArrIc){alert("出発IC・到着ICが指定されていません。");return }if(!vDepIc){alert("出発ICが指定されていません。");$(icFormName[0]).focus();return }if(!vArrIc){alert("到着ICが指定されていません。");$(icFormName[1]).focus();return }if((vDepIcCode==vArrIcCode)&&(vDepIc==vArrIc)&&(vDepRosenCode==vArrRosenCode)&&(vDepRosen==vArrRosen)){alert("出発ICと到着ICに同じICが指定されています。");return }var isDepFixed=(vDepRosenCode&&vDepRosen);var isArrFixed=(vArrRosenCode&&vArrRosen);if(isDepFixed&&isArrFixed&&!isCheckOnly){dc_startSearch();return }var aimaiArrDep=[];var aimaiArrArr=[];var hitArrDep=[];var hitArrArr=[];var aimaiCntDep=0;var aimaiCntArr=0;var hitCntDep=0;var hitCntArr=0;for(var i=0;i<IC_DATA_LENGTH;i++){if(getClosed(icData[i][IDX_RTCD],icData[i][IDX_ICCD])){continue}var ym=icData[i][IDX_ICYM];var icmn=icData[i][IDX_ICNM];var iccd=icData[i][IDX_ICCD];var rtcd=icData[i][IDX_RTCD];var rtnm=icData[i][IDX_RTNM];if(!isDepFixed){if(((icmn.indexOf(vDepIc)>=0)&&(icmn!=vDepIc))||(ym=="まいはら"?((("まいはら".indexOf(vDepIc)>=0)&&("まいはら"!=vDepIc))||(("まいばら".indexOf(vDepIc)>=0)&&("まいばら"!=vDepIc))):ym=="まつばら"?((("まつばら".indexOf(vDepIc)>=0)&&("まつばら"!=vDepIc))||(("まつはら".indexOf(vDepIc)>=0)&&("まつはら"!=vDepIc))):((ym.indexOf(vDepIc)>=0)&&(ym!=vDepIc)))){aimaiCntDep++;aimaiArrDep.push([iccd,icmn,rtcd,rtnm])}if((icmn==vDepIc)||(ym=="まいはら"?("まいはら"==vDepIc||"まいばら"==vDepIc):ym=="まつばら"?("まつばら"==vDepIc||"まつはら"==vDepIc):ym==vDepIc)){hitCntDep++;hitArrDep.push([iccd,icmn,rtcd,rtnm])}}if(!isArrFixed){if(((icmn.indexOf(vArrIc)>=0)&&(icmn!=vArrIc))||(ym=="まいはら"?((("まいはら".indexOf(vArrIc)>=0)&&("まいはら"!=vArrIc))||(("まいばら".indexOf(vArrIc)>=0)&&("まいばら"!=vArrIc))):ym=="まつばら"?((("まつばら".indexOf(vArrIc)>=0)&&("まつばら"!=vArrIc))||(("まつはら".indexOf(vArrIc)>=0)&&("まつはら"!=vArrIc))):((ym.indexOf(vArrIc)>=0)&&(ym!=vArrIc)))){aimaiCntArr++;aimaiArrArr.push([iccd,icmn,rtcd,rtnm])}if((icmn==vArrIc)||(ym=="まいはら"?("まいはら"==vArrIc||"まいばら"==vArrIc):ym=="まつばら"?("まつばら"==vArrIc||"まつはら"==vArrIc):ym==vArrIc)){hitCntArr++;hitArrArr.push([iccd,icmn,rtcd,rtnm])}}}if((!isDepFixed&&!aimaiCntDep&&!hitCntDep)||(!isArrFixed&&!aimaiCntArr&&!hitCntArr)){var buffStr="";if(!isDepFixed&&!aimaiCntDep&&!hitCntDep&&!isArrFixed&&!aimaiCntArr&&!hitCntArr){buffStr="出発ICおよび到着IC"}else{if(!isDepFixed&&!aimaiCntDep&&!hitCntDep){buffStr="出発IC"}else{if(!isArrFixed&&!aimaiCntArr&&!hitCntArr){buffStr="到着IC"}}}alert(buffStr+'が正しくありません。\n\n次の原因に該当すると正しく検索できません。\n・入力ボックスに"IC"を入力している\n・"ヶ"、"之"等を別の文字で入力している\n・ひらがな入力で清音と濁音を誤って入力している\n・誤った漢字、漢字かな混じりで入力している\nご確認の上、再度お試しください。\n');return }if(hitCntDep==1){isDepFixed=true;vDepIcCode=hitArrDep[0][0];vDepIc=hitArrDep[0][1];vDepRosenCode=hitArrDep[0][2];vDepRosen=hitArrDep[0][3];dc_setIC(0,vDepIcCode,vDepIc,vDepRosenCode,vDepRosen,false)}if(hitCntArr==1){isArrFixed=true;vArrIcCode=hitArrArr[0][0];vArrIc=hitArrArr[0][1];vArrRosenCode=hitArrArr[0][2];vArrRosen=hitArrArr[0][3];dc_setIC(1,vArrIcCode,vArrIc,vArrRosenCode,vArrRosen,false)}if(isDepFixed&&isArrFixed&&!isCheckOnly){dc_startSearch();return }dc_sendAimai(isDepFixed,isArrFixed,true)}function dc_startSearch(){var vSIcCode=$(icCodeFormName[0]).value;var vSIc=$(icFormName[0]).value;var vSRosenCode=$(rosenCodeFormName[0]).value;var vSRosen=$(rosenFormName[0]).value;var vEIcCode=$(icCodeFormName[1]).value;var vEIc=$(icFormName[1]).value;var vERosenCode=$(rosenCodeFormName[1]).value;var vERosen=$(rosenFormName[1]).value;var vCrTp=$("optCrTp").value;var vRlyRd="";var vRlyNm="";var vFgRly="";var vYM="";var vY="";var vM="";var vD="";var vH="";var vMin="";var vAppoint="";var vSort="";var vEtc="undefined";var vOn="true";var vFlgAlrdySvd="true";var url="?&s_rd_cd="+vSRosenCode+"&e_rd_cd="+vERosenCode+"&s_ic_cd="+vSIcCode+"&e_ic_cd="+vEIcCode+"&optCrTp="+vCrTp+"&optRlyRd="+vRlyRd+"&optFgRly="+vFgRly+"&optYr="+vY+"&optMnth="+vM+"&optDyOfMnth="+vD+"&optHr="+vH+"&optMnt="+vMin+"&optApnt="+vAppoint+"&optSrt="+vSort+"&optEtc="+vEtc+"&optOn="+vOn+"&flgAlrdySvd="+vFlgAlrdySvd+"&a_aimai=true";location.href=PATH_SUBMIT+url}function dc_sendAimai(isDepFixed,isArrFixed,isAutoStartAimai){var vSIcCode=$(icCodeFormName[0]).value;var vSIc=$(icFormName[0]).value;var vSRosenCode=$(rosenCodeFormName[0]).value;var vSRosen=$(rosenFormName[0]).value;var vEIcCode=$(icCodeFormName[1]).value;var vEIc=$(icFormName[1]).value;var vERosenCode=$(rosenCodeFormName[1]).value;var vERosen=$(rosenFormName[1]).value;var vCrTp=$("optCrTp").value;var url="";url=PATH_DC+"?"+(vSRosenCode?"&s_rd_cd="+vSRosenCode:"")+(vERosenCode?"&e_rd_cd="+vERosenCode:"")+(vSIcCode?"&s_ic_cd="+vSIcCode:"")+(vEIcCode?"&e_ic_cd="+vEIcCode:"")+(vCrTp?"&optCrTp="+vCrTp:"")+(isAutoStartAimai?"&a_aimai=true":"")+(vSIc?isDepFixed?"":"&s_aimai="+dc_encodeURL(vSIc):"")+(vEIc?isArrFixed?"":"&e_aimai="+dc_encodeURL(vEIc):"");location.href=url}function dc_goDC(){dc_sendAimai(false,false,false)}function dc_setIC(fm,vIcCd,vIc,vRosenCd,vRosen,isFocus){if(isFocus!==false){$(icFormName[fm]).focus()}$(icCodeFormName[fm]).value=vIcCd;$(icFormName[fm]).value=vIc;$(rosenCodeFormName[fm]).value=vRosenCd;$(rosenFormName[fm]).value=vRosen}function dc_resetIC(fm){dc_setIC(fm,"","","","",false)}function dc_disconnectIC(fm){$(icCodeFormName[fm]).value="";$(rosenCodeFormName[fm]).value="";$(rosenFormName[fm]).value=""}function dc_swapIC(){var f0=$(icCodeFormName[0]).value;var f1=$(icFormName[0]).value;var f2=$(rosenCodeFormName[0]).value;var f3=$(rosenFormName[0]).value;$(icCodeFormName[0]).value=$(icCodeFormName[1]).value;$(icFormName[0]).value=$(icFormName[1]).value;$(rosenCodeFormName[0]).value=$(rosenCodeFormName[1]).value;$(rosenFormName[0]).value=$(rosenFormName[1]).value;$(icCodeFormName[1]).value=f0;$(icFormName[1]).value=f1;$(rosenCodeFormName[1]).value=f2;$(rosenFormName[1]).value=f3}function dc_sugStandBy(){if($("shim")){return }var shim=document.createElement("iframe");shim.setAttribute("scrolling","no");shim.setAttribute("frameborder","1");shim.name="shim";shim.id="shim";shim.style.width=IC_SUG_WIDTH_INDEX+((isGecko||isOpera||isSafari)?-2:isIE7?2:0)+"px";shim.style.marginTop=(isGecko?4:isIE7?3:4)+"px";$("sug").appendChild(shim);$("sugList").style.width=IC_SUG_WIDTH_INDEX+"px";$("sugList").style.marginTop=(isGecko?4:isIE7?3:4)+"px";flagSuggestStandBy=true}function dc_adjustSugList(cnt){$("sugList").style.height=Math.floor(IC_SUG_HEIGHT_INDEX/20)<cnt?IC_SUG_HEIGHT_INDEX+"px":cnt*20+(isIE6?2:0)+"px";$("shim").style.height=Math.floor(IC_SUG_HEIGHT_INDEX/20)<cnt?IC_SUG_HEIGHT_INDEX+((isGecko||isOpera||isSafari)?-2:isIE7?2:isIE6?2:0)+"px":cnt*20+((isGecko||isOpera||isSafari)?-2:isIE7?2:isIE6?2:0)+"px";var tgtForm=$(icFormName[currentSuggestForm]);var posTop=tgtForm.parentNode.parentNode.parentNode.offsetTop+tgtForm.parentNode.parentNode.offsetTop+tgtForm.parentNode.offsetHeight-(isIE6?6:5);var posLeft=tgtForm.parentNode.parentNode.parentNode.offsetLeft+tgtForm.parentNode.parentNode.offsetLeft+tgtForm.parentNode.offsetLeft;$("shim").style.top=posTop+"px";$("shim").style.left=posLeft+"px";$("sugList").style.top=posTop+"px";$("sugList").style.left=posLeft+"px"}function dc_checkArrowKey0(e){currentSuggestForm=0;dc_checkArrowKey(e)}function dc_checkArrowKey1(e){currentSuggestForm=1;dc_checkArrowKey(e)}function dc_checkInput0(e){currentSuggestForm=0;dc_checkInput(e)}function dc_checkInput1(e){currentSuggestForm=1;dc_checkInput(e)}function dc_fxStartChecking(){if(timerFxSuggest){clearInterval(timerFxSuggest)}fxInputTemp[currentSuggestForm]=$(icFormName[currentSuggestForm]).value;fxInputTempC[currentSuggestForm]=$(icCodeFormName[currentSuggestForm]).value;fxInputTempR[currentSuggestForm]=$(rosenFormName[currentSuggestForm]).value;fxInputTempRC[currentSuggestForm]=$(rosenCodeFormName[currentSuggestForm]).value;timerFxSuggest=setInterval(dc_fxCheckInput,100)}function dc_fxStopChecking(){if(timerFxSuggest){clearInterval(timerFxSuggest)}fxInputTemp[currentSuggestForm]=$(icFormName[currentSuggestForm]).value;fxInputTempC[currentSuggestForm]=$(icCodeFormName[currentSuggestForm]).value;fxInputTempR[currentSuggestForm]=$(rosenFormName[currentSuggestForm]).value;fxInputTempRC[currentSuggestForm]=$(rosenCodeFormName[currentSuggestForm]).value;timerFxSuggest=0}function dc_fxCheckInput(){var v=$(icFormName[currentSuggestForm]).value;var vc=$(icCodeFormName[currentSuggestForm]).value;var vr=$(rosenFormName[currentSuggestForm]).value;var vrc=$(rosenCodeFormName[currentSuggestForm]).value;var isIssho=v==fxInputTemp[currentSuggestForm];var isKakutei=vc&&vr&&vrc&&((vc!=fxInputTempC[currentSuggestForm])||(vr!=fxInputTempR[currentSuggestForm])||(vrc!=fxInputTempRC[currentSuggestForm]));if(isIssho){return }fxInputTemp[currentSuggestForm]=v;fxInputTempC[currentSuggestForm]=vc;fxInputTempR[currentSuggestForm]=vr;fxInputTempRC[currentSuggestForm]=vrc;if(isKakutei){return }dc_disconnectIC(currentSuggestForm);if(timerSuggestDelay){clearTimeout(timerSuggestDelay)}timerSuggestDelay=setTimeout(dc_suggest,500)}function dc_checkArrowKey(e){if(!flagIcDataLoaded){return }var e=e||window.event;var c=e.keyCode;suggestKeyDown=c;var v=$(icFormName[currentSuggestForm]).value;if(c==38){dc_sugListUp();return }if(c==40){dc_sugListDown();return }}function dc_checkInput(e){if(!flagIcDataLoaded){return }if(timerSuggestDelay){clearTimeout(timerSuggestDelay)}var e=e||window.event;var c=e.keyCode;var v=$(icFormName[currentSuggestForm]).value;if((isIE7&&suggestKeyDown==229)||((isIE6||isSafari)&&currentSuggestTotal&&!flagSuggestListEntered&&(c==38||c==40))){if(c==38){flagSuggestKeepFocus=true;$(icFormName[currentSuggestForm]).blur();$(icFormName[currentSuggestForm]).focus();dc_sugListUp();return }if(c==40){flagSuggestKeepFocus=true;$(icFormName[currentSuggestForm]).blur();$(icFormName[currentSuggestForm]).focus();dc_sugListDown();return }}if(!v){dc_clearSugList();return }if(c==9||c==16||c==17||c==18){return }if(currentSuggestTotal&&(c==38||c==40)){return }if(!currentSuggestTotal&&(c==38||c==40)){dc_suggest();return }if((flagSuggestListEntered&&c==13)||c==27){dc_clearSugList();return }if(currentSuggestSelected){dc_clearSugSelection()}if(c==37||c==39){return }if(!flagSuggestListEntered&&c==13&&$(rosenCodeFormName[0]).value&&$(rosenFormName[0]).value&&$(rosenCodeFormName[1]).value&&$(rosenFormName[1]).value){dc_clearSugList();dc_checkAimai();return }dc_disconnectIC(currentSuggestForm);timerSuggestDelay=setTimeout(dc_suggest,500)}function dc_suggest(){if(!dc_checkIcData()){return }timerSuggestDelay=0;if(dc_checkFixed(currentSuggestForm)){return }var v=$(icFormName[currentSuggestForm]).value;if(!v||v.match(/^[\s|　]+$/)||v.match(/[ａ-ｚＡ-Ｚ０-９0-9_;:@=\\\.\,\|\(\)\[\]\{\}\<\>\*\/\+\-\^\~\$]/)){return }var cnt=0;var arr=[];var re=new RegExp("^"+v,"i");var bure="まいはら".match(re)||"まいばら".match(re)||"まつばら".match(re)||"まつはら".match(re);var buff="";$("sugKey").innerHTML=v;if(!bure){for(var i=0;i<IC_DATA_LENGTH;i++){if(getClosed(icData[i][IDX_RTCD],icData[i][IDX_ICCD])){continue}if(icData[i][IDX_ICYM].match(re)||icData[i][IDX_ICNM].indexOf(v)>=0){cnt++;arr.push([icData[i][IDX_ICYM],icData[i][IDX_ICCD],icData[i][IDX_ICNM],icData[i][IDX_RTCD],icData[i][IDX_RTNM]])}}}else{for(var i=0;i<IC_DATA_LENGTH;i++){if(getClosed(icData[i][IDX_RTCD],icData[i][IDX_ICCD])){continue}var ym=icData[i][IDX_ICYM];if(ym=="まいはら"){if("まいはら".match(re)||"まいばら".match(re)){cnt++;arr.push([icData[i][IDX_ICYM],icData[i][IDX_ICCD],icData[i][IDX_ICNM],icData[i][IDX_RTCD],icData[i][IDX_RTNM]])}continue}if(ym=="まつばら"){if("まつばら".match(re)||"まつはら".match(re)){cnt++;arr.push([icData[i][IDX_ICYM],icData[i][IDX_ICCD],icData[i][IDX_ICNM],icData[i][IDX_RTCD],icData[i][IDX_RTNM]])}continue}if(icData[i][IDX_ICYM].match(re)||icData[i][IDX_ICNM].indexOf(v)>=0){cnt++;arr.push([icData[i][IDX_ICYM],icData[i][IDX_ICCD],icData[i][IDX_ICNM],icData[i][IDX_RTCD],icData[i][IDX_RTNM]])}}}if(cnt){arr.sort();for(var i=0,len=arr.length;i<len;i++){buff+='<div id="sl'+(i+1)+'" class="sl" onmouseover="dc_sugListOnMouse(this);" onmousedown="dc_sugListOnMouseDown(this);" onmouseup="dc_sugListOnMouseUp(this);" onclick="dc_setSugKeyword(this);">';buff+='<p id="sl'+(i+1)+"_"+IDX_ICCD+'" class="sl_code tBtm">'+arr[i][1]+"</p>";buff+='<p id="sl'+(i+1)+"_"+IDX_ICNM+'" class="sl_name tBtm">'+arr[i][2]+"</p>";buff+='<p id="sl'+(i+1)+"_"+IDX_RTCD+'" class="sl_rosenCode tBtm">'+arr[i][3]+"</p>";buff+='<p id="sl'+(i+1)+"_"+IDX_RTNM+'" class="sl_rosenName t10 tBtm">'+arr[i][4]+"</p>";buff+="</div>"}arr=[];currentSuggestTotal=cnt;currentSuggestSelected=0;$("sugList").innerHTML=buff;if(!flagSuggestStandBy){dc_sugStandBy()}dc_adjustSugList(cnt);dc_showSugList();dc_resetSugScroll()}else{if(currentSuggestTotal){dc_clearSugList()}}}function dc_sugScroll(){var sc=$("sugList").scrollTop;if((currentSuggestSelected-1)*20+20-sc>=Number($("sugList").style.height.split("px")[0])){$("sugList").scrollTop=(currentSuggestSelected-1)*20-$("sugList").style.height.split("px")[0]+20}else{if((currentSuggestSelected-1)*20-sc<0){$("sugList").scrollTop=(currentSuggestSelected-1)*20}}}function dc_resetSugScroll(){$("sugList").scrollTop=0}function dc_sugListUp(){if(!currentSuggestSelected){dc_sugListEnter();return }var prevId="sl"+currentSuggestSelected;$(prevId).className="sl";if(--currentSuggestSelected<=0){currentSuggestSelected=currentSuggestTotal}var thisId="sl"+currentSuggestSelected;$(thisId).className="slSelected";dc_sugScroll();dc_setIC(currentSuggestForm,$(thisId+"_"+IDX_ICCD).firstChild.nodeValue,$(thisId+"_"+IDX_ICNM).firstChild.nodeValue,$(thisId+"_"+IDX_RTCD).firstChild.nodeValue,$(thisId+"_"+IDX_RTNM).firstChild.nodeValue)}function dc_sugListDown(){if(!currentSuggestSelected){dc_sugListEnter();return }var prevId="sl"+currentSuggestSelected;$(prevId).className="sl";if(++currentSuggestSelected>currentSuggestTotal){currentSuggestSelected=1}var thisId="sl"+currentSuggestSelected;$(thisId).className="slSelected";dc_sugScroll();dc_setIC(currentSuggestForm,$(thisId+"_"+IDX_ICCD).firstChild.nodeValue,$(thisId+"_"+IDX_ICNM).firstChild.nodeValue,$(thisId+"_"+IDX_RTCD).firstChild.nodeValue,$(thisId+"_"+IDX_RTNM).firstChild.nodeValue)}function dc_sugListEnter(){if(!currentSuggestTotal){return }$("sl1").className="slSelected";currentSuggestSelected=1;dc_sugScroll();dc_setIC(currentSuggestForm,$("sl1_"+IDX_ICCD).firstChild.nodeValue,$("sl1_"+IDX_ICNM).firstChild.nodeValue,$("sl1_"+IDX_RTCD).firstChild.nodeValue,$("sl1_"+IDX_RTNM).firstChild.nodeValue);flagSuggestListEntered=true}function dc_clearSugSelection(){$("sl"+currentSuggestSelected).className="sl";currentSuggestSelected=0;flagSuggestListEntered=false}function dc_clearSugList(){dc_hideSugList();if(currentSuggestSelected){dc_clearSugSelection()}$("sugList").innerHTML="";currentSuggestTotal=0;if(timerSuggestDelay){clearTimeout(timerSuggestDelay)}timerSuggestDelay=0}function dc_sugListOnMouse(t){if(currentSuggestSelected){dc_clearSugSelection()}var tgt=t.id.split("sl")[1];currentSuggestSelected=tgt;$("sl"+(currentSuggestSelected)).className="slSelected";flagSuggestListEntered=true;if(isGecko){dc_fxStopChecking()}}function dc_sugListOnMouseDown(t){flagSuggestKeepFocus=true}function dc_sugListOnMouseUp(t){flagSuggestKeepFocus=false}function dc_setSugKeyword(t){var thisId=t.id;dc_setIC(currentSuggestForm,$(thisId+"_"+IDX_ICCD).firstChild.nodeValue,$(thisId+"_"+IDX_ICNM).firstChild.nodeValue,$(thisId+"_"+IDX_RTCD).firstChild.nodeValue,$(thisId+"_"+IDX_RTNM).firstChild.nodeValue);dc_clearSugList()}function dc_sugListOnFocus(fm){if(currentFocusedForm!=fm){dc_clearSugList()}currentFocusedForm=fm;currentSuggestForm=fm;flagSuggestKeepFocus=false;if(isGecko||isOpera){dc_fxStartChecking()}}function dc_sugListOnBlur(fm){if(isGecko||isOpera){dc_fxStopChecking();timerSuggestBlur=setTimeout(dc_sugListOnBlurGo,500)}else{dc_sugListOnBlurGo()}}function dc_sugListOnBlurGo(){if(!flagSuggestKeepFocus){dc_clearSugList()}flagSuggestKeepFocus=false};