function copyright(company){
	myD = new Date();
	myYear = myD.getFullYear();
	document.write('<p>Copyright(C)'+myYear+' '+company+' All Rights Reserved.<\/p>\n');
}
/*
//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 flip(box_name) {   
	var item = $(box_name);   
	Element.toggle(item);   
}




//検索用スクリプト

function searchWords(form){
	var sale0 =new Array();
	var area0 =new Array();
	var railroad0 =new Array();
	var time0 =new Array();
	var price0 =new Array();
	var plan0 =new Array();
	var htype0 =new Array();
	var other0 =new Array();
	//sale
	isale=0
	for (i=0 ; i < document.ghetto.sale.length ; i++){ //saleのチェックボタンの数
		if (document.ghetto.sale[i].checked){
			sale0[isale] = document.ghetto.sale[i].value; //チェックされている値を配列に入れる
			isale++;
		}
	}
	sale=sale0.join(" OR "); //チェックされた値をORで結ぶ

	//area
	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++;
		}
	}
	area=area0.join(" OR ");
	
	//railroad
	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++;
		}
	}
	railroad=railroad0.join(" OR ");
	
	//time
	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++;
		}
	}
	time=time0.join(" OR ");

	//price
	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++;
		}
	}
	price=price0.join(" OR ");

	//plan
	iplan=0
	for (i=0 ; i < document.ghetto.plan.length ; i++){
		if (document.ghetto.plan[i].checked){
			plan0[iplan] = document.ghetto.plan[i].value;
			iplan++;
		}
	}
	plan=plan0.join(" OR ");

	//htype
	ihtype=0
	for (i=0 ; i < document.ghetto.htype.length ; i++){
		if (document.ghetto.htype[i].checked){
			htype0[ihtype] = document.ghetto.htype[i].value;
			ihtype++;
		}
	}
	htype=htype0.join(" OR ");

	//other
	iother=0
	for (i=0 ; i < document.ghetto.other.length ; i++){
		if (document.ghetto.other[i].checked){
			other0[iother] = document.ghetto.other[i].value;
			iother++;
		}
	}
	other=other0.join(" OR ");


/*	var area0 =new Array();
	var railroad0 =new Array();
	var time0 =new Array();
	var price0 =new Array();
	var plan0 =new Array();
	var htype0 =new Array();
	var other0 =new Array();*/
	
	
	words = new Array(8); //各グループの値を配列に入れる
	words[0]=sale;
	words[1]=area;
	words[2]=railroad;
	words[3]=time;
	words[4]=price;
	words[5]=plan;
	words[6]=htype;
	words[7]=other;
	searchString=new Array();
	
	

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

var searchString0 = new Array(icount); //空要素をのぞいたグループを配列に入れる
var istr=0;
for (i=0;i<8;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;

}
//エントリーのnewマーク
//30日以内の物件にnewマークをつける

function newmark(EntryYear,EntryDate){//MTEntryDate format="%Y",MTEntryDate format=%j"
	EntryMsec=((EntryYear-1970)*365*24*60*60*1000) + (EntryDate*24*60*60*1000);
	Today=new Date();
	TodayMsec=Today.getTime();
	differenceDays=(TodayMsec-EntryMsec)/(1000*60*60*24);
	if(differenceDays<=30){
		document.write('<img src="http://URL/img/new.gif" alt="new" width="28" height="15" class="new" />\n');
	}
}

//賃貸　or　分譲　<p class="rent">賃貸</p> 
function activeMark(MTEntryMore){
	if(MTEntryMore.indexOf("bw_001001")!= -1){
		document.write('<p class="sale">分譲</p>\n');
	}else if(MTEntryMore.indexOf("bw_001002")!= -1){
		document.write('<p class="rent">賃貸</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 ifDog(mode){
	if(mode=="sale"){
		document.getElementById('salebox').style.display = "block";
		document.getElementById('title_sale').style.display = "block";
		document.getElementById('rentbox').style.display = "none";
		document.getElementById('title_rent').style.display = "none";
		location.href = 'javascript:void(0)';
        return true;
	}else if(mode=="rent"){
		document.getElementById('rentbox').style.display = "block";
		document.getElementById('title_rent').style.display = "block";
		document.getElementById('salebox').style.display = "none";
		document.getElementById('title_sale').style.display = "none";
		return true;
	}
}

function unCheckAll(){
	var myObj = document.forms["ghetto"].elements["price"];
		for(i=0 ; i < myObj.length ; i++){
			myObj[i].checked = false;
		}
}
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= "JR総武・中央緩行線";
	}else if (word=="bw_003002"){
		stx= "JR武蔵野線";
	}else if (word=="bw_003003"){
		stx= "東京メトロ東西線";
	}else if (word=="bw_003004"){
		stx= "京成本線";
	}else if (word=="bw_004001"){
		stx= "徒歩5分以内";
	}else if (word=="bw_004002"){
		stx= "徒歩10分以内";
	}else if (word=="bw_004003"){
		stx= "徒歩15分以内";
	}else if (word=="bw_004004"){
		stx= "徒歩15分以上";
	}else if (word=="bw_005001"){
		stx= "賃料：6万円～7万円未満";
	}else if (word=="bw_005002"){
		stx= "賃料：7万円～8万円未満";
	}else if (word=="bw_005003"){
		stx= "賃料：8万円～9万円未満";
	}else if (word=="bw_005004"){
		stx= "賃料：9万円～10万円未満";
	}else if (word=="bw_005005"){
		stx= "賃料：10万円～11万円未満";
	}else if (word=="bw_005006"){
		stx= "賃料：11万円～12万円未満";
	}else if (word=="bw_005007"){
		stx= "賃料：12万円～13万円未満";
	}else if (word=="bw_005008"){
		stx= "賃料：13万円～14万円未満";
	}else if (word=="bw_005009"){
		stx= "賃料：14万円～15万円未満";
	}else if (word=="bw_005010"){
		stx= "賃料：15万円～";
	}else if (word=="bw_005011"){
		stx= "賃料：4万円未満";
	}else if (word=="bw_005012"){
		stx= "賃料：4万円～5万円未満";
	}else if (word=="bw_005013"){
		stx= "賃料：5万円～6万円未満";
	}else if (word=="bw_006001"){
		stx= "販売価格：1000万円～1500万円未満";
	}else if (word=="bw_006002"){
		stx= "販売価格：1500万円～2000万円未満";
	}else if (word=="bw_006003"){
		stx= "販売価格：2000万円～2500万円未満";
	}else if (word=="bw_006004"){
		stx= "販売価格：2500万円～3000万円未満";
	}else if (word=="bw_006005"){
		stx= "販売価格：3000万円～3500万円未満";
	}else if (word=="bw_006006"){
		stx= "販売価格：3500万円～4000万円未満";
	}else if (word=="bw_006007"){
		stx= "販売価格：4000万円～4500万円未満";
	}else if (word=="bw_006008"){
		stx= "販売価格：4500万円～5000万円未満";
	}else if (word=="bw_006009"){
		stx= "販売価格：5000万円以上";
	}else if (word=="bw_007001"){
		stx= "間取り：1R";
	}else if (word=="bw_007002"){
		stx= "間取り：1K";
	}else if (word=="bw_007003"){
		stx= "間取り：1DK";
	}else if (word=="bw_007004"){
		stx= "間取り：1LDK";
	}else if (word=="bw_007005"){
		stx= "間取り：2K";
	}else if (word=="bw_007006"){
		stx= "間取り：2DK";
	}else if (word=="bw_007007"){
		stx= "間取り：2LDK";
	}else if (word=="bw_007008"){
		stx= "間取り：3DK";
	}else if (word=="bw_007009"){
		stx= "間取り：3LDK";
	}else if (word=="bw_007010"){
		stx= "間取り：その他";
	}else if (word=="bw_008001"){
		stx= "建築種類：アパート";
	}else if (word=="bw_008002"){
		stx= "建築種類：マンション";
	}else if (word=="bw_008003"){
		stx= "建築種類：テラスハウス";
	}else if (word=="bw_008004"){
		stx= "建築種類：メゾネット";
	}else if (word=="bw_008005"){
		stx= "建築種類：一戸建て";
	}else if (word=="bw_008006"){
		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= "こだわり条件：2階以上";
	}else if (word=="bw_009009"){
		stx= "こだわり条件：南向き";
	}else if (word=="bw_009010"){
		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>');
		}
	}
}

//Topページのランダム画像
function randomImage(){
	var number = Math.floor(Math.random()*10);
	var topImage = new Array();
	topImage[0] = "images/top01.jpg";
	topImage[1] = "images/top02.jpg";
	topImage[2] = "images/top03.jpg";
	topImage[3] = "images/top01.jpg";
	topImage[4] = "images/top02.jpg";
	topImage[5] = "images/top03.jpg";
	topImage[6] = "images/top01.jpg";
	topImage[7] = "images/top02.jpg";
	topImage[8] = "images/top03.jpg";
	topImage[9] = "images/top01.jpg";
	document.write("<img src="+topImage[number]+" alt='西船橋の賃貸・不動産は藤井地所' width='740' height='175' />");
}

function naviFlash(){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="740" height="30" id="navi" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.fujiijisyo.com/images/navi.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="http://www.fujiijisyo.com/images/navi.swf" quality="high" bgcolor="#ffffff" width="740" height="30" name="navi" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
}