function lang_change(lang) {
	re1 = /\/(en|b5|gb|jp)\//;
	var str = document.location.href;
	var found = str.match(re1);
	//~ alert (found[1]);

	if (found[1] && found[1] != lang) { // found, and not the same language
		var f = top.window.frames;
		if (f.length){
			//~ alert ("frameset");
			for (var i=0; i<f.length; i++) {
				var temp_loc = top.frames[i].document.location.toString();
				var new_loc = temp_loc.replace(found[1], lang);
				top.frames[i].document.location = new_loc;
			}
		}else {
			//~ alert ("No frameset");
			var temp_loc = top.document.location.toString();
			var new_loc = temp_loc.replace(found[1], lang);
			//~ alert ("temp_loc: " + temp_loc);
			//~ alert ("new_loc: " + new_loc);
			top.document.location = new_loc;
		}
	}
}
