function ChangeLang(lang1, lang2)
{	//if (lang == "eng")
	//{	parent.topFrame.location = replace(parent.topFrame.location.toString(), "/eng/","/chi/");
	//	parent.mainFrame.location = replace(parent.mainFrame.location.toString(), "/eng/","/chi/");
	//	parent.bottomFrame.location = replace(parent.bottomFrame.location.toString(), "/eng/","/chi/");
	//}
	//if (lang == "chi")
	//{	parent.topFrame.location = replace(parent.topFrame.location.toString(), "/chi/","/eng/");
	//	parent.mainFrame.location = replace(parent.mainFrame.location.toString(), "/chi/","/eng/");
	//	parent.bottomFrame.location = replace(parent.bottomFrame.location.toString(), "/chi/","/eng/");
	//}
	lang1 = "/" + lang1 + "/";
	lang2 = "/" + lang2 + "/";
	
	topLoc = replace(parent.topFrame.location.toString(), lang1,"/nwcctmp/");
	topLoc = replace(topLoc, "/nwcctmp/", lang2);
	
	mainLoc = replace(parent.mainFrame.location.toString(), lang1, "/nwcctmp/");
	mainLoc = replace(mainLoc,"/nwcctmp/", lang2);
	
	botLoc = replace(parent.bottomFrame.location.toString(), lang1,"/nwcctmp/");
	botLoc = replace(botLoc, "/nwcctmp/", lang2);

	parent.topFrame.location = topLoc;
	parent.mainFrame.location = mainLoc;
	parent.bottomFrame.location = botLoc;
	
	
}

function replace(haystack, oldNeedle, newNeedle) {
    i = haystack.indexOf(oldNeedle);
    r = "";
    if (i == -1) return haystack;
    r += haystack.substring(0,i) + newNeedle;
    if (i + oldNeedle.length < haystack.length)
        r += replace(haystack.substring(i + oldNeedle.length, haystack.length), oldNeedle, newNeedle);
    return r;
    }