//write doc
function write_doc(doc_data01){
	document.write(doc_data01);
}



//write banner
function write_banner(){
	document.write('<div style="width:151px;" align="center"><div style="margin:20px 0 0 0;"><a href="http://town.higashikawa.hokkaido.jp/special/beautiful/index.htm" target="_blank"><img src="/images/banner_special01.jpg" width="120" height="60" alt="スペシャルサイト　東川町の自然・東川町の暮らし「美しく生きる」"></a></div><div style="margin:20px 0 0 0;"><a href="http://higashikawa.jp/" target="_blank"><img src="/images/banner_community01.jpg" width="120" height="60" alt="コミュニティサイト　集まれ広がれ「ひがしかワッ！！」"></a></div><div style="margin:20px 0 0 0;"><a href="http://town.higashikawa.hokkaido.jp/phototown/koshienofficial.htm" target="_blank"><img src="/images/banner_koshien.gif" alt="写真甲子園" width="120" height="30" border="0"></a></div><div style="margin:20px 0 0 0;"><a href="http://town.higashikawa.hokkaido.jp/phototown/photofesta.htm" target="_blank"><img src="/images/banner_photofesta01.gif" alt="東川町国際写真フェスティバル" width="120" height="30" border="0"></a></div><div style="margin:20px 0 0 0;"><a href="http://town.higashikawa.hokkaido.jp/kabunushi/" target="_blank"><img src="/images/banner_kabunushi01.gif" alt="ひがしかわ株主制度" width="120" height="30" border="0"></a></div><div style="margin:20px 0 0 0;"><a href="http://town.higashikawa.hokkaido.jp/jp/topics/konintodoke/index.htm"><img src="/images/banner_marriage01.gif" alt="新・婚姻届の概要へ" width="120" height="30" border="0"></a></div><div style="margin:12px 0 0 0;"><a href="http://town.higashikawa.hokkaido.jp/jp/topics/syussei_todoke/index.htm"><img src="/images/banner_birth01.gif" alt="新・出生届の概要へ" width="120" height="30" border="0"></a></div><div style="margin:20px 0 0 0;"><a href="http://www.welcome-higashikawa.jp/index.htm" target="_blank"><img src="/images/banner_kanko01.gif" alt="ひがしかわ道草情報" width="120" height="30" border="0"></a></div><div style="margin:12px 0 0 0;"><a href="http://www.kazokuryokoumura.jp/" target="_blank"><img src="/images/kitoushi.jpg" alt="キトウシ森林公園家族旅行村" width="120" height="30" border="0"></a></div><div style="margin:12px 0 0 0;"><a href="http://town.higashikawa.hokkaido.jp/tochi/" target="_blank"><img src="/images/banner_green01.gif" alt="宅地分譲" width="120" height="30" border="0"></a></div></div>');
}


//popup
function popup(pop_w,pop_h,target01){
	window.open('',target01,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+pop_w+',height='+pop_h+'');
	
}


//css mac
if(navigator.userAgent.indexOf("Mac")!=-1){
	document.write('<link href="/style/style_mac01.css" rel="stylesheet" type="text/css">');
}


//rollover
function rollover(rollover_name01,rollover_imgname01){
	if((document.images)&&(document.images[rollover_name01])){
		document.images[rollover_name01].src=rollover_imgname01;
	}
}


//season_month
var month01=new Date();
var month02="";
var season_month01="";
function season_month(){
	month02=(month01.getMonth()+1);
	if((month02==4)||(month02==5)){
		season_month01="imaging01";
	}else if((month02==6)||(month02==7)||(month02==8)){
		season_month01="imaging02";
	}else if((month02==9)||(month02==10)||(month02==11)){
		season_month01="imaging03";
	}else{
		season_month01="imaging04";
	}
	document.write('<img src="'+type01+season_month01+'.gif" width="1280" height="124" id="imaging02" usemap="#imaging_map01" class="image-margin01" alt=""><br>')
}

//season_month_pr
var month_pr01=new Date();
var month_pr02="";
var season_month_pr01="";
function season_month_pr(){
	month_pr02=(month_pr01.getMonth()+1);
	if((month_pr02==4)||(month_pr02==5)){
		season_month_pr01="pr_image_spring";
	}else if((month_pr02==6)||(month_pr02==7)||(month_pr02==8)){
		season_month_pr01="pr_image_summer";
	}else if((month_pr02==9)||(month_pr02==10)||(month_pr02==11)){
		season_month_pr01="pr_image_autumn";
	}else{
		season_month_pr01="pr_image_winter";
	}
	document.write('<img src="images/'+season_month_pr01+'.jpg" width="283" height="262" usemap="#pr01" alt="" name="end_image">')
}
//set object
function set_object(idsst){
	if(document.all){
		return document.all(idsst);
	}else if(document.getElementById){
		return document.getElementById(idsst);
	}
	return false;
}


//window inner size
var obj01=new Object();
function window_inner_size(id_name01){
	obj01=set_object(id_name01);
	if(document.all || (document.getElementById && (navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1))){
		obj01.width=document.body.clientWidth;
		obj01.height=document.body.clientHeight;
	}else if(document.layers || document.getElementById){
		obj01.width=document.body.clientWidth;
		obj01.height=document.body.clientHeight;
	}
	return obj01;
}


//image area
var image_area_width01=1280;
var image_left_margin01='0 0 0 -260px';
var browser_width01=760;
function image_area(){
	if (document.getElementById("imaging01")){
		window_inner_size('imaging01');
		if(obj01.width <= browser_width01){
			if(window.opera){
				if(type01=='swf'){
					document.getElementById("imaging02").style.margin='0';
				}else{
					document.getElementById("imaging02").style.margin=image_left_margin01;
				}
			}else if((document.all)&&(navigator.userAgent.indexOf("Win")!=-1)){
				document.all("imaging02").style.margin=image_left_margin01;
			}else if(navigator.userAgent.indexOf("Safari")!=-1){
				document.getElementById("imaging02").style.margin=image_left_margin01;
			}else if(document.getElementById){
				if(type01=='swf'){
					document.getElementById("imaging02").style.margin='0';
				}else{
					document.getElementById("imaging02").style.margin=image_left_margin01;
				}
			}
		}else{
			width02=image_area_width01-obj01.width;
			width03=Math.floor(width02/2);
			width04=Math.floor((width02/2)+width02%2);
			if(width03<0){
				width03=Math.abs(width03);
			}
			if(width04<0){
				width04=Math.abs(width04);
			}
			var style_detect01='0 -'+width03+'px 0 -'+width04+'px';
			if(window.opera){
				document.getElementById("imaging02").style.margin=style_detect01;
			}else if((document.all)&&(navigator.userAgent.indexOf("Win")!=-1)){
				document.all("imaging02").style.margin=style_detect01;
			}else if(navigator.userAgent.indexOf("Safari")!=-1){
				document.getElementById("imaging02").style.margin=style_detect01;
			}else if(document.getElementById){
				if(type01=='swf'){
					document.getElementById("imaging02").style.margin='0';
				}else{
					document.getElementById("imaging02").style.margin=style_detect01;
				}
			}
		}
	}
}


//topics_menu01
var topics_flag01=new Array();
var topics_menu02;
function topics_menu01(month_no){
	if((navigator.appName.charAt(0)=="M")&&(document.all)){
		topics_menu02=document.all("topics_menu"+month_no);
	}else{
		topics_menu02=document.getElementById("topics_menu"+month_no);
	}
	if(topics_flag01[month_no]==1){
		topics_menu02.style.display='none';
		topics_flag01[month_no]=0;
		rollover('topics_icon'+month_no,'/images/icon_plus01.gif');
	}else{
		topics_menu02.style.display='block';
		topics_flag01[month_no]=1;
		rollover('topics_icon'+month_no,'/images/icon_plus02.gif');
	}
	for(s=0;s<topics_flag01.length;s++){
		if(s!=month_no){
			if((navigator.appName.charAt(0)=="M")&&(document.all)){
				topics_menu03=document.all("topics_menu"+s);
			}else{
				topics_menu03=document.getElementById("topics_menu"+s);
			}
			if(topics_flag01[s]==1){
				topics_menu03.style.display='none';
				topics_flag01[s]=0;
				rollover('topics_icon'+s,'/images/icon_plus01.gif');
			}
		}
	}
}


function write_flash_image(){
	if(navigator.userAgent.indexOf("Safari")!=-1){
		string_flash01='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1280" height="220" id="imaging02" class="image-margin01"><param name="movie" value="swf/flash_image01.swf"><embed src="swf/flash_image01.swf" width="1280" height="220" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="imaging02" class="image-margin01"></embed></object>';
	}else{
		string_flash01='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1280" height="220" id="imaging02" class="image-margin01"><param name="movie" value="swf/flash_image01.swf"><embed src="swf/flash_image01.swf" width="1280" height="220" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="imaging02" class="image-margin01"></embed></object><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1280" height="220" id="imaging02" class="image-margin01"><param name="movie" value="swf/flash_image01.swf"><embed src="swf/flash_image01.swf" width="1280" height="220" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="imaging02" class="image-margin01"></embed></object></noscript>';
	}
	document.getElementById('imaging01').innerHTML=string_flash01;
	image_area();
}


//init

window.onresize=image_area;
if(!window.name){
	window.name = 'home01';
}