if(typeof Chintai=="undefined"){
Chintai={};
}
if(typeof Chintai.Renew=="undefined"){
Chintai.Renew={};
}
if(typeof Chintai.Renew.Search=="undefined"){
Chintai.Renew.Search={};
}
if(typeof Chintai.Renew.Search.Detail=="undefined"){
Chintai.Renew.Search.Detail={};
}
Chintai.Renew.Search.Input={_clearCond:function(e){
if(e.name=="cf"){
e.selectedIndex=0;
}else{
if(e.name=="ct"){
e.selectedIndex=e.options.length-1;
}else{
if(e.name=="k"){
e.checked=true;
}else{
if(e.name=="c"){
e.checked=false;
}else{
if(e.name=="r"){
e.checked=false;
}else{
if(e.name=="s"){
e.checked=false;
}else{
if(e.name=="m"&&e.value==""){
e.checked=true;
}else{
if(e.name=="m"&&e.value!=""){
e.checked=false;
}else{
if(e.name=="b"&&e.value!="4"){
e.checked=true;
}else{
if(e.name=="b"&&e.value=="4"){
e.checked=false;
}else{
if(e.name=="sf"){
e.selectedIndex=0;
}else{
if(e.name=="st"){
e.selectedIndex=e.options.length-1;
}else{
if(e.name=="h"&&e.value==""){
e.checked=true;
}else{
if(e.name=="j"&&e.value==""){
e.checked=true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if(e.name=="cf"){
e.selectedIndex=0;
}else{
if(e.name=="ct"){
e.selectedIndex=e.options.length-1;
}else{
if(e.name=="k"){
e.checked=false;
}else{
if(e.name=="c"){
e.checked=false;
}else{
if(e.name=="r"){
e.checked=false;
}else{
if(e.name=="s"){
e.checked=false;
}else{
if(e.name=="m"&&e.value==""){
e.checked=true;
}else{
if(e.name=="m"&&e.value!=""){
e.checked=false;
}else{
if(e.name=="b"&&e.value!="4"){
e.checked=false;
}else{
if(e.name=="b"&&e.value=="4"){
e.checked=false;
}else{
if(e.name=="sf"){
e.selectedIndex=0;
}else{
if(e.name=="st"){
e.selectedIndex=e.options.length-1;
}else{
if(e.name=="h"&&e.value==""){
e.checked=true;
}else{
if(e.name=="j"&&e.value==""){
e.checked=true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if(e.name=="t"){
e.checked=false;
}else{
if(e.name=="n"&&e.value!="2"){
e.checked=false;
}else{
if(e.name=="d"){
e.selectedIndex=2;
}else{
if(e.name=="l"){
e.checked=false;
}else{
if(e.name=="n"&&e.value=="2"){
e.checked=false;
}
}
}
}
}
},clearCond:function(_2){
$j(_2).each(function(){
Chintai.Renew.Search.Input._clearCond(this);
});
},C_MAX_EKI:Chintai.Constant.C_RENEW_MAX_EKI,checkEkiCnt:function(id,_4){
var f=$(id);
var es=Form.getElements(f);
var _7=0;
es.each(function(e){
if(e.name=="e"&&(e.checked||e.type.toLowerCase()=="hidden")){
_7++;
}else{
if(e.name=="f"&&(e.checked||e.type.toLowerCase()=="hidden")){
_7++;
}
}
});
if(_7>this.C_MAX_EKI){
alert("\u99c5\u30fb\u6cbf\u7dda\u306e\u9078\u629e\u306f"+this.C_MAX_EKI+"\u4ee5\u5185\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002");
return false;
}else{
if(!_4&&_7==0){
alert("\u6cbf\u7dda\u30fb\u99c5\u306e\u3069\u3061\u3089\u304b\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002");
return false;
}
}
return true;
},C_MAX_CITY:Chintai.Constant.C_RENEW_MAX_CITY,checkCityCnt:function(id,_a){
var f=$(id);
var es=Form.getElements(f);
var _d=0;
es.each(function(e){
if(e.name=="g"&&(e.checked||e.type.toLowerCase()=="hidden")){
_d++;
}
});
if(_d>this.C_MAX_CITY){
alert("\u5e02\u533a\u753a\u6751\u306e\u9078\u629e\u306f"+this.C_MAX_CITY+"\u4ee5\u5185\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002");
return false;
}else{
if(!_a&&_d==0){
alert("\u5e02\u533a\u753a\u6751\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002");
return false;
}
}
return true;
},C_MAX_ENSEN:Chintai.Constant.C_RENEW_MAX_ENSEN,checkEnsenCnt:function(id,_10){
var f=$(id);
var es=Form.getElements(f);
var cnt=0;
es.each(function(e){
if(e.name=="e"&&(e.checked||e.type.toLowerCase()=="hidden")){
cnt++;
}
});
if(cnt>this.C_MAX_ENSEN){
alert("\u6cbf\u7dda\u306e\u9078\u629e\u306f"+this.C_MAX_ENSEN+"\u4ee5\u5185\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002");
return false;
}else{
if(!_10&&cnt==0){
alert("\u6cbf\u7dda\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002");
return false;
}
}
return true;
},bindEkiCheck:function(id){
$j("#"+id+" [name='e']").bind("click",function(){
if(this.checked&&!Chintai.Renew.Search.Input.checkEkiCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
}).bind("change",function(){
if(this.checked&&!Chintai.Renew.Search.Input.checkEkiCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
});
$j("#"+id+" [name='f']").bind("click",function(){
if(this.checked&&!Chintai.Renew.Search.Input.checkEkiCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
}).bind("change",function(){
if(this.checked&&!Chintai.Renew.Search.Input.checkEkiCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
});
},bindCityCheck:function(id){
$j("#"+id+" [name='g']").bind("click",function(){
if(!Chintai.Renew.Search.Input.checkCityCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
}).bind("change",function(){
if(!Chintai.Renew.Search.Input.checkCityCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
});
},bindEnsenCheck:function(id){
$j("#"+id+" [name='e']").bind("click",function(){
if(!Chintai.Renew.Search.Input.checkEnsenCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
}).bind("change",function(){
if(!Chintai.Renew.Search.Input.checkEnsenCnt(id,true)){
$j(this).attr("checked",false);
return false;
}
return true;
});
},checkFromTo:function(id,_19,_1a,_1b){
var es=Form.getElements(id);
var cf=0;
var ct=0;
es.each(function(e){
if(e.name==_19){
cf=e.options[e.selectedIndex].value;
}else{
if(e.name==_1a){
ct=e.options[e.selectedIndex].value;
}
}
});
if(Number(ct)&&Number(cf)>=Number(ct)){
alert(_1b+"\u304c\u4e0d\u6b63\u3067\u3059\u3002\u4e0b\u9650\u306e\u5024\u306e\u65b9\u304c\u5927\u304d\u306a\u5024\u3092\u9078\u629e\u3057\u3066\u3044\u308b\u304b\u3001\u540c\u3058\u5024\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002");
return false;
}
return true;
},check:function(f,_21){
f=$(f);
if(!_21){
if(!this.checkEkiCnt(f)){
return false;
}
}else{
if(!this.checkCityCnt(f)){
return false;
}
}
return this.checkSimple(f);
},checkSimple:function(f){
f=$(f);
if(!this.checkFromTo(f,"cf","ct","\u5bb6\u8cc3\u9078\u629e")){
return false;
}
if(!this.checkFromTo(f,"sf","st","\u5c02\u6709\u9762\u7a4d")){
return false;
}
return true;
},saveCond:function(f,_24){
var _25=new HTTP.Cookies();
var now=new Date().format("mmdd");
var s=_25.read(Chintai.Constant.C_COOKIE_NAME_SAVE_COND);
if(s!=""){
if(!confirm("\u300c\u3053\u306e\u6761\u4ef6\u3092\u4fdd\u5b58\u3059\u308b\u300d\u306f1\u4ef6\u306e\u307f\u4fdd\u5b58\u304c\u53ef\u80fd\u3067\u3059\u3002\u3059\u3067\u306b\u6761\u4ef6\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u4e0a\u66f8\u304d\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f")){
return false;
}
}
_25.write(Chintai.Constant.C_COOKIE_NAME_SAVE_COND,now+"|"+location.href,"+12M",Chintai.cookie.path,Chintai.Constant.C_COOKIE_DOMAIN,null);
alert("\u691c\u7d22\u6761\u4ef6\u3092\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002");
return false;
},_getQueryString:function(f){
var a=Form.serialize(f).split("&");
var p="";
for(var i=0;i<a.length;i++){
if(a[i].indexOf("apache")>=0||a[i].indexOf("TOKEN")>=0||a[i].indexOf("TOKEN")>=0){
}else{
p+=a[i]+"&";
}
}
return p;
},saveLastCond:function(){
var _2c=location.href;
if(_2c.indexOf("sitemap")>-1){
return;
}
var p=location.search;
var _2e=new HTTP.Cookies();
if(_2c.indexOf("sitemap")>-1){
var v=p.toQueryParams();
if(_2c.indexOf("area")>-1){
if(v["g"]){
_2c=_2c.replaceAll("sitemap/","").replaceAll(v["g"],"search");
}
}else{
_2c=_2c.replaceAll("sitemap/","").replaceAll(v["e"]?v["e"]:v["f"],"search");
}
}
if(_2c.indexOf("http")==-1){
_2c=Chintai.Constant.C_HOME_URL+_2c;
}
_2e.write(Chintai.Constant.C_COOKIE_NAME_SAVE_LAST_COND,_2c,"+12M",Chintai.cookie.path,Chintai.Constant.C_COOKIE_DOMAIN,null);
return true;
},saveWww:function(f){
var p=location.search;
var _32=new HTTP.Cookies();
_32.write(Chintai.cookie.wwwCookieName,p,"+12M",Chintai.cookie.path,Chintai.Constant.C_COOKIE_DOMAIN,null);
_32.write(Chintai.cookie.searchCookieName,"","-12M",Chintai.cookie.path,Chintai.Constant.C_COOKIE_DOMAIN,null);
return true;
},clearEki:function(_33,f,t){
for(var i=f;i<=t;i++){
$(_33+String(i)).checked=false;
}
},setTotalCount:function(_37,f,_39){
var es=$A(Form.getElements(f));
var cnt=0;
es.each(function(e){
if(e.name=="e"||e.name=="f"){
if(e.checked){
if(Number(_39[e.value])){
cnt+=Number(_39[e.value]);
}
}
}
});
$(_37).innerHTML=cnt;
return true;
},checkOn:function(_3d,_3e){
if($(_3d)&&$(_3e)){
$(_3e).checked=$(_3d).checked;
}
},land:function(){
var url="/common/html/chintai_info_land.html";
var _40="land";
var w=500;
var h=350;
Chintai.Util.openSubWin(url,_40,w,h);
return true;
},teisyakuLink:function(){
var url="/common/html/teisyaku.html";
var _44="land";
var w=500;
var h=350;
Chintai.Util.openSubWin(url,_44,w,h);
return true;
},goWish:function(_47){
if(location.href.indexOf("/area/search")>-1){
var url=Chintai.Constant.C_HOME_URL_SSL+"/"+_47+"/area/wish/RegistInput.do";
}else{
var url=Chintai.Constant.C_HOME_URL_SSL+"/"+_47+"/wish/RegistInput.do";
}
location.href=url+location.search;
},saveSearch2Www:function(){
var _49=new HTTP.Cookies();
var wc=_49.read(Chintai.cookie.wwwCookieName);
var sc=_49.read(Chintai.cookie.searchCookieName);
if(wc==""&&sc!=""){
var m=[];
$j.each(sc.toQueryParams(),function(k,v){
if(!(v==-1||v=="")){
var f=Chintai.OD[k];
if(typeof f!="undefined"){
m.push(f(v));
}
}
});
wc=m.join("&");
_49.write(Chintai.cookie.searchCookieName,"","-12M",Chintai.cookie.path,Chintai.Constant.C_COOKIE_DOMAIN,null);
}
if(wc==""){
wc=Chintai.Constant.C_SEARCH_DEFAULT_QUERY_STRING;
}
_49.write(Chintai.cookie.wwwCookieName,wc,"+12M",Chintai.cookie.path,Chintai.Constant.C_COOKIE_DOMAIN,null);
_49.write(Chintai.cookie.searchCookieName,"","-12M",Chintai.cookie.path,Chintai.Constant.C_COOKIE_DOMAIN,null);
}};
Chintai.Renew.Search.Detail={chkInquiry:function(f,bk){
var e=Form.getInputs(f,"checkbox","bk");
if(!bk){
bk=new Array();
}
e.each(function(v,i){
if(v.checked){
bk.push(v.value);
}
});
if(bk.length>Chintai.Constant.C_MAX_INQUIRY){
alert(String(Chintai.Constant.C_MAX_INQUIRY+1)+"\u4ef6\u4ee5\u4e0a\u306e\u7269\u4ef6\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\u300c\u9078\u629e\u3057\u305f\u7269\u4ef6\u3092\u307e\u3068\u3081\u3066\u554f\u5408\u305b\u300d\u306f"+String(Chintai.Constant.C_MAX_INQUIRY)+"\u4ef6\u307e\u3067\u306e\u7269\u4ef6\u306b\u5bfe\u3057\u3066\u884c\u3048\u307e\u3059\u3002");
return false;
}
return true;
},doInquiry:function(f){
var bk=new Array();
var ret=this.chkInquiry(f,bk);
if(!ret){
return false;
}
var e=$(f);
e.action=Chintai.Constant.C_DETAIL_INQUIRY_INPUT_URL;
if(location.href.indexOf("sitemap")==-1){
e.submit();
}else{
Chintai.Util.openInquiryForm(bk,"b");
}
},doDetail:function(f){
var e=$(f);
e.action=Chintai.Constant.C_DETAIL_URL_NOP;
Chintai.Util.submit(f);
},doOmiseDetail:function(f){
var e=$(f);
e.action=Chintai.Constant.C_OMISE_DETAIL_URL;
Chintai.Util.submit(f);
},doOmiseInquiry:function(f){
var e=Form.getInputs(f,"checkbox","us");
var bk=new Array();
e.each(function(v,i){
if(v.checked){
bk.push(v.value);
}
});
if(bk.length==0){
alert("\u5e97\u8217\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002");
return;
}else{
if(bk.length>Chintai.Constant.C_MAX_INQUIRY){
alert(String(Chintai.Constant.C_MAX_INQUIRY+1)+"\u4ef6\u4ee5\u4e0a\u306e\u5e97\u8217\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\u300c\u9078\u629e\u3057\u305f\u5e97\u8217\u3092\u307e\u3068\u3081\u3066\u554f\u5408\u305b\u300d\u306f"+String(Chintai.Constant.C_MAX_INQUIRY)+"\u4ef6\u307e\u3067\u306e\u5e97\u8217\u306b\u5bfe\u3057\u3066\u884c\u3048\u307e\u3059\u3002");
return;
}
}
var e=$(f);
e.action=Chintai.Constant.C_OMISE_INQUIRY_INPUT_URL;
e.submit();
},delFavorite:function(f){
var e=Form.getInputs(f,"checkbox","bk");
var _64=new Array();
var vs=new Array();
var _66=new HTTP.Cookies();
var s=_66.read(Chintai.Constant.C_COOKIE_NAME_FAVORITE);
var _68=s.split("&");
e.each(function(v,i){
if(v.checked){
_64.push(v.value);
}
});
_68.each(function(v){
var s=v.split("_");
var _6d=s[0];
if(_6d.substring(0,1)=="0"){
_6d=_6d.substring(9,22);
}
var _6e="0";
for(var i=0;i<_64.length;i++){
var _70=_64[i];
if(_70.substring(0,1)=="0"){
_70=_70.substring(9,22);
}
if((_6d.indexOf(_70)>-1)&&(_6d.length==_70.length)){
_6e="1";
}
if(_6e=="0"&&i==_64.length-1){
vs.push(v);
}
}
});
_66.remove(Chintai.Constant.C_COOKIE_NAME_FAVORITE,"/",Chintai.Constant.C_COOKIE_DOMAIN,null);
var _71=vs.join("&");
_66.writeNotEscape(Chintai.Constant.C_COOKIE_NAME_FAVORITE,_71.substring(0,_71.length-1),"+12M","/",Chintai.Constant.C_COOKIE_DOMAIN,null);
return true;
},addFavorite:function(f){
var e=Form.getInputs(f,"checkbox","bk");
var bk=new Array();
e.each(function(v,i){
if(v.checked){
bk.push(v.value);
}
});
if(bk.length>Chintai.Constant.C_COOKIE_MAX_FAVORITE){
alert(String(Chintai.Constant.C_COOKIE_MAX_FAVORITE+1)+"\u4ef6\u4ee5\u4e0a\u306e\u7269\u4ef6\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\u300c\u304a\u6c17\u306b\u5165\u308a\u7269\u4ef6\u306b\u8ffd\u52a0\u300d\u306f"+String(Chintai.Constant.C_COOKIE_MAX_FAVORITE)+"\u4ef6\u307e\u3067\u306e\u7269\u4ef6\u306b\u5bfe\u3057\u3066\u884c\u3048\u307e\u3059\u3002");
return;
}
this._addFavorite(bk);
},addFavoriteByBK:function(b){
var bk=new Array();
bk.push(b);
this._addFavorite(bk);
},_addFavorite:function(_79,_7a){
var _7b=new HTTP.Cookies();
var s=_7b.read(Chintai.Constant.C_COOKIE_NAME_FAVORITE);
var _7d=s.split("&");
var now=new Date().format("yyyymmddhh24miss");
var _7f="?";
_79.each(function(m){
try{
_7d.push(m+"_"+now);
_7f+="bk="+m+"&";
}
catch(e){
}
});
_7d=_7d.remove("");
var tmp=new Array();
_7d.each(function(v,i){
var s=v.split("_");
if(s[1]||s[0]){
tmp.push(s[1]+"_"+s[0]);
}
});
tmp.sort().reverse();
var _85="";
var cnt=0;
var _87=false;
tmp.each(function(v,i){
if(cnt>=Chintai.Constant.C_COOKIE_MAX_FAVORITE){
alert("\u767b\u9332\u3067\u304d\u308b\u7269\u4ef6\u6570\u306f"+String(Chintai.Constant.C_COOKIE_MAX_FAVORITE)+"\u4ef6\u307e\u3067\u3067\u3059\u3002\u65b0\u3057\u3044\u7269\u4ef6\u3092\u767b\u9332\u3057\u305f\u3044\u5834\u5408\u306f\u4e0d\u8981\u306a\u7269\u4ef6\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002");
_87=true;
throw $break;
}
var s=v.split("_");
if(_85.indexOf(s[1])==-1){
_85+=s[1]+"_"+s[0]+"&";
cnt++;
}
});
if(_87){
return;
}
_7b.writeNotEscape(Chintai.Constant.C_COOKIE_NAME_FAVORITE,_85.substring(0,_85.length-1),"+12M","/",Chintai.Constant.C_COOKIE_DOMAIN,null);
if(!_7a){
var url=Chintai.Constant.C_COOKIE_HTML+_7f.substring(0,_7f.length-1);
var w=720;
var h=720;
Chintai.Util.openSubWin(url,"bk_favorite_add",w,h);
}
},lightbox:function(id,p){
var _90={imageLoading:"/common2/images/lightbox-ico-loading.gif",imageBtnPrev:"/common2/images/lightbox-btn-prev.gif",imageBtnNext:"/common2/images/lightbox-btn-next.gif",imageBtnClose:"/common2/images/lightbox-btn-close.gif",imageBlank:"/common2/images/lightbox-blank.gif",overlayOpacity:0,overlayBgColor:"#ff0066"};
var i=$j("#"+id).get(0);
if(!i){
return;
}
var _92=i.src.replaceAll("/256/","/640/").replaceAll(Chintai.systemProperty.C_IMAGE_URL+"/",Chintai.systemProperty.C_IMAGE_URL2+"/")+p;
var a=$j("<a></a>");
a.attr("href",_92);
$j(i).wrap(a);
$j("a:has(#"+id+")").lightBox(_90);
},swapImage:function(_94,_95,p){
$j("."+_95).each(function(idx){
var a=this.src.split("/");
for(var i=a.length-1;i>=0;i--){
if(a[i]=="40"){
a[i]="256";
break;
}
}
var src=a.join("/")+p;
var i=$j(this);
i.css("cursor","pointer");
i.click(function(){
$j("#"+_94).attr("src",src);
$j("#"+_94).attr("alt",i.attr("alt"));
$j("#"+_94).next().text(i.attr("alt"));
$j("img").bind("contextmenu",function(){
return false;
});
});
if(idx==0){
i.trigger("click");
}
});
}};

