function chlang() {
	var menu = parent.menu.location.href;
	var bottom = parent.bottom.location.href;
	var main = parent.main.location.href;
	var endmenu = menu.length;
	var endbottom = bottom.length;
	var endmain = main.length;
	var i;
	var n;
	var found = 0;
	
	for(i = 0; i <= endbottom; i++) {
		n = i + 3;
		if (bottom.substring(i, n) == "chi") {			
			chbottom = bottom.substring(0, i) + "eng" + bottom.substring(n, endbottom);
			chmenu = menu.substring(0, i) + "eng" + menu.substring(n, endmenu);
			chmain = main.substring(0, i) + "eng" + main.substring(n, endmain);

			break;
		}
	}
	
	parent.menu.location.href = chmenu;
	parent.bottom.location.href = chbottom;
	parent.main.location.href = chmain;
}

function chframe(bottom, main) {
	parent.bottom.location= bottom;
	parent.main.location= main;
}

function same(page) {
	if (parent.menu.location != page) {
		parent.menu.location = page;
	}
}

function prevPage() {
	parent.main.history.go(-1);
}