// create image object
if (document.images) {
	
	lang_off = new Image();
	lang_off.src = "../images/chi_off.gif";
	lang_on = new Image();
	lang_on.src = "../images/chi_on.gif";

	worldwide_off = new Image();
	worldwide_off.src = "../images/worldwide_off.gif";
	worldwide_on = new Image();
	worldwide_on.src = "../images/worldwide_on.gif";

	sitemap_off = new Image();
	sitemap_off.src = "../images/sitemap_off.gif";
	sitemap_on = new Image();
	sitemap_on.src = "../images/sitemap_on.gif";

	home_off = new Image();
	home_off.src = "../images/home_off.gif";
	home_on = new Image();
	home_on.src = "../images/home_on.gif";	
	
	about_off = new Image();
	about_off.src = "../images/about_off.gif";
	about_on = new Image();
	about_on.src = "../images/about_on.gif";	
	
	food_off = new Image();
	food_off.src = "../images/food_off.gif";
	food_on = new Image();
	food_on.src = "../images/food_on.gif";
	
	kid_off = new Image();
	kid_off.src = "../images/kid_off.gif";
	kid_on = new Image();
	kid_on.src = "../images/kid_on.gif";	
	
	career_off = new Image();
	career_off.src = "../images/career_off.gif";
	career_on = new Image();
	career_on.src = "../images/career_on.gif";	

	subnav1_off = new Image();
	subnav1_off.src = "images/subnav1_off.gif";
	subnav1_on = new Image();
	subnav1_on.src = "images/subnav1_on.gif";			

	subnav2_off = new Image();
	subnav2_off.src = "images/subnav2_off.gif";
	subnav2_on = new Image();
	subnav2_on.src = "images/subnav2_on.gif";			

	subnav3_off = new Image();
	subnav3_off.src = "images/subnav3_off.gif";
	subnav3_on = new Image();
	subnav3_on.src = "images/subnav3_on.gif";			

	subnav4_off = new Image();
	subnav4_off.src = "images/subnav4_off.gif";
	subnav4_on = new Image();
	subnav4_on.src = "images/subnav4_on.gif";			

	subnav5_off = new Image();
	subnav5_off.src = "images/subnav5_off.gif";
	subnav5_on = new Image();
	subnav5_on.src = "images/subnav5_on.gif";			

}

// function to change images when mouse over
function ChangeImageOver(img) {
	if (document.images)
		document.images[img].src = eval(img + "_on.src")
}

// function to change images when mouse out
function ChangeImageOut(img) {
	if (document.images)
		document.images[img].src = eval(img + "_off.src")
}

// function to change version
function changever(){
	address = document.location.href;
	if (address.indexOf("chinese")>=0){
		newurl = address.replace("chinese","english");
	}
	if (address.indexOf("english")>=0){
		newurl = address.replace("english","chinese");
	}
	if (newurl.indexOf("#")>=0){
		//newurl = newurl.replace("/#","");
		newurl = newurl.substring(0,newurl.indexOf("#"))
	}
	document.location.href=newurl;
}
