﻿
function ChangeImageOver(name)
{
	document.images[name].src = "images/"+name+"_on.gif";
}

function ChangeImageOut(name)
{
	document.images[name].src = "images/"+name+"_off.gif";
}

function SwitchLang(obj)
{
	address = document.location.href;
	language = obj.options[obj.selectedIndex].value;
	
	if (address.indexOf("/en/")>=0){
		newurl = address.replace("/en/","/"+language+"/");
	}
	if (address.indexOf("/sc/")>=0){
		newurl = address.replace("/sc/","/"+language+"/");
	}
	if (address.indexOf("/kr/")>=0){
		newurl = address.replace("/kr/","/"+language+"/");
	}
	document.location.href=newurl;
}

function PopUp(url, w, h)
{
	npop = window.open(url,'popwin','width='+w+',height='+h+',menubar=no,status=no,scrollbars=no,resizable=no,toolbar=no,location=no,directories=no')
}

function changeCase(cs)
{
	hideAllCases();
	displayCases(cs,true);
}

function displayCases(layerName, dis){
	
	var obj;
	if (document.all) {//For I.E.
		obj = document.all[layerName].style;
		obj.display = dis ? "inline" : "none";
	}
	else if (document){//For Netscape or FireFox
		obj = document.getElementById(layerName).style;
		obj.display = dis ? "inline" : "none";
	}
	if(dis){
		document.images["tab_"+layerName].src="images/"+"tab_"+layerName+"_on.gif";
	}
	else{
		document.images["tab_"+layerName].src="images/"+"tab_"+layerName+"_off.gif";
	}
	
}	

function hideAllCases(){
	
	for (var j=0; j < csArray.length; j++) {		
		displayCases(csArray[j], false);		
	}
}

function go(){ //for jump menu
	document.location.href=document.getElementById('lang').value;
}
