// JavaScript Document

//HTML5のIE対応
document.createElement( 'header' );
document.createElement( 'section' );
document.createElement( 'nav' );
document.createElement( 'aside' );
document.createElement( 'footer' );
document.createElement( 'article' );

//オンロードイベント
function tableStripe(){

	
	//バックナンバーテーブルの縞模様
	var trObj = document.getElementsByTagName("tr");
	for(i=1;i < trObj.length ; i++){
		 if((i % 2) == 0){
			if(trObj[i].parentNode.tagName == "THEAD"){
				
			}else{
				trObj[i].className = "stripe";
			}
		 }
	}
	
	document.getElementById("totopimg").onmouseover = function(){
		this.src = this.src.replace("off","on");
		
	}
	document.getElementById("totopimg").onmouseout = function(){
		this.src = this.src.replace("on","off");
	}
	
	
	//オンマウス
	var imgObj = document.getElementsByTagName("img");
	for(i=1;i < imgObj.length ; i++){
		 if(imgObj[i].className == "btn"){
			//OFFを検索しONにする
			 
			imgObj[i].onmouseover = function(){
				this.src = this.src.replace("-off","-on");
				
			}
			imgObj[i].onmouseout = function(){
				this.src = this.src.replace("-on","-off");
			}
		 }
		 
	}
	

}

onload = function(){
	tableStripe();
}
