﻿launchNewYearWelcomeMessage();

function launchNewYearWelcomeMessage() {
	// Message
	//var alertmessage="\n\n                       ********* 169機票小站農曆春節期間營運公告 ********* \n\n\n農曆春節(2011/2/2~2/7)期間, 由於航空公司及開票中心無法進行開票作業,\n\n此段期間歡迎使用169機票小站搜尋機位, 但所有訂單必須待年假過後, 客服人員才能依程序作業.\n\n若依航空公司規定需即訂即開, 或需於年假期間開票之訂位, 恕難處理.\n\n倘有任何關於機票之疑問, 由於客服電話將無人接聽,\n\n請來信至169@101vision.com, 值班人員將儘快回覆.\n\n若經169機票小站已開票之機票需做緊急更動, 為求時效, 煩請親洽航空公司處理, \n\n非常謝謝您的合作, 並祝您新年快樂, 萬事如意!!\n";
	var info_zhTW = "二二八連假期間(2012/2/25~2/28)期間, 由於航空公司及開票中心無法進行開票作業,<br/>此段期間歡迎使用169機票小站搜尋機位, 但所有訂單必須待假期過後, 客服人員才能依程序作業.<br/>若依航空公司規定需即訂即開, 或需於假期間開票之訂位, 恕難處理.<br/>倘有任何關於機票之疑問, 由於客服電話將無人接聽,<br/>請來信至169@101vision.com, 值班人員將儘快回覆.<br/>若經169機票小站已開票之機票需做緊急更動, 為求時效, 煩請親洽航空公司處理,<br/>非常謝謝您的合作, 並祝您假期愉快!!";
	var title_zhTW = "169機票小站二二八連續假期營運通知";
	var title_enUS = "169travel.com operation guidelines during upcoming long weekend";
	var info_enUS = "Please kindly be informed that due to all ticketing centers will be closed for the long weekend (Feb. 25~28),<br/> we will be unable to issue tickets for all online bookings made during this period.<br/>However, we welcome you to continue search for ticket prices on our website, and all online bookings <br/>will be processed by our customer service representatives after the long weekend.<br/>Should you have any questions regarding your ticket or booking status, please email us at 169@101vision.com, <br/>customer service representative on duty will reply to you in a timely manner.<br/>If you need to make emergency travel plan changes that's already ticketed,<br/>we strongly suggest you to contact the airline directly for immediate assistance.<br/>We thank you your understanding and wish you a very happy long weekend!!";
	
	var info= ("en-US" == $('#dwnLang').val() ? info_enUS : info_zhTW);

	var title= ("en-US" == $('#dwnLang').val() ? title_enUS : title_zhTW);	
	// Set period
	var now = new Date(),
		// Month (0-11)
		beginDatetime = new Date(2012, 1, 24, 8, 59, 59), //2011.05.19 00:00
		endDatetime = new Date(2012, 1, 29, 8, 59, 59), //2011.05.23 14:00
		bShowAlert = (endDatetime > now) && (now >= beginDatetime);
		
	if(bShowAlert) {jAlert('info', info, title);}
	//alert(alertmessage);
}
