var ordersubmitChk = false; function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 0) { setcookie("okiniiri_room_id", "/" + newIdArray.join("/") + "/"); setcookie("okiniiri_room_url", "/" + newUrlArray.join("/") + "/"); } else { setcookie("okiniiri_room_id", ""); setcookie("okiniiri_room_url", ""); } alert("お気に入りから削除しました"); location.reload(); } function setcookie(sName, sValue) { var days30 = 60 * 60 * 24 * 30 * 1000; today = new Date(); var ts = Date.parse(today.toUTCString()) + days30; limitdate = new Date(ts); document.cookie = sName + "=" + escape(sValue) + "; expires=" + limitdate.toGMTString() + "; path=/"; } function getcookie(sName) { var aCookie = document.cookie.split("; "); for (var i=0; i 1) { return unescape(aCrumb[1]); } return ""; } } return ""; } var curSortOrder = 17; function saveselstatus(f) { var f1 = document.form1; var f4 = document.form4; var pno = f4.pageno.value - 1; var carray = f1.elements["room_id[]"]; if (!carray) { return; } var sarray = f.elements["sel_status[]"]; if (sarray.length) { var sarray2 = sarray[pno]; } else { var sarray2 = sarray; } sarray2.value = ""; if (carray.length) { for (var i=0; i 0) { sarray2.value = sarray2.value.substr(0, slen - 1); } } function list_p() { var f = document.form4; saveselstatus(f); f.pict.value = 1; f.submit(); } function itemCheck() { var f = document.form3; if (f.yachin_low.value >= 0 && f.yachin_hi.value >= 0) { if ((new Number(f.yachin_low.value)).valueOf() >= (new Number(f.yachin_hi.value)).valueOf()) { alert("価格の上限と下限の関係を正しく選択してください"); f.yachin_low.focus(); return false; } } if (f.menseki_low.value >= 0 && f.menseki_hi.value >= 0) { if ((new Number(f.menseki_low.value)).valueOf() >= (new Number(f.menseki_hi.value)).valueOf()) { alert("専有面積の上限と下限の関係を正しく選択してください"); f.menseki_low.focus(); return false; } } return true; } function setdir(f) { var so = f.sort_order; for (var i=0; i 0){ setstations(parseInt(id)+4); } */ } function checkCity(city_id){ if(city_id == 0){ if(document.getElementById("city_" + city_id).checked == true){ var all_city = document.getElementById("all_city").value; var city = all_city.split(","); for(i = 0; i < city.length; i++){ if(city[i] != "" && city[i] != 0){ document.getElementById("city_" + city[i]).checked = true; } } }else{ var all_city = document.getElementById("all_city").value; var city = all_city.split(","); for(i = 0; i < city.length; i++){ if(city[i] != "" && city[i] != 0){ document.getElementById("city_" + city[i]).checked = false; } } } } } function checkLine(line_id,station_id){ if(station_id == 0){ if(document.getElementById("station_id_" + line_id + "_" + station_id).checked == true){ var all_station = document.getElementById("all_station_" + line_id).value; var station = all_station.split(","); for(i = 0; i < station.length; i++){ if(station[i] != "" && station[i] != 0){ document.getElementById("station_id_" + line_id + "_" + station[i]).checked = true; } } }else{ var all_station = document.getElementById("all_station_" + line_id).value; var station = all_station.split(","); for(i = 0; i < station.length; i++){ if(station[i] != "" && station[i] != 0){ document.getElementById("station_id_" + line_id + "_" + station[i]).checked = false; } } } } if(document.getElementById("station_id_" + line_id + "_" + station_id).checked == true){ document.getElementById("line_" + line_id).checked = true; }else{ document.getElementById("line_" + line_id).checked = false; } } function shuruisubmit(shurui_ids) { var f = document.getElementById('form2'); var shurui_id_ary = String(shurui_ids).split(','); var checkbox_ary = []; if (f===null) { var f = document.form2; } for (i =0; i < f.elements["shurui_id[]"].length;i++) { checkbox_ary.push(f.elements["shurui_id[]"][i].value); if (shurui_id_ary.indexOf(f.elements["shurui_id[]"][i].value) != -1) { f.elements["shurui_id[]"][i].checked = true; } else { f.elements["shurui_id[]"][i].checked = false; } } for (i in shurui_id_ary) { if (checkbox_ary.indexOf(shurui_id_ary[i]) == -1) { var input = document.createElement('input'); input.type = 'hidden'; input.name = 'shurui_id[]'; input.value = shurui_id_ary[i]; f.appendChild(input); } } f.submit(); } function ordersubmit(sort_order) { var f = document.form4; if (f.sort_order.value == sort_order) { var n = (new Number(f.dir.value)).valueOf(); f.dir.value = n ^ 1; } f.sort_order.value = sort_order; ordersubmitChk = true; jumppage(1); } function setShiryou(v,u) { // 旧データの削除 var rid = getcookie("shiryou_room_id"); document.cookie = "room_id=; expires=" + new Date().toGMTString(); var idstr = "/" + v + "/"; if (rid != "" && rid.indexOf(idstr) >= 0) { var idArray = rid.split("/"); var ustr = getcookie("shiryou_room_url"); var urlArray = ustr.split("/"); var newIdArray = new Array(); var newUrlArray = new Array(); var npos = 0; var delpos = -1; for (var i=1; i 0) { setcookie("shiryou_room_id", "/" + newIdArray.join("/") + "/"); setcookie("shiryou_room_url", "/" + newUrlArray.join("/") + "/"); } else { setcookie("shiryou_room_id", ""); setcookie("shiryou_room_url", ""); } if(document.getElementById("shiryou_" + v) != null){ document.getElementById("shiryou_" + v).src = "/img/kago.jpg"; } alert("資料請求から削除しました"); return; } if (rid == "") { rid = "/"; } rid += v + "/"; setcookie("shiryou_room_id", rid); var ustr = getcookie("shiryou_room_url"); document.cookie = "room_url=; expires=" + new Date().toGMTString(); if (ustr == "") { ustr = "/"; } var re = /\+/g; ustr += u.replace(re, "#") + "/"; setcookie("shiryou_room_url", ustr); if(document.getElementById("shiryou_" + v) != null){ document.getElementById("shiryou_" + v).src = "/img/kago2.jpg"; } var fimg = document.createElement("IMG"); fimg.src = "php_common/favorite.php?room_id=" + v; alert("資料請求に登録しました"); } function setfavorite(v,u) { // 旧データの削除 var rid = getcookie("okiniiri_room_id"); document.cookie = "room_id=; expires=" + new Date().toGMTString(); var idstr = "/" + v + "/"; if (rid != "" && rid.indexOf(idstr) >= 0) { alert("既に登録されています"); return; } if (rid == "") { rid = "/"; } rid += v + "/"; setcookie("okiniiri_room_id", rid); var ustr = getcookie("okiniiri_room_url"); document.cookie = "room_url=; expires=" + new Date().toGMTString(); if (ustr == "") { ustr = "/"; } var re = /\+/g; ustr += u.replace(re, "#") + "/"; setcookie("okiniiri_room_url", ustr); var fimg = document.createElement("IMG"); fimg.src = "php_common/favorite.php?room_id=" + v; alert("お気に入りに登録しました"); } function delfavorite(v) { var rid = getcookie("okiniiri_room_id"); if (rid == "") { return; } var idArray = rid.split("/"); var ustr = getcookie("okiniiri_room_url"); var urlArray = ustr.split("/"); var newIdArray = new Array(); var newUrlArray = new Array(); var npos = 0; var delpos = -1; for (var i=1; i 0) { setcookie("okiniiri_room_id", "/" + newIdArray.join("/") + "/"); setcookie("okiniiri_room_url", "/" + newUrlArray.join("/") + "/"); } else { setcookie("okiniiri_room_id", ""); setcookie("okiniiri_room_url", ""); } alert("お気に入りから削除しました"); location.reload(); } function checkList(){ if("OFF" == "ON"){ if(getcookie("login") != ""){ cookie = getcookie('okiniiri_room_id'); data = cookie.split("/"); room_id = ""; for(i = 0; i < data.length; i++){ if(data[i] != ""){ if(document.getElementById("okiniiri_" + data[i]) != null){ document.getElementById("okiniiri_" + data[i]).src = "/img/favo2.jpg"; } } } } }else{ cookie = getcookie('okiniiri_room_id'); data = cookie.split("/"); room_id = ""; for(i = 0; i < data.length; i++){ if(data[i] != ""){ if(document.getElementById("okiniiri_" + data[i]) != null){ document.getElementById("okiniiri_" + data[i]).src = "/img/favo2.jpg"; } } } } cookie2 = getcookie('shiryou_room_id'); data = cookie2.split("/"); room_id = ""; for(i = 0; i < data.length; i++){ if(data[i] != ""){ if(document.getElementById("shiryou_" + data[i]) != null){ document.getElementById("shiryou_" + data[i]).src = "/img/kago2.jpg"; } } } } function delshiryou(v) { var rid = getcookie("shiryou_room_id"); if (rid == "") { return; } var idArray = rid.split("/"); var ustr = getcookie("shiryou_room_url"); var urlArray = ustr.split("/"); var newIdArray = new Array(); var newUrlArray = new Array(); var npos = 0; var delpos = -1; for (var i=1; i 0) { setcookie("shiryou_room_id", "/" + newIdArray.join("/") + "/"); setcookie("shiryou_room_url", "/" + newUrlArray.join("/") + "/"); } else { setcookie("shiryou_room_id", ""); setcookie("shiryou_room_url", ""); } alert("資料請求から削除しました"); location.reload(); }