
// ブックマーク用国リスト（英語）
var bookmarkList = [
{value:"us", text:"North America"},
{value:"cn", text:"China"},
{value:"hk", text:"Hong Kong"},
{value:"kr", text:"Korea"},
{value:"my", text:"Malaysia"},
{value:"ph", text:"Philippines"},
{value:"sg", text:"Singapore"},
{value:"tw", text:"Taiwan"},
{value:"th", text:"Thailand"},
{value:"in", text:"India"},
{value:"id", text:"Indonesia"},
{value:"vn", text:"Vietnam"},
{value:"eu", text:'Europe & Middle East'},
{value:"be", text:"Belgium/Netherlands/Luxembourg"},
{value:"ie", text:"Ireland"},
{value:"it", text:"Italy"},
{value:"ru", text:"Russia"},
{value:"es", text:"Spain & Portugal"},
{value:"ch", text:"Switzerland"},
{value:"uk", text:"United Kingdom"},
{value:"fr", text:"France"},
{value:"de", text:"Deutschland & Osterreich"},
{value:"dej", text:"Deutschland & Osterreich"},
{value:"at", text:"Austria & Eastern Europe"},
{value:"br", text:"Brazil"},
{value:"jp", text:"Japan"}
];


//OS・ブラウザ判別で「お気に入りに追加」を表示する
//（WindowsのIEのみ表示）
if (document.getElementById("bookmark") != null) {
//	if ((navigator.userAgent.indexOf("Firefox/1") == -1) && (navigator.userAgent.indexOf("Firefox/2") == -1)) {
		if (navigator.platform.indexOf("Win") != -1) {
//			if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Firefox") != -1)) {
			if (navigator.userAgent.indexOf("MSIE") != -1) {
				document.getElementById("bookmark").style.display = 'inline';
			}
//		} else if (navigator.userAgent.match(/Mac/i)) {
//			if (navigator.userAgent.indexOf("Firefox") != -1) {
//				document.getElementById("bookmark").style.display = 'inline';
//			}
		}
//	}
}


//ブックマークに追加
function addBookmark(country, language, countryList_e) {

	// クエリの作成
	QueryValue  = '?cntry=' + country;
	QueryValue += '&lang=' + language;

	if ((country == 'de') && (language == 'ja')) {
		ECont = 'dej';
	} else {
		ECont = country;
	}

	// URLの作成
	urlValue  = window.location.protocol + '//' + window.location.hostname + '/asw/BookmarkServlet';
	urlValue += QueryValue;

	// タイトルの作成
//	for(var i in countryList_e) {
//		if (countryList_e[i].value == country) {
//			titleValue = 'ANA SKY WEB -' + countryList_e[i].text + '-';
	for(var i in bookmarkList) {
		if (bookmarkList[i].value == ECont) {
			titleValue = 'ANA SKY WEB -' + bookmarkList[i].text + '-';
		}
	}

	// ブックマークの登録
	if (navigator.userAgent.indexOf("MSIE") != -1) {
		window.external.AddFavorite(urlValue,titleValue);
	} else if (navigator.userAgent.indexOf("Firefox") != -1) {
		window.sidebar.addPanel(titleValue,urlValue,'');
	}
}

