// 別ウインドウを大きさ指定をして開く機能
function subwindow01() {
	open_window01 = window.open("mail.html", "new","width=200,height=200,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no","_blank")
	open_window01.focus();
	}
function subwindow02() {
	open_window02 = window.open("../mail.html", "new","width=200,height=200,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no","_blank")
	open_window02.focus();
	}

	
// クローズボタンでウインドウを閉じる機能
function closeWindow() {
	window.close()
}

function menufirst(){
document.write('<img src="imgs/blank.gif" width="1" height="133" alt=""><br>');
document.write('<a href="../contents/yurai.html"><img src="../imgs/left_btn02.gif" width="140" height="27" alt="静岡まつりの由来" border="0"><br></a>');
document.write('<img src="../imgs/left_img02.gif" width="140" height="7" alt=""><br>');
document.write('<a href="../51th/index.html"><img src="../imgs/left_btn03.gif" width="140" height="27" alt="今年のまつり予定" border="0"><br></a>');
document.write('<img src="../imgs/left_img02.gif" width="140" height="7" alt=""><br>');
document.write('<a href="../50th/index.html"><img src="../imgs/left_btn09.gif" width="140" height="27" alt="過去（第50回）の様子" border="0"><br></a>');
document.write('<img src="../imgs/left_img02.gif" width="140" height="7" alt=""><br>');
document.write('<a href="../49th/index.html"><img src="../imgs/left_btn08.gif" width="140" height="27" alt="過去（第49回）の様子" border="0"><br></a>');
document.write('<img src="../imgs/left_img04.gif" width="140" height="7" alt=""><br>');
document.write('<a href="http://www.shizuokamatsuri.com/blog/" target="_blank"><img src="../imgs/left_btn10.gif" width="140" height="27" alt="各種募集要項" border="0"><br></a>');
document.write('<img src="../imgs/left_img04.gif" width="140" height="7" alt=""><br>');
document.write('<a href="../contents/waza.html"><img src="../imgs/left_btn05.gif" width="140" height="27" alt="技の会" border="0"><br></a>');
document.write('<img src="../imgs/left_img04.gif" width="140" height="7" alt=""><br>');
document.write('<a href="../mail/index.html"><img src="../imgs/left_btn06.gif" width="140" height="27" alt="問い合わせ" border="0"><br></a>');
document.write('<img src="../imgs/left_img06.gif" width="140" height="21" alt=""><br>');
document.write('<a href="../index.html"><img src="../imgs/left_btn07.gif" width="140" height="30" alt="TOPページ" border="0"><br></a>');
document.write('<img src="../imgs/left_img07.gif" width="140" height="23" alt=""><br>');
document.write('<img src="../imgs/left_img08.jpg" width="140" height="502" alt=""><br>');
document.write('<img src="../imgs/blank.gif" width="1" height="20" alt=""><br>');
}


  //ページスクロール

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)?80:-80;
}else{
moveValue = Math.round(restScroll/2);
}
// スクロールを処理
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;
}




