var minWidth = 865; //min-width var minWidthLst = 608; //一覧コンテンツmin-width ■20070830追加 var d=document; var FreeWordComment = "住所、駅、施設名、郵便番号"; //■20070927変更 var BlogWordComment = "ラーメン、デートなど"; /*------------------------------------------------------------------ classchange ------------------------------------------------------------------*/ function ClassCh(eid,cName){ d.getElementById(eid).className=cName; } /*------------------------------------------------------------------ toggleclass ------------------------------------------------------------------*/ function ToggleClass(eid){ if (d.getElementById(eid).className=='') { d.getElementById(eid).className='on'+eid; } else { d.getElementById(eid).className=''; } } /*------------------------------------------------------------------ onload ------------------------------------------------------------------*/ function OnLoadNm() { if (d.body.className=='nm_l') { minWidth = 960; } else if (d.body.className=='nm_x') { minWidth = 1210; } else if (d.body.className=='ken') { minWidth = 769; }; MinWidth(); freewordOnload(); } function OnLoadLst() { MinWidthLst(); freewordOnload(); } /*------------------------------------------------------------------ minwidth ------------------------------------------------------------------*/ function MinWidth(){ if(typeof d.body.style.maxHeight == "undefined"){ if(d.documentElement.clientWidth >= minWidth) { d.body.style.width = "auto"; } else { d.body.style.width = minWidth +"px"; }; }; } function MinWidthLst(){ if(typeof d.body.style.maxHeight == "undefined"){ if(d.documentElement.clientWidth >= minWidth) { d.body.firstChild.style.width = "auto"; d.body.lastChild.style.width = "auto"; } else { d.body.firstChild.style.width = minWidth +"px"; d.body.lastChild.style.width = minWidth +"px"; }; if(d.documentElement.clientWidth >= minWidthLst) { d.getElementById("wrap_lst").style.width = "auto"; } else { d.getElementById("wrap_lst").style.width = minWidthLst +"px"; }; }; } /*------------------------------------------------------------------ freeword ------------------------------------------------------------------*/ function freewordOnload() { var mye = d.getElementById("freewd"); mye.blur(); freewordBlur("freewd",FreeWordComment); } function freewordBlur(eid,comment) { var mye = d.getElementById(eid); if (mye.value=="") { mye.style.color="#acacac"; mye.value=comment; } else if (mye.value != comment) { mye.style.color="#000"; //リロードした時に文字色が灰色になるのを防止 } else {mye.style.color="#acacac";} } function freewordFocus(eid,comment) { var mye = d.getElementById(eid); if (mye.value==comment) { mye.style.color='#000' mye.value=''; } }