function copyright(company){
	myD = new Date();
	myYear = myD.getFullYear();
	document.write('<p>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];}
}
function changeBlock(mode){
	if (document.getElementById){
		if(mode=='default'){
			document.getElementById('default').style.display = "block";
			document.getElementById('portfolio').style.display = "none";
			location.href = 'javascript:void(0)';
            //return false;
		}else if(mode=='portfolio'){
			document.getElementById('default').style.display = "none";
			document.getElementById('portfolio').style.display = "block";
			location.href = 'javascript:void(0)';
           // return false;

		}
	}
}
function changeBlock2(mode){
	if (document.getElementById){
		if(mode=='default2'){
			document.getElementById('default2').style.display = "block";
			document.getElementById('portfolio2').style.display = "none";
			location.href = 'javascript:void(0)';
            //return false;
		}else if(mode=='portfolio2'){
			document.getElementById('default2').style.display = "none";
			document.getElementById('portfolio2').style.display = "block";
			location.href = 'javascript:void(0)';
           // return false;

		}
	}
}
//左側メニューのトグル
function toggleBox(id){
	if(id=="sale"){
		Element.hide("rental");
		Element.toggle(id);
	}else if(id=="rental"){
		Element.hide("sale");
		Element.toggle(id);
	}
}

//トップへ戻るのスムージング
var eventTimer;    // タイマー変数
var restScroll=0;    // スクロール残量

function Scroll(base,move){
    // 移動元(base)要素＆オブジェクトを取得
    var obj_base = getElemPosition(base);
    // 移動先(move)要素＆オブジェクトを取得
    var elem_move = document.getElementById(move);
    var obj_move = getElemPosition(elem_move);
    restScroll = obj_move.y-obj_base.y;
    eventTimer = setInterval(setScrollPosition,10);
}

// スクロール処理をする
function setScrollPosition() {
    var moveValue=0;
    // スクロール残量が80以上の場合、スクロール量を変える
    // Math.abs()では値の絶対値を取得
    if(Math.abs(restScroll)>80){
        moveValue = (restScroll>0)?20:-20;
    }else{
        moveValue = Math.round(restScroll/4);
    }
    // スクロールを処理
    parent.scrollBy(0,moveValue);
    // スクロール残量を計算して、残りが無ければタイマー解除
    restScroll = (restScroll>0)?restScroll-moveValue:restScroll-moveValue;
    if(moveValue==0){
        clearInterval(eventTimer);
        restScroll=0;
    }
}

// 要素の位置を取得し、オブジェクトとして返す
function getElemPosition(elem) {
    var obj = new Object();
    obj.x = elem.offsetLeft;
    obj.y = elem.offsetTop;
    // 親要素を取得して位置情報を修正する
    while(elem.offsetParent) {
        elem = elem.offsetParent;
        obj.x += elem.offsetLeft;
        obj.y += elem.offsetTop;
    }
    return obj;
}



//Tool Tip
function enableTooltips(id){
var links,i,h;
if(!document.getElementById || !document.getElementsByTagName) return;
AddCss();
h=document.createElement("span");
h.id="btc";
h.setAttribute("id","btc");
h.style.position="absolute";
document.getElementsByTagName("body")[0].appendChild(h);
if(id==null) links=document.getElementsByTagName("a");
else links=document.getElementById(id).getElementsByTagName("a");
for(i=0;i<links.length;i++){
    Prepare(links[i]);
    }
}

function Prepare(el){
var tooltip,t,b,s,l;
t=el.getAttribute("title");
if(t==null || t.length==0) t="link:";
el.removeAttribute("title");
tooltip=CreateEl("span","tooltip");
s=CreateEl("span","top");
s.appendChild(document.createTextNode(t));
tooltip.appendChild(s);
b=CreateEl("p","bottom");
l=el.getAttribute("rel");
//l=el.getAttribute("href");
if(l.length>100) l=l.substr(0,97)+"...";
b.appendChild(document.createTextNode(l));
tooltip.appendChild(b);
setOpacity(tooltip);
el.tooltip=tooltip;
el.onmouseover=showTooltip;
el.onmouseout=hideTooltip;
el.onmousemove=Locate;
}

function showTooltip(e){
document.getElementById("btc").appendChild(this.tooltip);
Locate(e);
}

function hideTooltip(e){
var d=document.getElementById("btc");
if(d.childNodes.length>0) d.removeChild(d.firstChild);
}

function setOpacity(el){
el.style.filter="alpha(opacity:95)";
el.style.KHTMLOpacity="0.95";
el.style.MozOpacity="0.95";
el.style.opacity="0.95";
}

function CreateEl(t,c){
var x=document.createElement(t);
x.className=c;
x.style.display="block";
return(x);
}

function AddCss(){
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","default.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}

function Locate(e){
var posx=0,posy=0;
if(e==null) e=window.event;
if(e.pageX || e.pageY){
    posx=e.pageX; posy=e.pageY;
    }
else if(e.clientX || e.clientY){
    if(document.documentElement.scrollTop){
        posx=e.clientX+document.documentElement.scrollLeft;
        posy=e.clientY+document.documentElement.scrollTop;
        }
    else{
        posx=e.clientX+document.body.scrollLeft;
        posy=e.clientY+document.body.scrollTop;
        }
    }
document.getElementById("btc").style.top=(posy+10)+"px";
document.getElementById("btc").style.left=(posx-20)+"px";
}


//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 searchWords(form){
	var cat0 = new Array();	/*募集状況		bw_001*/
	var types0 = new Array();	/*建物の種類	bw_002*/
	var area0 = new Array();	/*エリア		bw_003*/
	var railroad0 = new Array();	/*路線		bw_004*/
	var walk0 = new Array();	/*駅から徒歩	bw_005*/
	var rent0 = new Array();	/*賃料			bw_011*/
	var price0 = new Array();	/*金額			bw_006*/
	var space0 = new Array();	/*専有面積		bw_007*/
	var old0 = new Array();	/*築年数		bw_008*/
	var feature0 = new Array();	/*特徴		bw_009*/

//募集状況
	icat=0;
	for (i=0 ; i < document.ghetto.cat.length ; i++){ //catのチェックボタンの数
		if (document.ghetto.cat[i].checked){
			cat0[icat] = document.ghetto.cat[i].value; //チェックされている値を配列に入れる
			icat++;
		}
	}
	var cat = cat0.join(" OR "); //チェックされた値をORで結ぶ
	

//建物の種類
	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 ");
	
//エリア
	iarea=0;
	for (i=0 ; i < document.ghetto.area.length ; i++){
		if (document.ghetto.area[i].checked){
			area0[iarea] = document.ghetto.area[i].value;
			iarea++;
		}
	}
	var area = area0.join(" OR ");

//路線
	irailroad=0;
	for (i=0 ; i < document.ghetto.railroad.length ; i++){
		if (document.ghetto.railroad[i].checked){
			railroad0[irailroad] = document.ghetto.railroad[i].value;
			irailroad++;
		}
	}
	var railroad = railroad0.join(" OR ");

//駅から徒歩
	iwalk=0;
	for (i=0 ; i < document.ghetto.walk.length ; i++){
		if (document.ghetto.walk[i].checked){
			walk0[iwalk] = document.ghetto.walk[i].value;
			iwalk++;
		}
	}
	var walk = walk0.join(" OR ");

//賃料
	irent=0;
	for (i=0 ; i < document.ghetto.rent.length ; i++){
		if (document.ghetto.rent[i].checked){
			rent0[irent] = document.ghetto.rent[i].value;
			irent++;
		}
	}
	var rent = rent0.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(10); //各グループの値を配列に入れる
	words[0] = cat;
	words[1] = types;
	words[2] = area;
	words[3] = railroad;
	words[4] = walk;
	words[5] = rent;
	words[6] = price;
	words[7] = space;
	words[8] = old;
	words[9] = feature;
	searchString=new Array();


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

var searchString0 = new Array(icount); //空要素をのぞいたグループを配列に入れる
var istr=0;
for (i=0;i<10;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_001001"){
		stx= "売買";
	}else if (word=="bw_001002"){
		stx= "賃貸";
	}else if (word=="bw_002001"){
		stx= "マンション";
	}else if (word=="bw_002002"){
		stx= "一戸建";
	}else if (word=="bw_002003"){
		stx= "その他";
	}else if (word=="bw_003001"){
		stx= "千代田区";
	}else if (word=="bw_003002"){
		stx= "中央区";
	}else if (word=="bw_003003"){
		stx= "港区";
	}else if (word=="bw_003004"){
		stx= "新宿区";
	}else if (word=="bw_003005"){
		stx= "文京区";
	}else if (word=="bw_003006"){
		stx= "台東区";
	}else if (word=="bw_003007"){
		stx= "墨田区";
	}else if (word=="bw_003008"){
		stx= "江東区";
	}else if (word=="bw_003009"){
		stx= "品川区";
	}else if (word=="bw_003010"){
		stx= "目黒区";
	}else if (word=="bw_003011"){
		stx= "大田区";
	}else if (word=="bw_003012"){
		stx= "世田谷区";
	}else if (word=="bw_003013"){
		stx= "渋谷区";
	}else if (word=="bw_003014"){
		stx= "中野区";
	}else if (word=="bw_003015"){
		stx= "杉並区";
	}else if (word=="bw_003016"){
		stx= "豊島区";
	}else if (word=="bw_003017"){
		stx= "北区";
	}else if (word=="bw_003018"){
		stx= "荒川区";
	}else if (word=="bw_003019"){
		stx= "板橋区";
	}else if (word=="bw_003020"){
		stx= "練馬区";
	}else if (word=="bw_003021"){
		stx= "足立区";
	}else if (word=="bw_003022"){
		stx= "葛飾区";
	}else if (word=="bw_003023"){
		stx= "江戸川区";
	}else if (word=="bw_003024"){
		stx= "武蔵野市";
	}else if (word=="bw_003025"){
		stx= "三鷹市";
	}else if (word=="bw_003026"){
		stx= "調布市";
	}else if (word=="bw_003027"){
		stx= "府中市";
	}else if (word=="bw_003028"){
		stx= "八王子";
	}else if (word=="bw_003029"){
		stx= "立川市";
	}else if (word=="bw_003030"){
		stx= "町田市";
	}else if (word=="bw_003031"){
		stx= "東京23区以外のその他の都市";
	}else if (word=="bw_003041"){
		stx= "横浜市";
	}else if (word=="bw_003042"){
		stx= "川崎市";
	}else if (word=="bw_003043"){
		stx= "茅ヶ崎市";
	}else if (word=="bw_003044"){
		stx= "藤沢市";
	}else if (word=="bw_003045"){
		stx= "鎌倉市";
	}else if (word=="bw_003046"){
		stx= "逗子市";
	}else if (word=="bw_003047"){
		stx= "神奈川県その他";
	}else if (word=="bw_004001"){
		stx= "山手線";
	}else if (word=="bw_004002"){
		stx= "東海道本線";
	}else if (word=="bw_004003"){
		stx= "横須賀線";
	}else if (word=="bw_004004"){
		stx= "京浜東北・根岸線";
	}else if (word=="bw_004005"){
		stx= "中央本線";
	}else if (word=="bw_004006"){
		stx= "埼京線";
	}else if (word=="bw_004007"){
		stx= "南武線";
	}else if (word=="bw_004008"){
		stx= "横浜線";
	}else if (word=="bw_004009"){
		stx= "千代田・常磐緩行線";
	}else if (word=="bw_004010"){
		stx= "総武・中央緩行線";
	}else if (word=="bw_004011"){
		stx= "総武本線";
	}else if (word=="bw_004012"){
		stx= "武蔵野線";
	}else if (word=="bw_004013"){
		stx= "JRその他";
	}else if (word=="bw_004014"){
		stx= "銀座線";
	}else if (word=="bw_004015"){
		stx= "千代田線";
	}else if (word=="bw_004016"){
		stx= "東西線";
	}else if (word=="bw_004017"){
		stx= "南北線";
	}else if (word=="bw_004018"){
		stx= "半蔵門線";
	}else if (word=="bw_004019"){
		stx= "日比谷線";
	}else if (word=="bw_004020"){
		stx= "丸ノ内線";
	}else if (word=="bw_004021"){
		stx= "有楽町線";
	}else if (word=="bw_004041"){
		stx= "副都心線";
	}else if (word=="bw_004022"){
		stx= "都営浅草線";
	}else if (word=="bw_004023"){
		stx= "都営大江戸線";
	}else if (word=="bw_004024"){
		stx= "都営新宿線";
	}else if (word=="bw_004025"){
		stx= "地下鉄その他";
	}else if (word=="bw_004026"){
		stx= "東急東横線";
	}else if (word=="bw_004027"){
		stx= "東急田園都市線";
	}else if (word=="bw_004028"){
		stx= "東急大井町線";
	}else if (word=="bw_004029"){
		stx= "東急池上線";
	}else if (word=="bw_004030"){
		stx= "東急目黒線";
	}else if (word=="bw_004031"){
		stx= "東急世田谷線";
	}else if (word=="bw_004032"){
		stx= "小田急電鉄小田原線";
	}else if (word=="bw_004033"){
		stx= "京王電鉄京王線";
	}else if (word=="bw_004034"){
		stx= "京王電鉄井の頭線";
	}else if (word=="bw_004035"){
		stx= "西武池袋・豊島線";
	}else if (word=="bw_004036"){
		stx= "西武新宿線";
	}else if (word=="bw_004037"){
		stx= "京浜急行電鉄本線";
	}else if (word=="bw_004038"){
		stx= "東武鉄道東上線";
	}else if (word=="bw_004039"){
		stx= "東武伊勢崎・大師線";
	}else if (word=="bw_004040"){
		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_011001"){
		stx= "賃料：～8万円未満";
	}else if (word=="bw_011002"){
		stx= "賃料：8万円～10万円未満";
	}else if (word=="bw_011003"){
		stx= "賃料：10万円～15万円未満";
	}else if (word=="bw_011004"){
		stx= "賃料：15万円～20万円未満";
	}else if (word=="bw_011005"){
		stx= "賃料：20万円～25万円未満";
	}else if (word=="bw_011006"){
		stx= "賃料：25万円～30万円未満";
	}else if (word=="bw_011007"){
		stx= "賃料：30万円～50万円未満";
	}else if (word=="bw_011008"){
		stx= "賃料：50万円～100万円未満";
	}else if (word=="bw_011009"){
		stx= "賃料：100万円～";
	}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>');
		}
	}
}

