//
var LayFlag = "";
var vNum = getBrowserVersion();
var bName = navigator.appName.charAt(0);

// init
function doLayer(flag){
	initM();
	if(flag == 1){
		LayFlag = 1;
	}
}

function getBrowserVersion(){
	str = navigator.appName.toUpperCase();
	version = 0;
	appVer  = navigator.appVersion;
	if (str.indexOf("NETSCAPE") >= 0){
		s = appVer.indexOf(" ",0);
		version = eval(appVer.substring(0,s));
		if (version >= 5) version++;
	}
	if (str.indexOf("MICROSOFT") >= 0){
		appVer  = navigator.userAgent;
		s = appVer.indexOf("MSIE ",0) + 5;
		e = appVer.indexOf(";",s);
		version = eval(appVer.substring(s,e));
	}
	return version;
}

function HideNavi(l) {
	if(LayFlag == 1){
		if( bName == "M"){
			document.all[l].style.visibility = "hidden";
		}else{
			if( vNum < 5 ){
				document.layers[l].visibility = "hide";
			}else if( vNum >= 5 ){
				document.getElementById(l).style.visibility = "hidden";
			}
		}
	}
}

function ShowNavi(l){
	if(LayFlag == 1){
		if( bName == "M"){
			document.all[l].style.visibility = "visible";
		}else{
			if( vNum < 5 ){
				document.layers[l].visibility = "show";
			}else if( vNum >= 5 ){
				document.getElementById(l).style.visibility = "visible";
			}
		}
	}
}

function imgC(obj)
{
	var fpath = obj.src;
	if( fpath.match(/_on/) ){
		obj.src = fpath.replace(/_on/,'');
	}else{
		if( fpath.match(/png/) ){
			obj.src = fpath.replace(/.png/,'_on.png');
		}
		if( fpath.match(/jpg/) ){
			obj.src = fpath.replace(/.jpg/,'_on.jpg');
		}
		if( fpath.match(/gif/) ){
			obj.src = fpath.replace(/.gif/,'_on.gif');
		}
	}
}

function imgCM( obj )
{
	if( key != obj.name )
	{
		imgC(obj);
	}
}
// ??ij[pFTChirj
function imgCS( obj )
{
	if( keys != obj.name )
	{
		imgC(obj);
	}
}

function imgCN(imgPath,key){
	obj = document.images[key];
	on_image = new Image();
	on_image.src = imgPath;
	obj.src = on_image.src;
}

function initM()
{
	obj = document.images[key];
	if( obj )
	{
		imgC(obj);
	}
}


function popWin(newFile,winName){
sub1=window.open(newFile,winName,"scrollbars=no,resizable=no,menubar=no,directories=no,status=no,location=no,width=532,height=690");
}

function popWin2(newFile,winName){
sub1=window.open(newFile,winName,"scrollbars=no,resizable=no,menubar=no,directories=no,status=no,location=no,width=545,height=690");
}

