String.prototype.stripViet=function()
{
	var stripped_str=this;
	var viet=[];
	i=0;
	viet[i++]=new Array('a',"/á|à|&#7843;|ã|&#7841;|&#259;|&#7855;|&#7857;|&#7859;|&#7861;|&#7863;|â|&#7845;|&#7847;|&#7849;|&#7851;|&#7853;/g");
	viet[i++]=new Array('o',"/ó|ò|&#7887;|õ|&#7885;|&#417;|&#7899;|&#7901;|&#7903;|&#7905;|&#7907;|ô|&#7889;|&#7891;|&#7893;|&#7895;|&#7897;/g");
	viet[i++]=new Array('e',"/é|è|&#7867;|&#7869;|&#7865;|ê|&#7871;|&#7873;|&#7875;|&#7877;|&#7879;/g");
	viet[i++]=new Array('u',"/ú|ù|&#7911;|&#361;|&#7909;|&#432;|&#7913;|&#7915;|&#7917;|&#7919;|&#7921;/g");
	viet[i++]=new Array('i',"/í|ì|&#7881;|&#297;|&#7883;/g");
	viet[i++]=new Array('y',"/ý|&#7923;|&#7927;|&#7929;|&#7925;/g");
	viet[i++]=new Array('d',"/&#273;/g");
	for(var i=0;i<viet.length;i++)
	{
		stripped_str=stripped_str.replace(eval(viet[i][1]),viet[i][0]);
		stripped_str=stripped_str.replace(eval(viet[i][1].toUpperCase().replace('G','g')),viet[i][0].toUpperCase())
	}
	return stripped_str.replace(/\s/g,' ')
};
document.onload = replaceVietChar();
function replaceVietChar()
{
	var arrCatTitle = document.getElementsByName('catlink');
	var CatTitle = '';

	if(typeof(arrCatTitle[0]) != 'undefined')
	{
		for(var i=0; i<=arrCatTitle.length; i++)
		{
			if(typeof(arrCatTitle[i]) != 'undefined')
			{
				arrCatTitle[i].href = decodeURI(arrCatTitle[i].href).stripViet();
			}
		}
	}
}