// JavaScript Document
var br;
var ver;
hantei();

function sendMail(){
	document.location="mailto:tatikoma1945-ai@yahoo.co.jp";
}

function writeCounter(){
	var ref=document.referrer;
	ref=ref.replace(/=/g,'*-*');
	ref=ref.replace(/\?/g,'**');
	var st='<iframe src="http://www.hobby-room.info/cgi/kaiseki/counter2.cgi" frameborder="0" height="65" width="265"></iframe>';
	document.write(st);
}

function hantei(){
	st=window.navigator.userAgent;
	var index=st.indexOf('MSIE');
	var AA;
	if(index>-1){
		br='ie';
		AA=st.indexOf(';',index);
		ver=parseFloat(st.substr(index+5,AA-index-5));
	}else if(st.indexOf('Firefox')){
		br='firefox';
		index=st.indexOf('Firefox');
		ver=parseFloat(st.substr(index+8));
	}else if(st.indexOf('Opera')){
		br='opera';
		index=st.indexOf('Opera');
		ver=parseFloat(st.substr(index+6,st.indexOf(' ',index+7)));
	}
}

function mySiteSearchClick(mySiteBtn){
	var webBtn;
	var webForm;
	var mySiteForm;
	if((br=='ie')&&(ver<5)){
		webBtn=document.all('webSearch_btn');
		webForm=document.all('webSearchForm');
		mySiteForm=document.all('mySiteSearchForm');
	}else{
		webBtn=document.getElementById('webSearch_btn');
		webForm=document.getElementById('webSearchForm');
		mySiteForm=document.getElementById('mySiteSearchForm');
	}
	mySiteBtn.style.cursor='default';
	mySiteBtn.style.color='#336600';
	mySiteBtn.style.backgroundColor='#ffffff';
	webBtn.style.cursor='pointer';
	webBtn.style.color='#ffffff';
	webBtn.style.backgroundColor='#336600';
	mySiteForm.style.display='block';
	webForm.style.display='none';
}

function webSearchClick(webBtn){
	var mySiteBtn;
	var webForm;
	var mySiteForm;
	if((br=='ie')&&(ver<5)){
		mySiteBtn=document.all('mySiteSearch_btn');
		webForm=document.all('webSearchForm');
		mySiteForm=document.all('mySiteSearchForm');
	}else{
		mySiteBtn=document.getElementById('mySiteSearch_btn');
		webForm=document.getElementById('webSearchForm');
		mySiteForm=document.getElementById('mySiteSearchForm');
	}
	mySiteBtn.style.cursor='pointer';
	mySiteBtn.style.color='#ffffff';
	mySiteBtn.style.backgroundColor='#336600';
	webBtn.style.cursor='default';
	webBtn.style.color='#336600';
	webBtn.style.backgroundColor='#ffffff';
	mySiteForm.style.display='none';
	webForm.style.display='block';
}



		