var ops = navigator.userAgent;
var isIE  = (ops.indexOf("MSIE") != -1) ? true : false;
var isWin = (ops.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (ops.indexOf("Opera") != -1) ? true : false;
var isSafari = (ops.indexOf("AppleWebKit") != -1) ? true : false;
var dame = false;
if(!isWin){
	if(isIE){ dame = true; }
	if(isOpera && eval(ops.charAt(ops.indexOf("Opera") + 6)) < 9){ dame = true; }
}
var hitnb = alph = 0;
var mhit,animeID;

function bChg1(nb){
	if(!isWin && isIE){ return; }
	if(nb == hitnb){ init(); }
}
function bChg2(nb){
	if(!isWin && isIE){ return; }
	hitnb = nb; alph = 0;
	animeID = setInterval("moveDraw()",50);
}
function moveDraw(){
	if(hitnb == 0){ return; }
	if(alph < 100){
		mhit = document.getElementById("mhit");
		alph += 10;
		mhit.style.top = "79px";
		mhit.style.left = (hitnb - 1) * 156 + "px";
		if(isWin && isIE){ mhit.filters[0].opacity = alph; }
		else if(isOpera){ mhit.style.opacity = alph/100; }
		else if(isSafari){ mhit.style.KhtmlOpacity = alph/100; }
		else{ mhit.style.MozOpacity = alph/100; }
	}else{
		if(animeID){ clearInterval(animeID); }
	}
}
function init(){
	mhit = document.getElementById("mhit");
	mhit.style.top = mhit.style.left = "0px";
	if(isWin && isIE){ mhit.filters[0].opacity = 0; }
	else if(isOpera){ mhit.style.opacity = 0; }
	else if(isSafari){ mhit.style.KhtmlOpacity = 0; }
	else{ mhit.style.MozOpacity = 0; }
	hitnb = 0;
	if(animeID){ clearInterval(animeID); }
}
if(!isWin){
	var txt = "body{ font-size:12px; }\n.em{ color:#000; }\n";
	if(isSafari){
		txt += "input.cbtns{ padding:0; }\ninput.cbtns2{ padding:0; }\ninput.cbtns3{ padding:0; }\n";
	}
	if(dame){ txt += "#header #mhit{ visibility:hidden; }\n"; }
	document.write("<style type='text/css' media='screen'><!--\n" + txt + "-->\n</style>\n");
}
if(ops.indexOf("Windows NT") != -1){
	if(eval(ops.charAt(ops.indexOf("Windows NT") + 11)) > 5){
		document.write("<style type='text/css'><!--\nbody{ font-size:78%; }\n-->\n</style>\n");
	}
}