var C = 0;
var str = '';
var ops = navigator.userAgent;
if(navigator.appName.charAt(0) == "M"){
	if(navigator.appVersion.charAt(0) < 4){
		location.href = "../error.html";
	}else{
		var appv = navigator.appVersion;
		if(appv.indexOf("MSIE")){
			var va = appv.charAt(appv.indexOf("MSIE") + 5);
			if(va == 4){ location.href = "../error.html"; }
			if(navigator.platform.substr(0,3) != "Mac"){
				if(va == 5){ str += "table{ font-size:12px; }\ndiv.sitemenu li{ height:28px; }\ndiv.submenu li{ float:left; }\n"; }
			}
		}
	}
}else{
	str += "input{ line-height:100%; }\n";
}
if(navigator.platform.substr(0,3) == "Mac"){
	if(ops.indexOf("MSIE") == -1){
		if(ops.indexOf("Safari") == -1){
			if(ops.indexOf("Opera") == -1){ str += "body{ font-size:85%; }\n"; }
			else{ str += "body{ font-size:75%; }\n"; }
		}else{
			str += "body{ font-size:70%; }\n";
		}
	}else if(ops.indexOf("Opera")){
		str += "body{ font-size:75%; }\n";
	}
}
if(str != ""){
	document.write("<style type='text/css'><!--\n" + str + "-->\n</style>\n");
}
var ya1 = new Image();
ya1.src = "./img/ya1.png";
var ya2 = new Image();
ya2.src = "./img/ya2.png";
var bpht1 = new Array();
var bpht2 = new Array();
for(var i=1;i<=5;i++){
	bpht1[i] = new Image();
	bpht1[i].src = "./img/b" + i + ".png";
	bpht2[i] = new Image();
	bpht2[i].src = "./img/bb" + i + ".png";
}
var tbpht1 = new Array();
var tbpht2 = new Array();
for(var i=1;i<=5;i++){
	tbpht1[i] = new Image();
	tbpht1[i].src = "./img/tb" + i + ".png";
	tbpht2[i] = new Image();
	tbpht2[i].src = "./img/tbb" + i + ".png";
}
var myDate = new Date();
var cnts = new Image();
cnts.src = "./cnt/count.php?b=" + myDate.getTime();
function colChg1(nb){
	var mtd = "stp" + nb;
	document.getElementById(mtd).src = ya1.src;
}
function colChg2(nb){
	var mtd = "stp" + nb;
	document.getElementById(mtd).src = ya2.src;
}
function bChg1(nb){
	var mtd = "mb" + nb;
	document.getElementById(mtd).src = bpht1[nb].src;
}
function bChg2(nb){
	var mtd = "mb" + nb;
	document.getElementById(mtd).src = bpht2[nb].src;
}
function tChg1(nb){
	var mtd = "tb" + nb;
	document.getElementById(mtd).src = tbpht1[nb].src;
}
function tChg2(nb){
	var mtd = "tb" + nb;
	document.getElementById(mtd).src = tbpht2[nb].src;
}