// タブの個数設定
var tabLength = 9999;


// タブ切り替え関数
function changeTab(x){ 
// HTMLソースを引数に格納
var str =  document.body.innerHTML;

for(i=0; i< tabLength; i++){
// 引数に格納したHTMLソースの文字列を判定 → IDタブがなくなったら処理中断
	if(str.indexOf("tab" + i)== -1){
 break;
	}

// 全てのIDタブを非表示
	document.getElementById("tab"+ i).style.display = "none";
}

// 該当IDタブのみ表示
	document.getElementById("tab"+ x).style.display = "block";
	
	//IE6 only
	
	if (Prototype.Browser.IE) {
		
		Element.setStyle($("footer"), { 
	        'position':'absolute',
			'bottom' : 'auto'
	    });
		Element.setStyle($("footer"), { 
	        'position':'absolute',
			'bottom' : '0px'
	    }); 
		//var btNum = Position.page($("footer"));
		//window.innerHeight;
		//alert("footerの Y座標 = " + btNum[1] + " / ウインドウ高さ" + );
	}
}