/*

*/
function chg(imgname) {
	if (navigator.appVersion > "3") {
		imgnum = new Image();
		imgpath = document.images[imgname].src;

		if( imgpath.indexOf("_on.gif") >= 0 ){
			imgpath = imgpath.replace("_on.gif", ".gif");
		}else if( imgpath.indexOf("_on.jpg") >= 0 ){
			imgpath = imgpath.replace("_on.jpg", ".jpg");
		}else if( imgpath.indexOf(".gif") >= 0 ){
			imgpath = imgpath.replace(".gif", "_on.gif");
		}else{
			imgpath = imgpath.replace(".jpg", "_on.jpg");
		}

		imgnum.src = imgpath;
		document.images[imgname].src = imgnum.src;
	}
}

function lnview(id) {
	if (navigator.appVersion > "3") {
		id2 = id.substr(0, id.indexOf("t", 0))+"s";
		cls = document.getElementById(id).className; /* 現状のclsを取得 */
		cls2 = document.getElementById(id2).className; /* 現状のclsを取得 */
		if( cls.indexOf("on") >= 0 ){ /* 現状のclsからonを引いてofを足したものをclsとする */
			onid = cls.indexOf("on", 0);
			cls = cls.substr(0, onid);
			cls = cls+"of";
			onid = cls2.indexOf("on", 0);
			cls2 = cls2.substr(0, onid);
			cls2 = cls2+"of";
		}else{ /* 現状のclsにofを引いてonを足したものをclsとする */
			onid = cls.indexOf("of", 0);
			cls = cls.substr(0, onid);
			cls = cls+"on";
			onid = cls2.indexOf("of", 0);
			cls2 = cls2.substr(0, onid);
			cls2 = cls2+"on";
		}
		document.getElementById(id).className = cls; /* 新しいclsを代入 */
		document.getElementById(id2).className = cls2; /* 新しいclsを代入 */
	}
}

