window.onload=function() {

	if(location.search.length == 0) return;

	id=["header","beta","print_button"];
	for(i=0;i<id.length;i++){
		div=document.getElementById(id[i]);
		div.style.display="none";
	}
	
	var contents=document.getElementById("contents");
	with(contents.style) {
		//margin="0px 0px 0px 30px";
		margin="0px"
		lineHeight="160%";
	}
	
	elem=document.getElementById("bg-image");
	with (elem.style) {
		width="100%";
		margin="0px";
		border="none";
		backgroundColor="#fff";
		backgroundImage="none";
	}
	
	varBody=document.getElementsByTagName("body");
	with(varBody[0].style) {
		fontFamily="ＭＳ Ｐ明朝,平成明朝";
		fontSize="11pt";
		background="#fff";
	}
		
	var a=document.getElementsByTagName("a");
	for(i=0; i<a.length; i++){
		with(a[i].style) {
			color="#000";
			textDecoration="underline";
		}
	}
	
	//見出し
	h1=document.getElementsByTagName("h1")
	for (i=0;i<h1.length;i++) {
		with (h1[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="160%";
			color="black";
			margin="20px 0px 30px 0px";
			padding="0px 0px 2px 15px";
			lineHeight="200%";
			background="none";
			borderBottom="3px #000 double";
			borderTop="3px #000 double";
		}
	}
	
	h2=document.getElementsByTagName("h2")
	for (i=0;i<h2.length;i++) {
		with (h2[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="100%";
			color="#000";
			fontWeight="bold";
			margin="25px 20px 8px 0px";
			paddingLeft="10px";
			height="11pt";
			lineHeight="11pt";
			backgroundImage="none";
			borderBottom="1px #666 dotted";
			borderLeft="11pt solid #666"; 
		}
	}
	
	h2=getElementsByClass("sub_tit")
	for (i=0;i<h2.length;i++) {
		with (h2[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="110%";
			color="black";
			fontWeight="bold";
			margin="35px 10px 8px 0px";
			//margin="35px 10px 8px -15px";
			paddingLeft="10px";
			height="1.5em";
			lineHeight="25px";
			backgroundColor="#fff";
			border="1px #000 solid";
		}
	}

	aa=getElementsByClass("mado_b")
	for (i=0;i<aa.length;i++) {
		with (aa[i].style) {
			display="none";
		}
	}

	
	h3=document.getElementsByTagName("h3")
	for (i=0;i<h3.length;i++) {
		with (h3[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="100%";
			color="#000";
			fontWeight="bold";
			margin="25px 20px 8px 0px";
			paddingLeft="10px";
			height="11pt";
			lineHeight="11pt";
			backgroundImage="none";
			borderBottom="1px #666 dotted";
			borderLeft="11pt solid #666"; 
		}
	}

	h3=getElementsByClass("sub_tit2")
	for (i=0;i<h3.length;i++) {
		with (h3[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="110%";
			color="black";
			fontWeight="bold";
			margin="35px 10px 8px 0px";
			//margin="35px 10px 8px -15px";
			paddingLeft="10px";
			height="1.5em";
			lineHeight="25px";
			backgroundColor="#fff";
			border="1px #000 solid";
		}
	}
	
	h4=document.getElementsByTagName("h4")
	for(i=0; i<h4.length; i++) {
		with(h4[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="100%";
			color="#000";
			fontWeight="normal";
			backgroundColor="#fff";
			padding="1px 8px";
			borderColor="#666";
			borderStyle="solid";
			borderWidth="1px 6px";
			display="inline";
		}
	}
	
	h5=document.getElementsByTagName("h5")
	for(i=0; i<h5.length; i++) {
		with(h5[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="100%";
			color="#000";
			fontWeight="bold";
			padding="2px 5px";
			backgroundColor="#fff";
			borderBottom="1px solid #000";
			display="inline";
		}
	}
	
	h6=document.getElementsByTagName("h6")
	for(i=0; i<h6.length; i++) {
		with(h6[i].style) {
			fontFamily="Osaka, ＭＳ Ｐゴシック, MS UI Gothic, sans-serif";
			fontSize="100%";
			color="#000";
			fontWeight="bold";
			padding="2px 5px";
			border="none";
		}
	}
	
	id=["alpha","siryoukan-alpha"];
	for(i=0;i<id.length;i++) {
		div=document.getElementById(id[i]);
		if (div) {
			with(div.style) {
				margin="0px";
				width="100%";
			}
		}
	}
	
	cName=document.getElementsByTagName("div");
	for(i=0; i<cName.length; i++) {
		if(cName[i].className=="navigation-menu") {
			var parentID=cName[i].parentNode.parentNode.id;
			if(parentID=="footer") cName[i].style.display="none";
		}
	}
	
	var copyright=document.getElementById("copyright");
	with(copyright.style) {
		backgroundColor="#ffffff";
		color="#000000";
		marginTop="20px";
		borderTop="solid 1px #000000";
	}

	var mado_button=document.getElementById("mado_button");
	if(mado_button) mado_button.style.display="none";
	}

function getElementsByClass(searchClass) {

   if (document.all) {
        var classElements = new Array();
        var allElements = document.all;
            for (i = 0, j = 0; i < allElements.length; i++) {
                if (allElements[i].className == searchClass) {
                    classElements[j] = allElements[i];
                    j++;
                }
            }   
   } else if (document.getElementsByTagName) {
        var classElements = new Array();
        var allElements = document.getElementsByTagName("*");
            for (i = 0, j = 0; i < allElements.length; i++) {
                if (allElements[i].className == searchClass) {
                    classElements[j] = allElements[i];
                    j++;
                }
            }       
   } else {
      return;
   }

    return classElements;
}

 
