/*
Standards Compliant Rollover Script
Author : Daniel Nolan
http://www.bleedingego.co.uk/webdev.php
*/

/* Rollover Menu */

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'btn') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_on'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_on'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;

function showMenu(id_menu){
var my_menu = document.getElementById(id_menu);
if(my_menu.style.display=="none" || my_menu.style.display==""){
my_menu.style.display="block";
} else {
my_menu.style.display="none";
}
}

/* フォントサイズ指定 */
document.write("<STYLE TYPE='text/css'>")
if(navigator.appVersion.indexOf("Mac") > 1){
	// MAC IE NN
	document.write(".j10{font-size:10px; line-height:13px}")
	document.write(".j12{font-size:12px; line-height:16px}")
	document.write(".j30{font-size:30px}")
	document.write(".text{font-size:14px; line-height:19px}")
}
else{
	if(navigator.appName.charAt(0) == "M"){
	// WIN IE
	document.write(".j10{font-Size:11px; line-height:13px}")
	document.write(".j12{font-Size:12px; line-height:16px}")
	document.write(".j30{font-size:30px}")
	document.write(".text{font-size:14px; line-height:17px}")
	}
	else{
	// WIN NN
	document.write(".j10{font-Size:11px; line-height:13px}")
	document.write(".j12{font-Size:12px; line-height:16px}")
	document.write(".j30{font-size:32px}")
	document.write(".text{font-size:15px; line-height:18px}")
	}
}
document.write("a:active{text-decoration:none}");
document.write("a:hover {  color: #FF0000}");	

document.write("</STYLE>");	


