/**
* 拡大用画像の設定値
*
*/
// 画像拡大時の背景色
var zoomBackColor = '#000000';

// 画像拡大時の背景の透明度(0~100。100で不透明)
var zoomBackAlpha = 75;

// 画像の枠の色
var frameColor = '#ffffff';

// 画像の枠のサイズ
var frameSize = 20;

// 画像の枠の水平位置(0で中央、マイナス値で左、プラス値で右に移動)
var imgHorizontal = 0;

// 画像の枠の垂直位置(0で中央、マイナス値で上、プラス値で下に移動)
var imgVertical = -50;


function MM_swapImgRestore(){var e,t,o=document.MM_sr;for(e=0;o&&e<o.length&&(t=o[e])&&t.oSrc;e++)t.src=t.oSrc}function MM_preloadImages(){var e=document;if(e.images){e.MM_p||(e.MM_p=new Array);var t,o=e.MM_p.length,i=MM_preloadImages.arguments;for(t=0;t<i.length;t++)0!=i[t].indexOf("#")&&(e.MM_p[o]=new Image,e.MM_p[o++].src=i[t])}}function MM_findObj(e,t){var o,i,n;for(t||(t=document),(o=e.indexOf("?"))>0&&parent.frames.length&&(t=parent.frames[e.substring(o+1)].document,e=e.substring(0,o)),!(n=t[e])&&t.all&&(n=t.all[e]),i=0;!n&&i<t.forms.length;i++)n=t.forms[i][e];for(i=0;!n&&t.layers&&i<t.layers.length;i++)n=MM_findObj(e,t.layers[i].document);return!n&&document.getElementById&&(n=document.getElementById(e)),n}function MM_swapImage(){var e,t,o=0,i=MM_swapImage.arguments;for(document.MM_sr=new Array,e=0;e<i.length-2;e+=3)null!=(t=MM_findObj(i[e]))&&(document.MM_sr[o++]=t,t.oSrc||(t.oSrc=t.src),t.src=i[e+2])}function inquiry(e){if(!(0>=e)){var t=document.form2;t.room_id.value=e,t.submit()}}function countCheck(){var e=document.form1,t=e.elements["room_id[]"];if(t.length){for(var o=0;o<t.length;o++)if(t[o].checked)return!0}else if(t.checked)return!0;return alert("対象となる物件を選択してください"),!1}function zoom(e,t,o,i){var n=o+10,r=i+100,l=!1;if(n>screen.availWidth&&(n=screen.availWidth,l=!0),r>screen.availHeight&&(r=screen.availHeight,l=!0),l)var a=window.open("","m_"+e,"toolbar=no,scrollbars=yes,status=yes,menubar=no,resizable=yes,width="+n+",height="+r);else var a=window.open("","m_"+e,"toolbar=no,scrollbars=no,status=yes,menubar=no,resizable=no,width="+n+",height="+r);a.resizeTo(n,r),a.document.open(),a.document.writeln("<html>"),a.document.writeln("<head>"),a.document.writeln("<title>間取り図</title>"),a.document.writeln("</head>"),a.document.writeln('<body style="margin-top: 0px;margin-left:0;">'),a.document.writeln('<img src="'+t+'">'),a.document.writeln('<p><center><input type="button" value="閉じる" onclick="window.close()"></center>'),a.document.writeln("</body>"),a.document.writeln("</html>"),a.document.close(),a.focus()}function setcookie(e,t){var o=2592e6;today=new Date;var i=Date.parse(today.toUTCString())+o;limitdate=new Date(i),document.cookie=e+"="+escape(t)+"; expires="+limitdate.toGMTString()+"; path=/"}function getcookie(e){for(var t=document.cookie.split("; "),o=0;o<t.length;o++){var i=t[o].split("=");if(e==i[0])return i.length>1?unescape(i[1]):""}return""}function getfavoritenum(){var e=getcookie("room_id"),t=e.split("/");t.shift(),t.pop();var o=0;for(var i in t)t.hasOwnProperty(i)&&o++;return o}function delfavorite(e){var t=getcookie("room_id");if(""!=t){for(var o=t.split("/"),i=getcookie("room_url"),n=i.split("/"),r=new Array,l=new Array,a=0,m=1;m<o.length-1;m++)o[m]!=e&&(r[a]=o[m],l[a]=n[m],a++);r.length>0?(setcookie("room_id","/"+r.join("/")+"/"),setcookie("room_url","/"+l.join("/")+"/")):(setcookie("room_id",""),setcookie("room_url","")),alert("お気に入りから削除しました"),location.reload()}}function initialize(){var e={},t={},o=location.href.split("/");o.pop(),o.pop(),url=o.join("/")+"/";for(i in img_obj)e[url+img_obj[i].src1]=url+img_obj[i].src2,t[url+img_obj[i].src1]=i;for(im=document.images,i=0;i<im.length;i++)im[i].src in e&&(im[i].style.cursor="pointer",im[i].onclick=function(){this.src in e&&ShowImage(t[this.src])})}function ShowImage(t){num=parseInt(t),num<0&&(num=img_obj.length-1),num>=img_obj.length&&(num=0);var o=img_obj[num];e=document.createElement("div"),e.id="img_background",e.style.backgroundColor=zoomBackColor,e.style.position="absolute",e.style.left="0px",e.style.top="0px",isMSIE?e.style.filter="alpha(opacity="+zoomBackAlpha+")":e.style.opacity=zoomBackAlpha/100,e.onclick=function(){CloseImage()},bg.img_background=e;var n=0,r=0;for(i in img_obj)n=Math.max(n,img_obj[i].src2_width),r=Math.max(r,img_obj[i].src2_height);n+=2*frameSize,r+=2*frameSize;var l="/"+o.src2+"?"+Math.random(),a=parseInt(getBrowserWidth()+(document.body.scrollLeft||de.scrollLeft)-n)/2+imgHorizontal,m=parseInt((document.body.scrollTop||de.scrollTop)+100)+imgVertical;e=document.createElement("div"),e.id="img_frame",e.style.position="absolute",e.style.left=a+"px",e.style.top=m+"px";var c=(r-o.src2_height)/2;e.innerHTML=isMSIE?'<div style="width:'+n+"px; height:"+r+"px; padding:"+frameSize+"px;background-color:"+frameColor+"; text-align:center; padding-top:"+c+';"><img src="'+l+'"></div><table style="width:'+n+"px; padding: 0px "+frameSize+"px 5px "+frameSize+"px; background-color:"+frameColor+';"><tr><td><img src="/img/zoom_back.gif" onclick="CloseImage();ShowImage('+(num-1)+');" style="cursor:pointer;"></td><td width="100%" align="center" style="font-size:14px;font-weight:bold;">'+(num+1)+"/"+img_obj.length+'</td><td><img src="/img/zoom_next.gif" onclick="CloseImage();ShowImage('+(num+1)+');" style="cursor:pointer;"></td></tr></table>':'<div style="width:'+n+"px; height:"+r+"px; background-color:"+frameColor+'; text-align:center;"><img src="'+l+'" style="padding-top:'+c+';"></div><table style="width:'+n+"px; padding: 0px "+frameSize+"px 5px "+frameSize+"px; background-color:"+frameColor+';"><tr><td><img src="/img/zoom_back.gif" onclick="CloseImage();ShowImage('+(num-1)+');" style="cursor:pointer;"></td><td width="100%" align="center" style="font-size:14px;font-weight:bold;">'+(num+1)+"/"+img_obj.length+'</td><td><img src="/img/zoom_next.gif" onclick="CloseImage();ShowImage('+(num+1)+');" style="cursor:pointer;"></td></tr></table>',bg.img_frame=e,e=document.createElement("img"),e.id="img_close",e.style.position="absolute",e.style.left=parseInt(a+n-20)+"px",e.style.top=parseInt(m)+"px",e.style.cursor="pointer",e.src="/img/zoom_close.gif",e.onclick=function(){CloseImage()},bg.img_close=e;var d=document.getElementsByTagName("body").item(0);for(i in bg)d.appendChild(bg[i]);bg.img_background.style.height=getPageHeight(),bg.img_background.style.width=isMSIE?getBrowserWidth():"100%"}function CloseImage(){var e=document.getElementsByTagName("body").item(0);e.removeChild(document.getElementById("img_background")),e.removeChild(document.getElementById("img_frame")),e.removeChild(document.getElementById("img_close"))}function getBrowserWidth(){return window.innerWidth?window.innerWidth:de&&0!=de.clientWidth?de.clientWidth:document.body?document.body.clientWidth:0}function getPageHeight(){var e;return e=window.innerHeight&&window.scrollMaxY?window.innerHeight+window.scrollMaxY:document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight,Math.max(self.innerHeight?self.innerHeight:de&&de.clientHeight?de.clientHeight:document.body?document.body.clientHeight:0,e)}var isMSIE=!1,de=document.documentElement,bg={};
function setfavorite(e,t){document.cookie="room_id=; expires="+(new Date).toGMTString(),document.cookie="room_url=; expires="+(new Date).toGMTString();var o=getcookie("room_id"),i="/"+e+"/";if(""!=o&&o.indexOf(i)>=0)return void alert("既に登録されています");""==o&&(o="/"),o+=e+"/",setcookie("room_id",o);var n=getcookie("room_url");""==n&&(n="/");var r=/\+/g;n+=t.replace(r,"#")+"/",setcookie("room_url",n);document.getElementById("favorite_icon").src = '/img/shosai_icon1_bk.png';var l=getfavoritenum();$(".fa_num").text(l),alert("お気に入りに登録しました"),anaWriteFavoriteLog(e)}