	// ------------------------------------------------------------------------------------
	// Sasaki-san, 
	// Simon has made a request to display the language menu in japanese for the 
	// Japanese site. Can you change variables in the LOCALIZATION section below
	//  to Japanese characters, and save this file as UTF-8
	// Then test to see if it works?  (Let's try utf-8 first, then other charsets if UTF-8 doesn't translate)
	//  ------------------------------------------------------------------------------------

languageArray = [
						{
						"language":"en",
						"text":"'英語 ",
						"flagURL":"http://www.synfora.com/images/flags/flag_us.gif",
						"URL":"http://www.synfora.com"
						},
						{
						"language":"jp",
						"text":"'日本語",
						//"flagURL":"http://www.synfora.com/images/flags/flag_japan.gif",
						"flagURL":"http://www.synfora.com/images/flags/flag_japan_lg.gif",
						"URL":"http://www.synfora.com/jp"
						}
					]


function addLanguageMenu (language) {
	if (($("#homepage09").length)) {  // changing layout for new home page
		
		addLanguageMenu_newHomePage09(language);
		return false;
	}
	$('body').prepend('<div id="language"></div>');
	$('#language').css({
		"width": "675px",
		"height": "25px",
		"margin-right": "auto",
		"margin-left": "auto",
		//"padding-top": "5px",
		"padding-bottom": "10px",
		"text-align": "right",
		"text-decoration": "none"
		}).append('<div>&nbsp;&nbsp;<a id = "languageLink"><img></a></div>');
	$('#language div').css({"float":"right","marginTop":"10px","height":"14px", "verticalAlign":"bottom"});
	
	$.each(languageArray, function(i, val){
		if (val.language == language) {
			$('#languageLink').prepend(val.text+"&nbsp;").attr("href", val.URL).css({"fontFamily":"Arial","fontSize":"10px","textDecoration":"none", "color":"#666666"});
			$('#languageLink img').attr("src", val.flagURL).css({"border":"solid","borderColor":"#cccccc", "borderWidth":"1px"});
		}
	});
	if ($("#synfora_homepageContainer").length) {
		$('#language').css({"width": newWidth});
		var newWidth = ($("body div:first").outerWidth()+50);
	} else {
		var newWidth = $("body div:first").outerWidth()+100;
		$('#language').css({"width": newWidth});
	}
}


function addLanguageMenu_newHomePage09(language) {
	$.each(languageArray, function(i, val){
		if (val.language == language) {
		
			$('#language09').append('<a><img></a>');
			$('#language09 a').attr("href", val.URL).prepend(val.text);
			$('#language09 a img').attr("src", val.flagURL);
		}
	});
	
}
