﻿var pageType = "catalogue";

function catalogueLoad(){
	if(location.search=="?print"){
		
		document.getElementById('mainCSS').href = "../../../../print.css";
		
		var header = document.getElementById('header');
			header.innerHTML += '<ul id="printheader"><li class="large">TEL:045-549-5495</li><li class="small">FAX:045-549-5395</li><li class="small">http://www.tsunashima-cm.net/</li><li class="middle">営業時間10:00～18:00（水曜定休）</li></ul>';
		
		var headImg = document.getElementById('headerImg');
		
		headImg.src = "../../../../images/print_header.gif";
		headImg.width = 792;
		headImg.height = 90;
		
/*		var footerImage = document.createElement("img");
			footerImage.setAttribute('src','../../../../images/print_footer.gif');
			footerImage.setAttribute('width','792');
			footerImage.setAttribute('height','90');
		document.getElementById('footer').appendChild(footerImage);*/
		
		
var footerHTML = '<img src="../../../../images/print_hr.gif" class="footerhr" />'+
'<div id="footerleft">'+
'<h4 class="title">■手数料</h4>'+
'<table class="commission">'+
'	<tr><th>手数料負担の割合</th><td class="target">貸主</td><td class="per">0％</td><td class="target">借主</td><td class="per">100％</td></tr>'+
'	<tr><th>手数料配分の割合</th><td class="target">元付</td><td class="per">0％</td><td class="target">客付</td><td class="per">100％</td></tr>'+
'</table>'+
'<table class="property">'+
'	<tr><td>取引形態</td><td>：媒介</td></tr>'+
'	<tr><td>情報公開日</td><td>：</td></tr>'+
'</table>'+
'</div>'+
'<ul id="copyright">'+
'	<li class="small">神奈川県知事（１）第25408号</li>'+
'	<li class="large">オリエンタル産業株式会社　不動産賃貸事業部</li>'+
'	<li>〒223-0053 神奈川県横浜市港北区綱島西2-4-10 レジデンス水明1F</li>'+
'	<li class="small">E-MAIL : info@tsunashima-cm.net</li>'+
'</ul>';

		var footer = document.getElementById('footer');
			footer.innerHTML += footerHTML;



	}
}
function photoView(path){
	
	document.write('<div>');
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="110" height="110" id="物件情報フォトビューア" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="photoviewer.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="FlashVars" value="catalogNum='+path+'&sW=110&sH=110" />\n');

	document.write('<param name="scale" value="noscale" />\n');
	document.write('<param name="bgcolor" value="#ffffff" />\n');
	document.write('<embed src="photoviewer.swf" FlashVars="catalogNum='+path+'&sW=110&sH=110" quality="high" scale="noscale" bgcolor="#ffffff" width="110" height="110" name="物件情報フォトビューア" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
	document.write('</div>');
	
}
function otherphotos(type){
	var thisLength = 1;
	var urlText = new String(location);
	var path = urlText.match(/catalogue\/(\d\d\d\d\/\d+\/\d+\/\d+)\//)[1];
	document.write('<ul class="otherphotos">');
	for(var i=1;i<7;i++){
		if(thisLength==5){break;}
		
		var thisLog = eval("area0"+i+"_"+type);
		// カレント、または空白の場合は次へ
		if(thisLog==path||thisLog==""){continue;}
		
		document.write('<li>');
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="90" height="90" id="物件情報フォトビューア" align="middle">\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
		document.write('<param name="movie" value="../../../../photoviewer.swf" />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="FlashVars" value="catalogNum='+"../../../../"+thisLog+'&sW=90&sH=90" />\n');

		document.write('<param name="scale" value="noscale" />\n');
		document.write('<param name="bgcolor" value="#ffffff" />\n');
		document.write('<embed src="../../../../photoviewer.swf" FlashVars="catalogNum='+"../../../../"+thisLog+'&sW=90&sH=90" quality="high" scale="noscale" bgcolor="#ffffff" width="90" height="90" name="物件情報フォトビューア" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
		document.write('</object>\n');
		document.write('</li>');
		
		thisLength++;
	}
	
	document.write('</ul>');
}
