function setActive()
{
	var loca = document.location.href;
	
	var xx = loca.match(/(\w+(\.html|\.htm|\.php))/);
	if(xx)
	{
		var file_name = RegExp.$1;
		
		if(file_name.search(/index/i) != -1)
		{
			file_name = "";
		}
	}
	else
	{
		file_name = "";
	}
	
	var tmp = loca.split("/");
	tmp.pop();
	loca = tmp.join("/");
	
	loca1 = loca + "/";
	loca2 = loca1 + file_name;
	
	flag = false;
	var aObj = document.getElementById("global_main_menu").getElementsByTagName("a");
	for(i = 0; i < aObj.length; i++)
	{
		if(loca2 == aObj[i].href)
		{
			aObj[i].className += "_active";
			flag = true;
		}
	}
	
	if(flag == false)
	{
		for(i = 0; i < aObj.length; i++)
		{
			if(loca1 == aObj[i].href)
			{
				aObj[i].className += "_active";
				flag = true;
			}
		}
	}
}
