//dezinerfolio
//eval((function(){a="Scroller={speed:10,8dC.;d.while(dC.+C.}} J8N;d=5;&&M4M}d&&dM4dM}%4%} 0J8a,F4(F,fa@7a.4a.LP+F7Jend8e66.cancelBubble=true;6.Value=fa@;}&&(E(7J8di=Hner3||5.G3;hN.3;a=(Ed>ah-d>i7e@{-(h-d)7}e@{a=a+(d-a}To(0,aEa==a}=aJHit8KwHdow,A,A7,A82P;l=9;d=locatiP;D&&D.HdexOfL#)!=-1&&(l/+l=C)Kl,Gck,endEl.PGck=2l=this.hash.substr(1E9.name==l;i=setILL+(9)+),107}}}}}};Hit()",b=48;while(b>=0)a=a.replace(new RegExp("%23456789@ACDEFGHJKLMNP".charAt(b),"g"),("\042Scroller.entfunction(offsetParscrollwindow.returndocumattachEvntervala=.getElemsByTagName(a);if(offsetTop){for(i=0;i<a.length;i++.pathnamea+=Math.ceil((d-ae.stopPropagationTopa.addEvListenerbody)/speede.prevDefaultclearI(i)pageYOffsetend(this);Height .Elemev)}:a[i]lseload=dl.href);b,dcliin},((.=.=C||on".split(""))[b--]);return a})())

function copyright(company){
	myD = new Date();
	myYear = myD.getFullYear();
	document.write('<p class="copyright">Copyright(C)'+myYear+' '+company+' All Rights Reserved.</p>\n');
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&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<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//イメージ先読み

(new Image()).src="img/headerNavi_bg.jpg";
(new Image()).src="img/inquiry_01b_off.jpg";
(new Image()).src="img/inquiry_01b_on.jpg";
(new Image()).src="img/inquiry_02b_off.jpg";
(new Image()).src="img/inquiry_02b_on.jpg";
(new Image()).src="img/inquiry_03b_off.jpg";
(new Image()).src="img/inquiry_03b_on.jpg";
(new Image()).src="img/columnImage01.jpg";
(new Image()).src="img/columnImage02.jpg";
(new Image()).src="img/columnImage03.jpg";
(new Image()).src="img/columnImage04.jpg";


//仲介手数料判定ナビの「その他」有効化
function chk1(obj,id){
        var frm=document.navi;
        if(!obj.checked){
            /* チェックされたら、テキストボックスを有効化 */
            frm.elements[id].disabled=true;
        }else{
            /* チェックが外されたら、テキストボックスを無効化 */
            frm.elements[id].disabled=false;
        }
}

//家コラムのランダムイメージ
function columnImage(){
	var img = new Array();
	img[0] = "http://www.e-sumikae.co.jp/img/columnImage01.jpg";
	img[1] = "http://www.e-sumikae.co.jp/img/columnImage02.jpg";
	img[2] = "http://www.e-sumikae.co.jp/img/columnImage03.jpg";
	img[3] = "http://www.e-sumikae.co.jp/img/columnImage04.jpg";
	i = Math.floor(Math.random()*4);
	html = '<img src="'+img[i]+'" />';
	document.write(html);
}

//詳細検索

function searchWords(form){
	var types0 = new Array();	/*建物の種類	bw_002*/
	var time0 = new Array();	/*駅から徒歩	bw_005*/
	var price0 = new Array();	/*金額			bw_006*/
	var space0 = new Array();	/*専有面積		bw_007*/
	var old0 = new Array();	/*築年数		bw_008*/
	var feature0 = new Array();	/*特徴		bw_009*/

//建物の種類
	itypes=0;
	for (i=0 ; i < document.ghetto.types.length ; i++){
		if (document.ghetto.types[i].checked){
			types0[itypes] = document.ghetto.types[i].value;
			itypes++;
		}
	}
	var types = types0.join(" OR ");
	
//駅から徒歩
	itime=0;
	for (i=0 ; i < document.ghetto.time.length ; i++){
		if (document.ghetto.time[i].checked){
			time0[itime] = document.ghetto.time[i].value;
			itime++;
		}
	}
	var time = time0.join(" OR ");

//金額
	iprice=0;
	for (i=0 ; i < document.ghetto.price.length ; i++){
		if (document.ghetto.price[i].checked){
			price0[iprice] = document.ghetto.price[i].value;
			iprice++;
		}
	}
	var price = price0.join(" OR ");

//専有面積
	ispace=0;
	for (i=0 ; i < document.ghetto.space.length ; i++){
		if (document.ghetto.space[i].checked){
			space0[ispace] = document.ghetto.space[i].value;
			ispace++;
		}
	}
	var space = space0.join(" OR ");

//築年数
	iold=0;
	for (i=0 ; i < document.ghetto.old.length ; i++){
		if (document.ghetto.old[i].checked){
			old0[iold] = document.ghetto.old[i].value;
			iold++;
		}
	}
	var old = old0.join(" OR ");

//特徴
	ifeature=0;
	for (i=0 ; i < document.ghetto.feature.length ; i++){
		if (document.ghetto.feature[i].checked){
			feature0[ifeature] = document.ghetto.feature[i].value;
			ifeature++;
		}
	}
	var feature = feature0.join(" OR ");


//各グループの値を配列に入れる	
	words = new Array(6); 
	words[0] = types;
	words[1] = time;
	words[2] = price;
	words[3] = space;
	words[4] = old;
	words[5] = feature;
	searchString=new Array();


var icount = 0; //空要素を除いたグループをカウント
	for(i=0;i<6;i++){
		if(words[i]!=""){
			icount++;
		}
	}

var searchString0 = new Array(icount); //空要素をのぞいたグループを配列に入れる
var istr=0;
for (i=0;i<6;i++){ 
	if (words[i]!=""){
		searchString0[istr]=words[i];
		istr++;
	}else if(words[i]==""){
		void(0);
	}

}
	var sss = searchString0.length;
	searchString=searchString0.join(" AND "); //各グループをANDで結ぶ
	
	//alert('グループ数：'+icount+'/サーチストリング：'+searchString0);
	form.elements['search'].value = searchString;

}

function trans(word){
	var stx = "";
	if (word=="bw_002001"){
		stx= "マンション";
	}else if (word=="bw_002002"){
		stx= "一戸建";
	}else if (word=="bw_002003"){
		stx= "その他";
	}else if (word=="bw_005001"){
		stx= "徒歩5分以内";
	}else if (word=="bw_005002"){
		stx= "徒歩10分以内";
	}else if (word=="bw_005003"){
		stx= "徒歩15分以内";
	}else if (word=="bw_005004"){
		stx= "駅からの距離は気にしない";
	}else if (word=="bw_006001"){
		stx= "販売価格：1000万円～2000万円未満";
	}else if (word=="bw_006002"){
		stx= "販売価格：2000万円～3000万円未満";
	}else if (word=="bw_006003"){
		stx= "販売価格：3000万円～4000万円未満";
	}else if (word=="bw_006004"){
		stx= "販売価格：4000万円～5000万円未満";
	}else if (word=="bw_006005"){
		stx= "販売価格：5000万円～6000万円未満";
	}else if (word=="bw_006006"){
		stx= "販売価格：6000万円～7000万円未満";
	}else if (word=="bw_006007"){
		stx= "販売価格：7000万円～8000万円未満";
	}else if (word=="bw_006008"){
		stx= "販売価格：8000万円～9000万円未満";
	}else if (word=="bw_006009"){
		stx= "販売価格：9000万円～1億円未満";
	}else if (word=="bw_006010"){
		stx= "販売価格：1億円以上";
	}else if (word=="bw_007001"){
		stx= "専有面積（㎡）：20～40未満";
	}else if (word=="bw_007002"){
		stx= "専有面積（㎡）：40～60未満";
	}else if (word=="bw_007003"){
		stx= "専有面積（㎡）：60～80未満";
	}else if (word=="bw_007004"){
		stx= "専有面積（㎡）：80～100未満";
	}else if (word=="bw_007005"){
		stx= "専有面積（㎡）：100以上";
	}else if (word=="bw_008001"){
		stx= "築年数：新築";
	}else if (word=="bw_008002"){
		stx= "築年数：築5年以内";
	}else if (word=="bw_008003"){
		stx= "築年数：築10年以内";
	}else if (word=="bw_008004"){
		stx= "築年数：築15年以内";
	}else if (word=="bw_008005"){
		stx= "築年数：気にしない";
	}else if (word=="bw_009001"){
		stx= "駐車場空有";
	}else if (word=="bw_009002"){
		stx= "ペット可";
	}else if (word=="bw_009003"){
		stx= "リフォーム済";
	}else if (word=="bw_009004"){
		stx= "眺望";
	}else if (word=="bw_009005"){
		stx= "庭付き";
	}else if (word=="bw_009006"){
		stx= "ルーフバルコニー";
	}else if (word=="bw_009007"){
		stx= "海が見える";
	}else if (word=="bw_009008"){
		stx= "海のそば";
	}else if (word=="bw_009009"){
		stx= "水辺・緑";
	}else if (word=="bw_009010"){
		stx= "メゾネット";
	}else if (word=="bw_009011"){
		stx= "レトロ";
	}else if (word=="bw_009012"){
		stx= "タワーマンション";
	}else if (word=="OR"){
		stx="";
	}else if (word=="AND"){
		stx="";
	}else{
		stx=word;
	}
	return stx;
		
}
function trans2(searchWords){
	words=searchWords.split(' ');
	icount = words.length;
	for(i=0 ; i<icount ; i++){
		if(words[i]=='AND'){
			void(0);
		}else if(words[i]=='OR'){
			void(0);
		}else{
			document.write('<li>'+trans(words[i])+'</li>');
		}
	}
}




