
// ブックマーク用国リスト（英語）
var bookmarkList = [
{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,'');
	}
}

