
/*[an error occurred while processing this directive]*/
/*[an error occurred while processing this directive]		*/

function JLJScommon02() {
	this.site = {};
	this.site.region = {};
	this.site.lang = {};

	var h = location.host;


	this.site.region.isWW =
		h.match( /^[0-9\.]+/ ) ? 1 : (
			h.match( /renewal\.[^\.]+\.jal\.com/ ) ? 2 : (
				h.match( /[^\.]+\.jal\.com/ ) ? 999 : false
			)
		);


	this.site.region.isJP = ! this.site.region.isWW ? true : false;

	this.site.region.isNONE = ( this.site.region.isWW && ( h.match( /^www\.jal\.com$/ ) ||  h.match( /^[0-9\.]+$/ ) ||  h.match( /:8000/ ))) ? true : false;

	this.site.region.isAOR = ( this.site.region.isWW && ( h.match( /\.aor\./ ) ||  h.match( /:8099/ ))) ? true : false;
	this.site.region.isAU = ( this.site.region.isWW && ( h.match( /\.au\./ ) ||  h.match( /:8001/ ))) ? true : false;
	this.site.region.isHK = ( this.site.region.isWW && ( h.match( /\.hk\./ ) ||  h.match( /:8002/ ))) ? true : false;
	this.site.region.isCN = ( this.site.region.isWW && ( h.match( /\.cn\./ ) ||  h.match( /:8003/ ))) ? true : false;
	this.site.region.isKR = ( this.site.region.isWW && ( h.match( /\.kr\./ ) ||  h.match( /:8004/ ))) ? true : false;
	this.site.region.isSG = ( this.site.region.isWW && ( h.match( /\.sg\./ ) ||  h.match( /:8005/ ))) ? true : false;
	this.site.region.isNZ = ( this.site.region.isWW && ( h.match( /\.nz\./ ) ||  h.match( /:8006/ ))) ? true : false;
	this.site.region.isID = ( this.site.region.isWW && ( h.match( /\.id\./ ) ||  h.match( /:8007/ ))) ? true : false;
	this.site.region.isPH = ( this.site.region.isWW && ( h.match( /\.ph\./ ) ||  h.match( /:8008/ ))) ? true : false;
	this.site.region.isIN = ( this.site.region.isWW && ( h.match( /\.in\./ ) ||  h.match( /:8009/ ))) ? true : false;
	this.site.region.isMY = ( this.site.region.isWW && ( h.match( /\.my\./ ) ||  h.match( /:8010/ ))) ? true : false;
	this.site.region.isVN = ( this.site.region.isWW && ( h.match( /\.vn\./ ) ||  h.match( /:8011/ ))) ? true : false;
	this.site.region.isTH = ( this.site.region.isWW && ( h.match( /\.th\./ ) ||  h.match( /:8012/ ))) ? true : false;
	this.site.region.isGU = ( this.site.region.isWW && ( h.match( /\.gu\./ ) ||  h.match( /:8013/ ))) ? true : false;
	this.site.region.isMP = ( this.site.region.isWW && ( h.match( /\.mp\./ ) ||  h.match( /:8014/ ))) ? true : false;
	this.site.region.isTW = ( this.site.region.isWW && ( h.match( /\.tw\./ ) || h.match( /:8031/ ))) ? true : false;

	this.site.region.isAORmember = (
		this.site.region.isAOR || this.site.region.isAU || this.site.region.isHK || this.site.region.isCN || this.site.region.isKR ||
		this.site.region.isSG || this.site.region.isNZ || this.site.region.isID || this.site.region.isPH || this.site.region.isIN ||
		this.site.region.isMY || this.site.region.isVN || this.site.region.isTH || this.site.region.isGU || this.site.region.isMP || 
		this.site.region.isTW
	) ? true : false;

	this.site.region.isER = ( this.site.region.isWW && ( h.match( /\.er\./ ) ||  h.match( /:8199/ ))) ? true : false;
	this.site.region.isUK = ( this.site.region.isWW && ( h.match( /\.uk\./ ) ||  h.match( /:8015/ ))) ? true : false;
	this.site.region.isFR = ( this.site.region.isWW && ( h.match( /\.fr\./ ) ||  h.match( /:8016/ ))) ? true : false;
	this.site.region.isDE = ( this.site.region.isWW && ( h.match( /\.de\./ ) ||  h.match( /:8017/ ))) ? true : false;
	this.site.region.isNL = ( this.site.region.isWW && ( h.match( /\.nl\./ ) ||  h.match( /:8018/ ))) ? true : false;
	this.site.region.isES = ( this.site.region.isWW && ( h.match( /\.es\./ ) ||  h.match( /:8019/ ))) ? true : false;
	this.site.region.isIT = ( this.site.region.isWW && ( h.match( /\.it\./ ) ||  h.match( /:8020/ ))) ? true : false;
	this.site.region.isEG = ( this.site.region.isWW && ( h.match( /\.eg\./ ) ||  h.match( /:8021/ ))) ? true : false;
	this.site.region.isAT = ( this.site.region.isWW && ( h.match( /\.at\./ ) ||  h.match( /:8022/ ))) ? true : false;
	this.site.region.isCH = ( this.site.region.isWW && ( h.match( /\.ch\./ ) ||  h.match( /:8023/ ))) ? true : false;
	this.site.region.isRU = ( this.site.region.isWW && ( h.match( /\.ru\./ ) ||  h.match( /:8024/ ))) ? true : false;

	this.site.region.isERmember = (
		this.site.region.isER || this.site.region.isUK || this.site.region.isFR || this.site.region.isDE || this.site.region.isNL ||
		this.site.region.isES || this.site.region.isIT || this.site.region.isEG || this.site.region.isAT || this.site.region.isCH ||
		this.site.region.isRU
	) ? true : false;

	this.site.region.isAR = ( this.site.region.isWW && ( h.match( /\.ar\./ ) ||  h.match( /:8299/ ))) ? true : false;
	this.site.region.isUS = ( this.site.region.isWW && ( h.match( /\.us\./ ) ||  h.match( /:8025/ ))) ? true : false;
	this.site.region.isCA = ( this.site.region.isWW && ( h.match( /\.ca\./ ) ||  h.match( /:8026/ ))) ? true : false;
	this.site.region.isMX = ( this.site.region.isWW && ( h.match( /\.mx\./ ) ||  h.match( /:8027/ ))) ? true : false;
	this.site.region.isBR = ( this.site.region.isWW && ( h.match( /\.br\./ ) ||  h.match( /:8028/ ))) ? true : false;

	this.site.region.isARmember = (
		this.site.region.isAR || this.site.region.isUS || this.site.region.isCA || this.site.region.isMX || this.site.region.isBR
	) ? true : false;

	var p = location.pathname;
	this.site.lang.isEN = (	// whether displayed in English or not
		p.match( /^\/en\/.?/ ) ||
		p.match( /^\/world\/en\/.?/ ) ||
		p.match( /^\/sr\/en\/.?/ )
	) ? true : false;

	this.env = {};
	this.env.isIE50 = ( JLJS.env.isIE && navigator.appVersion.toLowerCase().match( /msie 5\.0/ )) ? true : false;
	this.env.isIE55 = ( JLJS.env.isIE && navigator.appVersion.toLowerCase().match( /msie 5\.5/ )) ? true : false;
}

JLJScommon02.prototype = {
	getValueFromCookie : function( cookieKey ) {
		var data = ( document.cookie ) ? document.cookie.split( ';' ) : [];
		var value;
		for( var i in data )
			if( data[ i ].split( '=' )[ 0 ].replace( /\s/g, '' ) == cookieKey )
				if( value = data[ i ].split( '=' )[ 1 ] )
					return unescape( value ).replace( /\s/g, '' );
	}
};

var JLJS02 = new JLJScommon02;




JLJS_TMDSs = [];
JLJS_AMDDSs = [];

function JLJS_TM_DateSelector( _TM_instance_, depMon, depDay, rtnMon, rtnDay, depCal, rtnCal ) {
	this.number = _TM_instance_.number;

	this.depMonNode = _TM_instance_.formNode[ depMon ];
	this.depDayNode = _TM_instance_.formNode[ depDay ];
	this.rtnMonNode = _TM_instance_.formNode[ rtnMon ];
	this.rtnDayNode = _TM_instance_.formNode[ rtnDay ];
	this.depMonNode._TMDS_instance_ = this;
	this.depDayNode._TMDS_instance_ = this;

	this.depMonCookie = JLJS02.getValueFromCookie( depMon + this.number );
	this.depDayCookie = JLJS02.getValueFromCookie( depDay + this.number );
	this.rtnMonCookie = JLJS02.getValueFromCookie( rtnMon + this.number );
	this.rtnDayCookie = JLJS02.getValueFromCookie( rtnDay + this.number );

	this.calendars = [];

	JLJS.addEvent( this.depMonNode, "change", function( e ) {
		e.target._TMDS_instance_.ChangeDate();
	} );
	JLJS.addEvent( this.depDayNode, "change", function( e ) {
		e.target._TMDS_instance_.ChangeDate();
	} );
}

JLJS_TM_DateSelector.prototype = {
	dateSpecify : function( departureDate, returnDate ) {
		if( this.depMonNode && this.depDayNode ) {
			var S = new JLJS_DateSelector( this.depMonNode, this.depDayNode );
			S.adjustToToday();

			if( typeof departureDate == "string" && departureDate.match( "today" )) {
				if( departureDate.match( "today" )) {
					var offset = departureDate.replace( "today", "" );
					S.applyOffset( offset + "d" );
				}
			}
			else {
				if( JLJS02.site.region.isJP )

					S.applyOffset( '+30d' );
				else
					S.applyOffset( '+5d' );
			}

			if( departureDate ) S.adjustToDate( departureDate );
		}

		if( this.rtnMonNode && this.rtnDayNode ) {
			var S = new JLJS_DateSelector( this.rtnMonNode, this.rtnDayNode );
			S.adjustToToday();

			if( typeof returnDate == "string" && returnDate.match( "today" )) {
				if( returnDate.match( "today" )) {
					var offset = returnDate.replace( "today", "" );
					S.applyOffset( offset + "d" );
				}
			}
			else this.ChangeDate();

			if( returnDate ) S.adjustToDate( returnDate );
		}
	},



	ChangeDate : function() {
		if( this.rtnMonNode && this.rtnDayNode ) {
			var d = new Date();
			var M = this.depMonNode.selectedIndex;
			var D = this.depDayNode.selectedIndex + 1;
			var Y = M < d.getMonth() ? d.getFullYear() + 1 : d.getFullYear();

			var n = JLJS02.site.region.isJP ? 4 : JLJS02.site.region.isAU ? 10 : 5;
			var d2 = new Date( Y, M, D + n );

			this.rtnMonNode.selectedIndex = d2.getMonth();
			this.rtnDayNode.selectedIndex = d2.getDate() - 1;
		}
	}
};




function JLJS_TM_Calendar( TMs ) {
	this.AMD = null;
	this.TMs = TMs;
	this.year = null;
	this.month = null;
	this.day = null;
	this.monNode = null;
	this.dayNode = null;
	this.number = null;
	this.type = null;
	this.url = JLJS02.site.region.isJP ?
		! JLJS02.site.lang.isEN ? "/inter/ticketModuleCalendar.html" : "/en/inter/ticketModuleCalendar.html" :
		! JLJS02.site.lang.isEN ? "/world/ja/flight_planning/ticketModuleCalendar.html" : "/world/en/flight_planning/ticketModuleCalendar.html";
	this.window = null;
}

JLJS_TM_Calendar.prototype = {
	click : function( type, n ) {
		var d = new Date();
		this.year = d.getFullYear();
		this.month = d.getMonth();
		this.day = d.getDate();
		var prm_m = ( type == "meet" ) ? ( ! this.AMD ? "PRM_MEETINGMONTH" : "B_MONTH" ) : ( type == "send" ) ? ( ! this.AMD ? "PRM_SENDINGMONTH" : "E_MONTH" ) : null;
		var prm_d = ( type == "meet" ) ? ( ! this.AMD ? "PRM_MEETINGDATE" : "B_DAY" ) : ( type == "send" ) ? ( ! this.AMD ? "PRM_SENDINGDATE" : "E_DAY" ) : null;
		this.monNode = this.TMs[ n ].formNode[ prm_m ];
		this.dayNode = this.TMs[ n ].formNode[ prm_d ];
		this.number = n;
		this.type = type;
		this.open();
	},

	open : function() {
		var w = JLJS.env.isWin ? "500" : "510";
		var h = ( JLJS.env.isWin || JLJS.env.isSafari ) ? "240" : "265";
		this.window = open( this.url, "newcalwin", "titlebar=0,resizable=no,width=" + w + ",height=" + h );
		this.window.focus();
	},

	close : function() {
		if( this.month < 0 ) this.month += 12;

		var idx = 0;
		for( var i = 0; i < this.monNode.length; i ++  )
			if( this.monNode[ i ].value == this.month + 1 ) {
				idx = i;
				break;
			}
		this.monNode.selectedIndex = idx;

		var idx = 0;
		for( var i = 0; i < this.dayNode.length; i++ )
			if( this.dayNode[ i ].value == this.day ) {
				idx = i;
				break;
			}
		this.dayNode.selectedIndex = idx;

		if( this.type == "meet" )
			if( ! this.AMD )
				JLJS_TMDSs[ this.number ].ChangeDate();
			else
				JLJS_AMDDSs[ this.number ].ChangeDate();
		this.window.close();
	}
};





function JLJS_TM_CalendarPane() {
	this.year = null;
	this.month = null;
	this.yearMonth = null;
	this.monAmount =null;
	this.startIdx = null;
	this.previousMonDays = [];
	this.holidays = [];
}

function JLJS_TM_CalendarWindow() {
	this.isEN = false;
	this.monNames = [
		[ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ],
		[ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
		[ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ],
		[ "Januar", "Februar", "März", "April", "Mag", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember" ],
		[ "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre" ]
	];
	this.monAmounts = [ "31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31" ];
	this.dayNames = [[ "\u65E5", "\u6708", "\u706B", "\u6C34", "\u6728", "\u91D1", "\u571F" ], [ "S", "M", "T", "W", "T", "F", "S" ], [ "S", "M", "D", "M", "D", "F", "S" ], [ "d", "l", "m", "m", "j", "v", "s" ]];
	this.yearRange = 1;
	this.panes = 3;
	this.imgPath = JLJS02.site.region.isJP ?
		! JLJS02.site.lang.isEN ? "/common/img/" : "/en/common/img/" :
		! JLJS02.site.lang.isEN ? "/world/ja/common/img/" : "/world/en/common/img/";

	this.date = new Date();
	this.year = this.date.getYear() < 2000 ? 1900 + this.date.getYear() : this.date.getYear();
	this.month = this.date.getMonth();
	this.day = this.date.getDate();
	this.yearMonth = this.year * 100 + this.month;
	this.startYear = null;
	this.startMonth = null;
	this.startYearMonth = null;
	this.previousPaneYear = null;
	this.previousPaneMonth = null;
	this.nextPaneYear = null;
	this.nextPaneMonth = null;

	this.openerCAL = null;
}

JLJS_TM_CalendarWindow.prototype = {
	setVariables : function( Pn, startMonth, startYear ) {
		this.startMonth = startMonth;
		this.startYear = startYear;

		this.startYearMonth = this.startYear * 100 + this.startMonth;

		if( this.startMonth - this.panes < 0 ) {
			this.previousPaneMonth = 12 + this.startMonth - this.panes;
			this.previousPaneYear = this.startYear - 1;
		}
		else {
			this.previousPaneMonth = this.startMonth - this.panes;
			this.previousPaneYear = this.startYear;
		}

		if( this.startMonth + this.panes > 11 ) {
			this.nextPaneMonth = ( this.startMonth + this.panes ) % 12;
			this.nextPaneYear = this.startYear + 1;
		}
		else {
			this.nextPaneMonth = this.startMonth + this.panes;
			this.nextPaneYear = this.startYear;
		}

		for( var i = 0; i < this.panes; i ++ ) {
			Pn[ i ] = new JLJS_TM_CalendarPane;

			if( this.startMonth + i > 11 ) {
				Pn[ i ].month = ( this.startMonth + i ) % 12;
				Pn[ i ].year = this.startYear + 1;
			}
			else {
				Pn[ i ].month = this.startMonth + i; 
				Pn[ i ].year = this.startYear;
			}

			Pn[ i ].yearMonth = Pn[ i ].year * 100 + Pn[ i ].month;

			this.monAmounts[ 1 ] = ((( Pn[ i ].year % 4 == 0 ) && ( Pn[ i ].year % 100 != 0)) || ( Pn[ i ].year % 400 == 0 )) ? 29 : 28;

			var firstDay = new Date( Pn[ i ].year, Pn[ i ].month, 1 );
			Pn[ i ].startIdx = firstDay.getDay();
			Pn[ i ].monAmount = this.monAmounts[ Pn[ i ].month ];

			Pn[ i ].previousMonth = Pn[ i ].month > 0 ? Pn[ i ].month - 1 : 11;

			for( var j = 0; j < Pn[ i ].startIdx; j ++ )
				Pn[ i ].previousMonDays[ j ] = this.monAmounts[ Pn[ i ].previousMonth ] - Pn[ i ].startIdx + j + 1;

		}
		return Pn;
	},

	write_E : function() {
		this.isEN = true;
		this.write( arguments[ 0 ], arguments[ 1 ] );
	},

	write : function() {
		var Pn = [];
		Pn = this.setVariables( Pn, eval( arguments[ 0 ] ), eval( arguments[ 1 ] ));

		var HTML = '';
		var text = ! this.isEN ? '\u30AB\u30EC\u30F3\u30C0\u30FC\u304B\u3089\u9078\u629E' : JLJS02.site.region.isDE ? 'Bitte wählen Sie ein Datum aus dem Kalender.' : JLJS02.site.region.isFR ? 'Sélectionner la date' : 'Select date from Calendar';
		HTML += '<h1>' + text + '</h1>';
		HTML += '<table border="0" cellpadding="0" cellspacing="0" width="100%" class="calTable01">';
		HTML += '<tr>';

		for( var i = 0; i < this.panes; i ++ ) {
			HTML += '<td>';

			var attr = '';
			var text = '';
			if( Pn[ i ].month == this.month && Pn[ i ].year == this.year ) {
				attr = ' class="now"';
				text = '<span class="cap">' + ( ! this.isEN ? '(\u4ECA\u6708)</span>' : JLJS02.site.region.isDE ? '(Aktueller Monat)</span>' : JLJS02.site.region.isFR ? '(ce mois)</span>' : '(this month)</span>' );
			}
			
			var monthDiv = ! this.isEN ? 0 : JLJS02.site.region.isDE ? 3 : JLJS02.site.region.isFR ? 4 : 1 ;

			HTML += ! this.isEN ?
				'<h3' + attr + '><span class="year"><span class="value">' + Pn[ i ].year + '</span>\u5E74</span> <span class="month"><span class="value">' + this.monNames[ 0 ][ Pn[ i ].month ] + '</span>\u6708</span>' + text + '</h3>' :
				'<h3' + attr + '><span class="month"><span class="value">' +  this.monNames[ monthDiv ][ Pn[ i ].month ] + '</span></span> <span class="year"><span class="value">' + Pn[ i ].year + '</span></span>' + text + '</h3>';

			HTML += '<table width="100%" border="0" cellpadding="0" cellspacing="0" class="paneTable01">';
			HTML += '<thead>';
			HTML += '<tr>';

			var dayNames = ! this.isEN ? this.dayNames[ 0 ] : JLJS02.site.region.isDE ? this.dayNames[ 2 ] : JLJS02.site.region.isFR ? this.dayNames[ 3 ] : this.dayNames[ 1 ];
			for( var j = 0; j < dayNames.length; j ++ ) {
				var attr = j == 0 ? ' class="hol"' : "";
				HTML += '<th' + attr + '>' + dayNames[ j ] +'</th>';
			}

			HTML += '</tr>';
			HTML += '</thead>';
			HTML += '<tbody>';
			HTML += '<tr> ';

			var row = 0;
			var column = 0;
			for( var j = 0; j < Pn[ i ].previousMonDays.length; j ++, column ++ )
				HTML += '<td class="inactive">' + Pn[ i ].previousMonDays[ j ] + '</td>';

			for( var j = 1; j <= Pn[ i ].monAmount; j ++, column ++ ) {
				var classVal = column == 0 ? "hol" : "wday";
				for( var k = 0; k < Pn[ i ].holidays.length; k ++ )
					if( j == Pn[ i ].holidays[ k ] || ( column == 1 && j == Pn[ i ].holidays[ k ] + 1 ))
						classVal = "hol";

				classVal += ( Pn[ i ].yearMonth == this.yearMonth && j == this.day ) ? " today" : "";
				HTML += '<td class="' + classVal + '"><a href="javascript:JLJS_TMCW.returnDateAndClose(' + Pn[ i ].month + ',' + j + ')">' + j + '</a></td>';

				if( column == 6 ) {
					if( j != Pn[ i ].monAmount ) {
						HTML += '</tr>';
						HTML += '<tr>';
						row ++;
					}
					column = - 1;
				}
			}

			if( column > 0 )
				for( j = 1; column < 7; j ++, column ++ )
					HTML +=  '<td class="inactive">' + j + '</td>';

			HTML += '</tr></table>';
			if( row < 5 )
					HTML +=  '<div class="spacer"><img src="/common/img/clear.gif" width="1" height="21" alt=""></div>';
			HTML += '</td>';
		}
		HTML += '</tr></tbody></table>';


		var text = ! this.isEN ? '&lt;&lt; \u524D\u306E' + this.panes + '\u30F6\u6708' : JLJS02.site.region.isDE ? 'vorherige ' + this.panes + ' Monate &gt;&gt;' : JLJS02.site.region.isFR ? 'les ' + this.panes + ' mois précédents &gt;&gt;' : '&lt;&lt; previous ' + this.panes + ' Months';

		var img = this.isEN ? JLJS02.site.region.isDE ? '_de' : JLJS02.site.region.isFR ? '_fr' : '' : '' ;

		var input1 = ( this.startYearMonth <= this.yearMonth ) ? '' :
			'<input type="image" src="' + this.imgPath + 'btn_calendar_previous' + this.panes + 'm' + img + '.gif" class="previous" value="' + text +'" onClick="JLJS_TMCW.goPrevious();">';


		var text = ! this.isEN ? '\u6B21\u306E' + this.panes + '\u30F6\u6708 &gt;&gt;' : JLJS02.site.region.isDE ? 'kommende ' + this.panes + ' Monate &gt;&gt;' : JLJS02.site.region.isFR ? 'les ' + this.panes + ' mois suivants &gt;&gt;' : 'Next ' + this.panes + ' Months &gt;&gt;';
		
		
		
		var input2 = ( this.nextPaneYear > this.year + this.yearRange ) ? '' :
			'<input type="image" src="' + this.imgPath + 'btn_calendar_next' + this.panes + 'm' + img + '.gif" class="next" value="' + text +'" onClick="JLJS_TMCW.goNext();">';


		var select1 = '';

		var select2 = '';

		HTML += '<div class="navigation">';
		HTML += '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
		HTML += '<col width="33%">';
		HTML += '<col width="34%">';
		HTML += '<col width="33%">';
		HTML += '<tr>';
		HTML += '<td class="first">' + input1 + '</td>';
		HTML += '<td>' + ( ! this.isEN ? select1 + select2 : select2 + select1 ) + '</td>';
		HTML += '<td class="last">' + input2 + '</td>';
		HTML += '</tr></table>';
		HTML += '</div>';


		document.getElementById( "contentsArea" ).innerHTML = HTML;
	},

	goPrevious : function() {
		this.openerCAL.year = this.previousPaneYear;
		this.openerCAL.month = this.previousPaneMonth;
		this.write( this.openerCAL.month, this.openerCAL.year );
	},

	goNext : function() {
		this.openerCAL.year = this.nextPaneYear;
		this.openerCAL.month = this.nextPaneMonth;
		this.write( this.openerCAL.month, this.openerCAL.year );
	},

	changeYear : function( obj ) {
		this.openerCAL.year = obj.options[ obj.selectedIndex ].value;
		this.write( this.openerCAL.month, this.openerCAL.year );
	},

	changeMonth : function( obj ) {
		this.openerCAL.month = obj.options[ obj.selectedIndex ].value;
		this.write( this.openerCAL.month, this.openerCAL.year );
	},

	returnDateAndClose : function( month, day ) {
		this.openerCAL.month = month;
		this.openerCAL.day = day;
		this.openerCAL.close();
	}
};






function JLJS_TM_airportNarrowDown( TM_instance_, type, name1, name2, name3, defSet, defArea ) {
	if( ! type || ! name1 || ! name2 ) return;
	this.type = type;
	this.areaNode = TM_instance_.formNode[ name1 ];
	if( this.areaNode )
		this.areaNode._TMAND_instance_ = this;
	this.cityNode = TM_instance_.formNode[ name2 ];
	this.cityNode_OJ = TM_instance_.formNode[ name3 ] ? TM_instance_.formNode[ name3 ] : null;

	this.airportTable = {};
	this.airportTable.selectionSets = JLJS_TMAL.selectionSets;
	this.airportTable.globalAreas = JLJS_TMAL.globalAreas;
	this.airportTable.countries = JLJS_TMAL.countries;
	this.airportTable.cities = JLJS_TMAL.cities;

	this.selection = defSet ? defSet : defArea;
	this.selectionSet = [];
	if( this.airportTable.selectionSets[ this.selection ] )
		this.selectionSet = this.airportTable.selectionSets[ this.selection ];
	this.defaultArea = null;
	this.defaultCity = null;
	this.defaultCity_OJ = null;
	this.noGroup = null;
	this.noLabel = null;
	this.noDevide = null;
	this.labelOpt = null;
	this.onLineOnly = null;
	this.onLineSeparatingView_Off = null;
	this.noAreaSelection = null;
	this.OJ_noAreaSelection = null;
	this.modifyOJOnly = null;
	this.noDOM = null;
	this.EN = null;
	this.AMD = null;

	this.globalArea = null;
	this.countries = null;
	this.cities = null;
	this.selectedIndex = 0;
	this.selectedIndex_OJ = 0;
	this.buff = 0;
	this.devided = null;
	this.onLine_displayed = null;
}

JLJS_TM_airportNarrowDown.prototype = {
	setDefaultByCookie : function() {
		var defArea = arguments[ 0 ][ 0 ];
		var cookieArea = arguments[ 0 ][ 1 ];
		var defCity = arguments[ 1 ][ 0 ];
		var cookieCity = arguments[ 1 ][ 1 ];
		var defCity_OJ = arguments[ 2 ][ 0 ];
		var cookieCity_OJ = arguments[ 2 ][ 1 ];
		var ignoreCookie = arguments[ 3 ];

		if( ! cookieCity || ignoreCookie ) this.defaultCity = defCity;
		else this.defaultCity = cookieCity;

		if( ! cookieCity_OJ || ignoreCookie ) this.defaultCity_OJ = defCity_OJ;
		else this.defaultCity_OJ = cookieCity_OJ;

		if( ! this.noAreaSelection && this.defaultCity && this.selectionSet.length ) {
			LABEL_01 :
			for( var i = 0; i < this.selectionSet.length; i ++ ) {
				var countries = cities = null;
				var tmp = null;

				if( this.selectionSet[ i ] == "" ) continue;

				if( tmp = this.airportTable.globalAreas[ this.selectionSet[ i ]] )
					countries = tmp[ "list" ];

				if( countries ) {
					for( var j = 0; j < countries.length; j ++ ) {
						if( this.airportTable.countries[ countries[ j ]] )
							cities = this.airportTable.countries[ countries[ j ]][ "list" ];
						else continue;
						for( var k = 0; k < cities.length; k ++ )
							if( this.airportTable.cities[ cities[ k ]][ "CD" ] == this.defaultCity ) {
								this.defaultArea = tmp[ "CD" ];
								break LABEL_01;
							}
					}
				}
				else {
					tmp = this.airportTable.countries[ this.selectionSet[ i ]];
					cities = this.airportTable.countries[ tmp[ "CD" ]][ "list" ];
					for( var j = 0; j < cities.length; j ++ )
						if( this.airportTable.cities[ cities[ j ]][ "CD" ] == this.defaultCity ) {
							this.defaultArea = tmp[ "CD" ];
							break LABEL_01;
						}
				}
			}
		}
		if( ! this.defaultArea ) this.defaultArea = defArea;
	},




	setAreaSelector : function() {
		this.selectedIndex = 0;
		this.buff = 0;

		var ptn = /^select$/i;
		if(
			this.areaNode && this.areaNode.nodeName.match( ptn ) &&
			this.cityNode && this.cityNode.nodeName.match( ptn )
		) {}
		else return;
		if( JLJS.env.isIE )
			while( this.areaNode.options[ 0 ] ) this.areaNode.options.remove( 0 );
		else
			while( this.areaNode.firstChild ) this.areaNode.removeChild( this.areaNode.firstChild );

		if( this.selectionSet.length ) {
			var newOPT = document.createElement( 'option' );
			newOPT.value = "";
			newOPT.text = this.type == 'd' ?
				! this.EN ? '\u51FA\u767A\u30A8\u30EA\u30A2' : 'Departure Area' :
				! this.EN ? '\u5230\u7740\u30A8\u30EA\u30A2' : 'Arrival Area';
			if( JLJS.env.isIE ) this.areaNode.add( newOPT, 0 );
			else this.areaNode.appendChild( newOPT );
			this.buff ++;

			for( var i = 0; i < this.selectionSet.length; i ++ ) {
				this.globalArea = null;

				if( this.selectionSet[ i ] == "" ) {
					var newOPT = document.createElement( 'option' );
					newOPT.text = "-------------";
					newOPT.value = "";
					if( JLJS.env.isIE ) this.areaNode.add( newOPT, this.buff  + 1 );
					else this.areaNode.appendChild( newOPT );
					this.buff ++;
					continue;
				}

				if( this.airportTable.globalAreas[ this.selectionSet[ i ]] )
					this.globalArea = this.airportTable.globalAreas[ this.selectionSet[ i ]];

				if( ! this.globalArea )
					this.globalArea = this.airportTable.countries[ this.selectionSet[ i ]];

				if( this.globalArea ) {
					var newOPT = document.createElement( 'option' );
					newOPT.value = this.globalArea[ "CD" ];
					newOPT.text = ! this.EN ? this.globalArea[ "title_J" ] : this.globalArea[ "title_E" ];
					if( this.defaultArea && this.globalArea[ "CD" ] == this.defaultArea ) {
						newOPT.selected = true;
						this.selectedIndex = this.buff;
					}
					if( JLJS.env.isIE ) this.areaNode.add( newOPT, this.buff  + 1 );
					else this.areaNode.appendChild( newOPT );
					this.buff ++;
				}
			}
			this.areaNode.options.selectedIndex = this.selectedIndex;
		}


		else {
			this.globalArea = null;
			var find = 0;
			if( this.airportTable.globalAreas[ this.selection ] )
				this.globalArea = this.airportTable.globalAreas[ this.selection ];

			if( ! this.globalArea )
				this.globalArea = this.airportTable.countries[ this.selection ];

			if( this.globalArea ) {
				var newOPT = document.createElement( 'option' );
				newOPT.value = this.globalArea[ "CD" ];
				newOPT.text = ! this.EN ? this.globalArea[ "title_J" ] : this.globalArea[ "title_E" ];
				if( JLJS.env.isIE ) this.areaNode.add( newOPT, this.buff  + 1 );
				else this.areaNode.appendChild( newOPT );
				this.buff ++;
			}
		}
	},



	narrowDown : function( area ) {
		if( ! this.noDOM ) {
			if( JLJS.env.isMac && JLJS.env.isIE ) {
				if( ! this.modifyOJOnly ) while( this.cityNode.options[ 0 ] ) this.cityNode.options.remove( 0 );
				if( this.cityNode_OJ ) while ( this.cityNode_OJ.options[ 0 ] ) this.cityNode_OJ.options.remove( 0 );
			}
			else {
				if( ! this.modifyOJOnly ) while( this.cityNode.childNodes[ 0 ] ) this.cityNode.removeChild( this.cityNode.childNodes[ 0 ] );
				if( this.cityNode_OJ ) while ( this.cityNode_OJ.childNodes[ 0 ] ) this.cityNode_OJ.removeChild( this.cityNode_OJ.childNodes[ 0 ] );
			}
		}

		this.selectedIndex = this.selectedIndex_OJ = 0;
		this.buff = 0;
		if( ! area || this.OJ_noAreaSelection ) {
			var text = this.type == 'd' ?
				! this.EN ? '\u51FA\u767A\u90FD\u5E02' : 'Departure City' :
				! this.EN ? '\u5230\u7740\u90FD\u5E02' : 'Arrival City';
			var text2 = this.type == 'd' ?
				! this.EN ? '\u5230\u7740\u90FD\u5E02' : 'Arrival City' :
				! this.EN ? '\u51FA\u767A\u90FD\u5E02' : 'Departure City';

			if( this.noDOM ) {
				if( ! this.modifyOJOnly ) {
					this.cityNode.options.length = 1;
					this.cityNode.options[ this.buff ].text = text;
				}

				if( this.cityNode_OJ ) {
					this.cityNode_OJ.options.length = this.buff + 1;
					this.cityNode_OJ.options[ this.buff ].text = text2;
				}
				this.buff ++;
			}

			else {
				var newOPT = document.createElement( 'option' );
				var newOPT2 = document.createElement( 'option' );
				newOPT.value = newOPT2.value = "";
				newOPT.text = text;
				newOPT2.text = text2;
				if( ! this.modifyOJOnly ) {
					if( JLJS.env.isIE ) this.cityNode.add( newOPT, 0 );
					else this.cityNode.appendChild( newOPT );
				}
				if( this.cityNode_OJ ) {
					if( JLJS.env.isIE ) this.cityNode_OJ.add( newOPT2, 0 );
					else this.cityNode_OJ.appendChild( newOPT2 );
				}
				this.buff ++;
			}
		}


		if( this.selectionSet.length ) {

			this.onLine_displayed = false;


			if( ! area && ! this.onLineSeparatingView_Off ) {
				this.setOptions_OL_start();

				var buff = this.buff;

				for( var i = 0; i < this.selectionSet.length; i ++ ) {
					this.countries = null;
					var tmp;
					if( tmp = this.airportTable.globalAreas[ this.selectionSet[ i ]] )
						this.countries = this.getListFromTable( tmp, true );

					this.cities = null;
					var tmp;
					if( this.countries ) {
						for( var j = 0; j < this.countries.length; j ++ ) {
							if( tmp = this.airportTable.countries[ this.countries[ j ]] )
								this.cities = this.getListFromTable( tmp, true ); 

							if( this.cities )
								for( var k = 0; k < this.cities.length; k ++ ) this.setOptions_OL( k, buff, area ? 1 : 0 );
						}
					}
					else {
						if( tmp = this.airportTable.countries[ this.selectionSet[ i ]] )
							this.cities = this.getListFromTable( tmp, true );

						if( this.cities )
							for( var j = 0; j < this.cities.length; j ++ ) this.setOptions_OL( j, buff, area ? 1 : 0 );
					}
				}

				if( this.cities ) {
					this.setOptions_OL_end();
					this.onLine_displayed = true;
				}
			}




			this.devided = false;
			LABEL_03:
			for( var i = 0; i < this.selectionSet.length; i ++ ) {
				if( area )
					if( this.selectionSet[ i ] != area ) continue;

				this.countries = null;
				var tmp;
				if( tmp = this.airportTable.globalAreas[ this.selectionSet[ i ]] )
					this.countries = this.getListFromTable( tmp, true ); 


				if( area && ! this.onLineSeparatingView_Off ) {
					this.setOptions_OL_start();

					var buff = this.buff;
					this.cities = null;
					var tmp;
					if( this.countries ) {
						for( var j = 0; j < this.countries.length; j ++ ) {
							if( tmp = this.airportTable.countries[ this.countries[ j ]] )
								this.cities = this.getListFromTable( tmp, true ); 

							if( this.cities )
								for( var k = 0; k < this.cities.length; k ++ ) this.setOptions_OL( k, buff, area ? 1 : 0 );
						}
					}
					else {
						if( tmp = this.airportTable.countries[ area ] )
							this.cities = this.getListFromTable( tmp, true ); 

						if( this.cities )
							for( var j = 0; j < this.cities.length; j ++ ) this.setOptions_OL( j, buff, area ? 1 : 0 );
					}

					if( this.cities ) {
						this.setOptions_OL_end();
						this.onLine_displayed = true;
					}
				}




				var tmp;
				if( tmp = this.airportTable.globalAreas[ this.selectionSet[ i ]] )
					this.countries = this.getListFromTable( tmp );


				this.cities = null;
				if( this.countries ) {
					for( var j = 0; j < this.countries.length; j ++ ) {
						var tmp;
						if( tmp = this.airportTable.countries[ this.countries[ j ]] )
							this.cities = this.getListFromTable( tmp );

						if( this.cities ) this.setOptions( tmp );
					}
					if( area ) break LABEL_03;
				}
				else {
					if( ! area ) {
						var tmp;
						if( tmp = this.airportTable.countries[ this.selectionSet[ i ]] )
							this.cities = this.getListFromTable( tmp );

						if( this.cities ) this.setOptions( tmp );
					}
					else if( area ) {
						var tmp;
						if( tmp = this.airportTable.countries[ area ] )
							this.cities = this.getListFromTable( tmp );

						if( this.cities ) {
							this.setOptions( tmp );
							break LABEL_03;
						}
					}
				}
			}
		}




		else {
			this.countries = null;
			var tmp;
			if( tmp = this.airportTable.globalAreas[ area ] )
				this.countries = this.getListFromTable( tmp, true );

			this.onLine_displayed = false;


			if( ! this.onLineSeparatingView_Off ) {
				this.setOptions_OL_start();

				var buff = this.buff;
				this.cities = null;
				var tmp;

				if( this.countries ) {
					for( var i = 0; i < this.countries.length; i ++ ) {
						if( tmp = this.airportTable.countries[ this.countries[ i ]] )
							this.cities = this.getListFromTable( tmp, true );

						if( this.cities )
							for( var j = 0; j < this.cities.length; j ++ ) this.setOptions_OL( j, buff, area ? 1 : 0 );
					}
				}
				else {
					if( tmp = this.airportTable.countries[ area ] )
						this.cities = this.getListFromTable( tmp, true );

					if( this.cities )
						for( var i = 0; i < this.cities.length; i ++ ) this.setOptions_OL( i, buff, area ? 1 : 0 );
				}

				if( this.cities ) {
					this.setOptions_OL_end();
					this.onLine_displayed = true;
				}
			}



			var tmp;
			if( tmp = this.airportTable.globalAreas[ area ] )
				this.countries = this.getListFromTable( tmp );


			this.cities = null;
			this.devided = false;
			if( this.countries ) {
				for( var i = 0; i < this.countries.length; i ++ ) {
					var tmp;
					if( tmp = this.airportTable.countries[ this.countries[ i ]] )
						this.cities = this.getListFromTable( tmp );

					if( this.cities ) this.setOptions( tmp );
				}
			}
			else {
				var tmp;
				if( tmp = this.airportTable.countries[ area ] )
					this.cities = this.getListFromTable( tmp );

				if( this.cities ) this.setOptions( tmp );
			}
		}
		if( this.OJ_noAreaSelection ) {
			this.selectedIndex = this.selectedIndex_OJ = 0;
			this.cityNode.options[ 0 ].selected =
			this.cityNode_OJ.options[ 0 ].selected = true;
		}
	},



	getListFromTable : function( tmp, srchOL ) {
		var list = null;
		if( srchOL ) {
			if( this.AMD )
				list = ! this.EN ? tmp[ "list_AMD_MJ" ] : tmp[ "list_AMD_MJ_E" ] ? tmp[ "list_AMD_MJ_E" ] : tmp[ "list_AMD_MJ" ];
			else
				list = ! this.EN ? tmp[ "list_OL" ] : tmp[ "list_OL_E" ] ? tmp[ "list_OL_E" ] : tmp[ "list_OL" ];
		}
		if( ! list )
			list = ! this.EN ? tmp[ "list" ] : tmp[ "list_E" ] ? tmp[ "list_E" ] : tmp[ "list" ];

		return list;
	},


	setOptions_OL_start : function() {
		var label = ! this.EN ? '\u4E3B\u8981\u90FD\u5E02' : 'Major Cities';
		this.newOPG = document.createElement( 'optgroup' );
		this.newOPG2 = document.createElement( 'optgroup' );
		this.newOPG.label = this.newOPG2.label = label;

		if( ! this.noGroup && ! this.onLineOnly && this.noDOM ) {
			if( ! this.modifyOJOnly ) {
				this.cityNode.options.length = this.buff + 1;
				this.cityNode.options[ this.buff ].text = '< ' + label + '>';
			}

			if( this.cityNode_OJ )
				if( ! this.OJ_noAreaSelection ) {
					this.cityNode_OJ.options.length = this.buff + 1;
					this.cityNode_OJ.options[ this.buff ].text = '< ' + label + '>';
				}
			this.buff ++;
		}
		else if( ! this.noGroup && ! this.onLineOnly && this.labelOpt ) {
			var newOPT = document.createElement( 'option' );
			var newOPT2 = document.createElement( 'option' );
			newOPT.text = newOPT2.text = '< ' + label + ' >';

			if( ! this.modifyOJOnly ) {
				if( JLJS.env.isIE ) this.cityNode.add( newOPT, this.buff + 1 );
				else this.cityNode.appendChild( newOPT );
			}
			if( this.cityNode_OJ )
				if( ! this.OJ_noAreaSelection ) {
					if( JLJS.env.isIE ) this.cityNode_OJ.add( newOPT2, this.buff + 1 );
					else this.cityNode_OJ.appendChild( newOPT2 );
				}
			this.buff ++;
		}
	},

	setOptions_OL : function( n, buff, area ) {
		var city = this.airportTable.cities[ this.cities[ n ]];
		if( this.AMD ) {
			if( ! city[ "AMD_MJ" ] ) return;
		}
		else
			if( ! city[ "OL" ] ) return;

		if( this.noDOM ) {
			var cityName = ! this.EN ? city[ "title_J" ] : city[ "title_E" ];
			if( ! this.modifyOJOnly ) {
				this.cityNode.options.length = this.buff + 1;
				this.cityNode.options[ this.buff ].text = cityName;
				this.cityNode.options[ this.buff ].value = city[ "CD" ];
				if( this.defaultCity && city[ "CD" ] == this.defaultCity ) {
					this.selectedIndex = this.buff;
					this.cityNode.options[ this.buff ].selected = true;
				}
			}

			if( this.cityNode_OJ )
				if( ! this.OJ_noAreaSelection ) {
					this.cityNode_OJ.options.length = this.buff + 1;
					this.cityNode_OJ.options[ this.buff ].text = cityName;
					this.cityNode_OJ.options[ this.buff ].value = city[ "CD" ];
					if( this.defaultCity_OJ && city[ "CD" ] == this.defaultCity_OJ ) {
						this.selectedIndex_OJ = this.buff;
						this.cityNode_OJ.options[ this.buff ].selected = true;
					}
				}

			if( buff == this.buff && area ) {
				if( ! this.modifyOJOnly ) {
					this.cityNode.options[ this.buff ].selected = true;
					this.selectedIndex = this.buff;
				}
				if( this.citiNody_OJ )
					if( ! this.OJ_noAreaSelection ) {
						this.cityNode_OJ.options[ this.buff ].selected = true;
						this.selectedIndex_OJ = this.buff;
					}
			}

			this.buff ++;
		}
		else {
			var cityName = ! this.EN ? city[ "title_J" ] : city[ "title_E" ];
			var newOPT = document.createElement( 'option' );
			var newOPT2 = document.createElement( 'option' );
			newOPT.value = newOPT2.value = city[ "CD" ];

			if( this.defaultCity && city[ "CD" ] == this.defaultCity )
				if( ! this.modifyOJOnly ) {
					newOPT.selected = true;
					this.selectedIndex = this.buff;
				}
			if( this.defaultCity_OJ && city[ "CD" ] == this.defaultCity_OJ )
				if( ! this.OJ_noAreaSelection ) {
					newOPT2.selected = true;
					this.selectedIndex_OJ = this.buff;
				}


			if( ! this.noGroup && ! this.labelOpt && ! this.onLineOnly ) {
				newOPT.innerHTML = newOPT2.innerHTML = cityName;
				if( ! this.modifyOJOnly )
					this.newOPG.appendChild( newOPT );
				if( this.cityNode_OJ )
					if( ! this.OJ_noAreaSelection )
						this.newOPG2.appendChild( newOPT2 );
				this.buff ++;
			}


			else {
				newOPT.text = newOPT2.text = cityName;
				if( ! this.modifyOJOnly ) {
					if( JLJS.env.isIE ) this.cityNode.add( newOPT, this.buff + 1 );
					else this.cityNode.appendChild( newOPT );
				}
				if( this.cityNode_OJ )
					if( ! this.OJ_noAreaSelection ) {
						if( JLJS.env.isIE ) this.cityNode_OJ.add( newOPT2, this.buff + 1 );
						else this.cityNode_OJ.appendChild( newOPT2 );
					}
				if( buff == this.buff && area ) {
					if( ! this.modifyOJOnly ) {
						this.cityNode.options[ this.buff ].selected = true;
						this.selectedIndex = this.buff ;
					}
					if( this.cityNode_OJ )
						if( ! this.OJ_noAreaSelection ) {
							this.cityNode_OJ.options[ this.buff ].selected = true;
							this.selectedIndex_OJ = this.buff ;
						}
				}

				this.buff ++;

			}
		}
	},

	setOptions_OL_end : function() {

			if( ! this.noGroup && ! this.labelOpt && ! this.onLineOnly ) {
				if( ! this.modifyOJOnly )
					this.cityNode.appendChild( this.newOPG );
				if( this.cityNode_OJ )
					if( ! this.OJ_noAreaSelection )
						this.cityNode_OJ.appendChild( this.newOPG2 );
			}
	},


	setOptions_Devide : function() {
		if( this.noDevide ) return;
		if( this.noDOM ) {
			if( ! this.modifyOJOnly ) {
				this.cityNode.options.length = this.buff + 1;
				this.cityNode.options[ this.buff ].text = "-------------";
				this.cityNode.options[ this.buff ].value = "";
			}

			if( this.cityNode_OJ )
				if( ! this.OJ_noAreaSelection ) {
					this.cityNode_OJ.options.length = this.buff + 1;
					this.cityNode_OJ.options[ this.buff ].text = "-------------";
					this.cityNode_OJ.options[ this.buff ].value = "";
				}
			this.buff ++;
			this.devided = true;
		}
		else {
			var newOPT = document.createElement( 'option' );
			var newOPT2 = document.createElement( 'option' );
			newOPT.text = newOPT2.text = "-------------";
			newOPT.value = newOPT2.value = "";
			if( ! this.modifyOJOnly ) {
				if( JLJS.env.isIE ) this.cityNode.add( newOPT, this.buff + 1 );
				else this.cityNode.appendChild( newOPT );
			}
			if( this.cityNode_OJ )
				if( ! this.OJ_noAreaSelection ) {
					if( JLJS.env.isIE ) this.cityNode_OJ.add( newOPT2, this.buff + 1 );
					else this.cityNode_OJ.appendChild( newOPT2 );
				}
			this.buff ++;
			this.devided = true;

		}
	},

	setOptions : function( country, area ) {
		if( this.onLineOnly && ! this.onLineSeparatingView_Off ) return;
		if( this.noDOM ) {
			var countryName = ! this.EN ? country[ "title_J" ] : country[ "title_E" ];

			var buff = this.buff;
			for( var i = 0; i < this.cities.length; i ++ ) {
				var devide = ! this.cities[ i ] ? true : false;
				var city = this.airportTable.cities[ this.cities[ i ]];
				if( ! this.onLineSeparatingView_Off ) {
					if( this.AMD ) {
						if( ! devide && city[ "AMD_MJ" ] ) continue;
					}
					else
						if( ! devide && city[ "OL" ] ) continue;
				}
				else if( this.onLineOnly ) {
					if( this.AMD ) {
						if( ! devide && ! city[ "AMD_MJ" ] ) continue;
					}
					else
						if( ! devide && ! city[ "OL" ] ) continue;
				}

				if( buff == this.buff ) {
					if( ! this.devided && this.onLine_displayed ) this.setOptions_Devide();

					if( ! this.noGroup && ! this.noLabel && this.labelOpt ) {
						if( ! this.modifyOJOnly ) {
							this.cityNode.options.length = this.buff + 1;
							this.cityNode.options[ this.buff ].text = "";
						}
						if( this.cityNode_OJ )
							if( ! this.OJ_noAreaSelection ) {
								this.cityNode_OJ.options.length = this.buff + 1;
								this.cityNode_OJ.options[ this.buff ].text = "";
							}
						this.buff ++;

						if( ! this.modifyOJOnly ) {
							this.cityNode.options.length = this.buff + 1;
							this.cityNode.options[ this.buff ].text = "< " + countryName + " >";
						}
						if( this.cityNode_OJ )
							if( ! this.OJ_noAreaSelection ) {
								this.cityNode_OJ.options.length = this.buff + 1;
								this.cityNode_OJ.options[ this.buff ].text = "< " + countryName + " >";
							}
						this.buff ++;
					}

					if( ! this.onLine_displayed && area ) {
						if( ! this.modifyOJOnly ) {
							this.cityNode.options[ this.buff ].selected = true;
							this.selectedIndex = this.buff;
						}
						if( this.citiNody_OJ )
							if( ! this.OJ_noAreaSelection ) {
								this.cityNode_OJ.options[ this.buff ].selected = true;
								this.selectedIndex_OJ = this.buff;
							}
					}
				}

				var cityName = devide ? "-------------" : ! this.EN ? city[ "title_J" ] : city[ "title_E" ];
				var value = devide ? "" : city[ "CD" ];

				if( ! this.modifyOJOnly ) {
					this.cityNode.options.length = this.buff + 1;
					this.cityNode.options[ this.buff ].text = cityName;
					this.cityNode.options[ this.buff ].value = value;
					if( this.defaultCity && value == this.defaultCity ) {
						this.cityNode.options[ this.buff ].selected = true;
						this.selectedIndex = this.buff;
					}
				}

				if( this.cityNode_OJ )
					if( ! this.OJ_noAreaSelection ) {
						this.cityNode_OJ.options.length = this.buff + 1;
						this.cityNode_OJ.options[ this.buff ].text = cityName;
						this.cityNode_OJ.options[ this.buff ].value = value;
						if( this.defaultCity_OJ && value == this.defaultCity_OJ ) {
							this.cityNode_OJ.options[ this.buff ].selected = true;
							this.selectedIndex_OJ = this.buff;
						}
					}

				this.buff ++;
			}

		}
		else {
			var countryName = ! this.EN ? country[ "title_J" ] : country[ "title_E" ];

			var newOPG = document.createElement( 'optgroup' );
			var newOPG2 = document.createElement( 'optgroup' );
			if( ! this.noLabel )
				newOPG.label = newOPG2.label = countryName;

			var buff = this.buff;
			for( var i = 0; i < this.cities.length; i ++ ) {
				var devide = ! this.cities[ i ] ? true : false;
				var city = this.airportTable.cities[ this.cities[ i ]];
				if( ! this.onLineSeparatingView_Off ) {
					if( this.AMD ) {
						if( ! devide && city[ "AMD_MJ" ] ) continue;
					}
					else
						if( ! devide && city[ "OL" ] ) continue;
				}
				else if( this.onLineOnly ) {
					if( this.AMD ) {
						if( ! devide && ! city[ "AMD_MJ" ] ) continue;
					}
					else
						if( ! devide && ! city[ "OL" ] ) continue;
				}

				if( buff == this.buff ) {
					if( ! this.devided && this.onLine_displayed ) this.setOptions_Devide();

					if( ! this.noGroup && ! this.noLabel && this.labelOpt ) {
						var newOPT = document.createElement( 'option' );
						var newOPT2 = document.createElement( 'option' );
						newOPT.text = newOPT2.text = "";

						if( ! this.modifyOJOnly ) {
							if( JLJS.env.isIE ) this.cityNode.add( newOPT, this.buff + 1 );
							else this.cityNode.appendChild( newOPT );
						}
						if( this.cityNode_OJ )
							if( ! this.OJ_noAreaSelection ) {
								if( JLJS.env.isIE ) this.cityNode_OJ.add( newOPT2, this.buff + 1 );
								else this.cityNode_OJ.appendChild( newOPT2 );
							}
						this.buff ++;

						var newOPT = document.createElement( 'option' );
						var newOPT2 = document.createElement( 'option' );
						newOPT.text = newOPT2.text = "< " + countryName + " >";

						if( ! this.modifyOJOnly ) {
							if( JLJS.env.isIE ) this.cityNode.add( newOPT, this.buff + 1 );
							else this.cityNode.appendChild( newOPT );
						}
						if( this.cityNode_OJ )
							if( ! this.OJ_noAreaSelection ) {
								if( JLJS.env.isIE ) this.cityNode_OJ.add( newOPT2, this.buff + 1 );
								else this.cityNode_OJ.appendChild( newOPT2 );
							}
						this.buff ++;
					}

					if( ! this.onLine_displayed && area ) {
						if( ! this.modifyOJOnly ) {
							this.cityNode.options[ this.buff ].selected = true;
							this.selectedIndex = this.buff;
						}
						if( this.citiNody_OJ )
							if( ! this.OJ_noAreaSelection ) {
								this.cityNode_OJ.options[ this.buff ].selected = true;
								this.selectedIndex_OJ = this.buff;
							}
					}
				}

				var cityName = devide ? "-------------" : ! this.EN ? city[ "title_J" ] : city[ "title_E" ];
				var value = devide ? "" : city[ "CD" ];
				var newOPT = document.createElement( 'option' );
				var newOPT2 = document.createElement( 'option' );

				if( this.defaultCity && value == this.defaultCity )
					if( ! this.modifyOJOnly ) {
						newOPT.selected = true;
						this.selectedIndex = this.buff;
					}
				if( this.defaultCity_OJ && value == this.defaultCity_OJ )
					if( ! this.OJ_noAreaSelection ) {
						newOPT2.selected = true;
						this.selectedIndex_OJ = this.buff;
					}

				newOPT.value = newOPT2.value = value;


				if( ! this.noGroup && ! this.labelOpt ) {
					newOPT.innerHTML = newOPT2.innerHTML = cityName;
					if( ! this.modifyOJOnly )
						newOPG.appendChild( newOPT );
					if( this.cityNode_OJ )
						if( ! this.OJ_noAreaSelection )
							newOPG2.appendChild( newOPT2 );
				}


				else {
					newOPT.text = newOPT2.text = cityName;
					if( ! this.modifyOJOnly ) {
						if( JLJS.env.isIE ) this.cityNode.add( newOPT, this.buff + 1 );
						else this.cityNode.appendChild( newOPT );
					}
					if( this.cityNode_OJ )
						if( ! this.OJ_noAreaSelection ) {
							if( JLJS.env.isIE ) this.cityNode_OJ.add( newOPT2, this.buff + 1 );
							else this.cityNode_OJ.appendChild( newOPT2 );
						}
				}

				this.buff ++;
			}


			if( ! this.noGroup && ! this.labelOpt ) {
				if( buff != this.buff ) {
					if( ! this.modifyOJOnly )
						this.cityNode.appendChild( newOPG );
					if( this.cityNode_OJ )
						if( ! this.OJ_noAreaSelection )
							this.cityNode_OJ.appendChild( newOPG2 );
				}
			}
		}

		if( ! this.modifyOJOnly )
			this.cityNode.options.selectedIndex = this.selectedIndex;
		if( this.cityNode_OJ )
			if( ! this.OJ_noAreaSelection )
				this.cityNode_OJ.options.selectedIndex = this.selectedIndex_OJ;
	}
};




JLJS_TMs = [];
JLJS_TMFs = [];

function JLJS_TicketModule( formNode ) {
	if( ! formNode ) return;
	this.formNode = formNode;
	this.formNode._TM_instance_ = this;
	this.formMethod = null;
	this.formTarget = null;
	this.block = null;
	this.number = null;
	this.isSchedule = null;
	this.isFromAbroad = null;
	this.isFares = null;
	this.dateSelectors = [];
	this.narrowDownSelector = {};
	this.isLogin = null;


	this.action = JLJS02.site.region.isJP ?
		"https://ag.5931.jal.co.jp/jalint/toVacant.do" :
		"http://www.5931.jal.co.jp/cgi-bin/db2www/dotcom.vacantseat.out.d2w/report";

	this.stopOverAction = "/inter_so_swf/";	

	this.faresAction = "https://ag.5931.jal.co.jp/jalfares/init.do";

	this.oldAction = "http://www.5931.jal.co.jp/cgi-bin/vacantseat";
	this.schedAction = "http://www.5931.jal.co.jp/rsvInter/ScheduleInfoResult.do";

	this.framesetAction = JLJS02.site.region.isJP ?	
		"/cgi-bin/jal/en/frameset/report.cgi" :
		"/world/common/script/frameset/";


	this.cookiePRMs = [
		"PRM_DEPAREA", "PRM_DEPARTURE",
		"PRM_ARRAREA", "PRM_ARRIVAL",
		"PRM_OPEN_DEPARTURE", "PRM_OPEN_ARRIVAL",
		"PRM_MEETINGMONTH", "PRM_MEETINGDATE",
		"PRM_SENDINGMONTH", "PRM_SENDINGDATE"
	];
}


JLJS_TicketModule.prototype = {
	private_submitCheck : function() {

		return true;
	},

	submitFormSafari : function(frm) {
		var frmId = "addFormSafari";
		var addFrmElm = document.getElementById(frmId);
		
		if(addFrmElm) {
		
			document.body.removeChild(addFrmElm);
			
		}
		
		var createFrm = document.createElement("form");
		createFrm.id = frmId;
		createFrm.action = frm.action;
		createFrm.method = frm.method;
		createFrm.target = frm.target;
		
		var frmElms = frm.elements;
		for(var i=0; i<frmElms.length; i++) {
		
			frmElm = frmElms[i];
			if(!frmElm.disabled) {
			
				var name = "";
				var value = "";
				if(frmElm.type == "text" || 
					frmElm.type == "password" || 
					frmElm.type == "hidden" || 
					(frmElm.type == "radio" && frmElm.checked) || 
					(frmElm.type == "checkbox" && frmElm.checked) || 
					frmElm.type == "textarea") {
					
					name = frmElm.name;
					value = frmElm.value;
					
				} else if(frmElm.type == "select-one") {
				
					name = frmElm.name;
					value = frmElm.options[frmElm.selectedIndex].value;
					
				}
				
				if(name) {
				
					var createInput = document.createElement("input");
					createInput.type = "hidden";
					createInput.name = name;
					createInput.value = value;
					createFrm.appendChild(createInput);
					
				}
				
			}
		
		}
		
		document.body.appendChild(createFrm);
		addFrmElm = document.getElementById(frmId)
		addFrmElm.submit();
		
	},

	submitForm : function() {
		this.formNode.action = this.action;
		this.formNode.method = this.formMethod ? this.formMethod : "post";

		if(this.formTarget){
			this.formNode.target = this.formTarget;
		}else{
			if(JLJS02.site.region.isTW && JLJS02.site.lang.isEN){
				this.formNode.target = "otherwindow";
			}else{
				this.formNode.target = "_self";
			}
		}

		if( this.isSchedule ) {
			if( JLJS02.site.region.isJP && ! JLJS02.site.lang.isEN )
				this.formNode.action = this.schedAction;
			else {
				this.formNode[ "programPath" ].value = this.schedAction;
				this.formNode.action = this.framesetAction;
				this.formNode.method = "get";
			}
		}

		else if( this.isFares ) {
			this.formNode[ "flg_fun_no" ].value = "50";
			this.formNode.action = this.faresAction;
		}

		else {
			this.formNode.target = "otherwindow";
		}



		var node = this.formNode[ "PRM_SEARCH_KIND1" ];
		if( node ) {
			var type = node.type ? node.type : node[ 0 ].type;
			var value;
			switch( type ) {
				case "text": value = node.value; break;
				case "hidden": value = node.value; break;
				case "checkbox": if( node.checked ) value = node.value; break;
				case "select-one": value = node.options[ node.selectedIndex ].value; break;
				case "radio":
					for( var i = 0; i < node.length; i ++ )
						if( node[ i ].checked ) value = node[ i ].value;
					break;
			}
			if( value == 2 || value == 3 ) {
				this.formNode[ "flg_fun_no" ].value = "41";
				this.formNode.action = this.stopOverAction;
			}
		}

		if( ! this.private_submitCheck()) return false;


		var domain = document.domain;

		var path = "/";


		for ( var i = 0; i < this.cookiePRMs.length; i ++ ) {
			var PRM = this.cookiePRMs[ i ];
			if( this.formNode[ PRM ] ) {
				var value = PRM + this.number + "=" + this.formNode[ PRM ].value + ";";
				value += "domain=" + domain + ";";
				value += "path=" + path + ";";

				document.cookie = value;
			}
		}

		var da = this.formNode[ "PRM_DEPAREA" ];
		var aa = this.formNode[ "PRM_ARRAREA" ];
		if( da ) da.disabled = true;
		if( aa ) aa.disabled = true;
		if(JLJS.env.isSafari) {
			this.submitFormSafari(this.formNode);
		} else {
			this.formNode.submit();
		}
		if( da ) da.disabled = false;
		if( aa ) aa.disabled = false;

		return false;
	}
};




function JLJS_TicketModuleSetup() {
	var targetBlockClass = 'ticketModule';
	var targetBlockClassPtn_sched = /(schedule | schedule)/;
	var monthDatePairs = [[ 'PRM_MEETINGMONTH', 'PRM_MEETINGDATE' ], [ 'PRM_SENDINGMONTH', 'PRM_SENDINGDATE' ]];
	var calendarClasses = [[ 'TM_Calendar_Meet', 'meet' ], [ 'TM_Calendar_Send', 'send' ]];
	var narrowDownArgs = [[ 'd', 'PRM_DEPAREA', 'PRM_DEPARTURE', 'PRM_OPEN_ARRIVAL' ], [ 'a', 'PRM_ARRAREA', 'PRM_ARRIVAL', 'PRM_OPEN_DEPARTURE' ]];

	var blocks = JLJS.getElementsByClassName( targetBlockClass );
	if( ! blocks ) return;
	for( var i = 0; i < blocks.length; i ++ ) {

		var block = blocks[ i ];
		var form  = ( block ) ? JLJS.getElementsByTagName( 'form', block )[ 0 ] : null;
		if( ! form ) continue;
		var JLJS_TM = new JLJS_TicketModule( form );
		JLJS_TM.number = JLJS_TMs.length;
		JLJS_TMs[ JLJS_TMs.length ] = JLJS_TM;
		JLJS_TM.block = block;
		JLJS_TM.isLogin = ( typeof Hantei != "function" ) ? false : Hantei();
		if( JLJS.getAttr( JLJS_TM.block, "class" ).match( targetBlockClassPtn_sched ))
			JLJS_TM.isSchedule = true;


		if( arguments[ JLJS_TM.number ][ 3 ] ) {
			if( arguments[ JLJS_TM.number ][ 3 ][ "method" ] ) JLJS_TM.formMethod = arguments[ JLJS_TM.number ][ 3 ][ "method" ];
			if( arguments[ JLJS_TM.number ][ 3 ][ "target" ] ) JLJS_TM.formTarget = arguments[ JLJS_TM.number ][ 3 ][ "target" ];
			JLJS_TM.isFromAbroad = ( arguments[ JLJS_TM.number ][ 3 ][ "fromAbroad" ] ) ? true : false;
		}

		JLJS.addEvent( JLJS_TM.formNode, 'submit', function( e ) {
			if( ! JLJS_TM.submitForm()) e.preventDefault();
		} );






		var defaultDate = [];
		var m, d;
		for( var j = 0; j < monthDatePairs.length; j ++ ) {
			defaultDate[ j ] = arguments[ JLJS_TM.number ][ 2 ][ "default" ][ j ];
			if( arguments[ JLJS_TM.number ][ 2 ][ "ignoreCookie" ] ) {}
			else {
				m = JLJS02.getValueFromCookie( monthDatePairs[ j ][ 0 ] + JLJS_TM.number );
				d = JLJS02.getValueFromCookie( monthDatePairs[ j ][ 1 ] + JLJS_TM.number );
				if( m && d ) defaultDate[ j ] = m + "-" + d;
			}
		}

		var JLJS_TMDS = new JLJS_TM_DateSelector( JLJS_TM, monthDatePairs[ 0 ][ 0 ], monthDatePairs[ 0 ][ 1 ], monthDatePairs[ 1 ][ 0 ], monthDatePairs[ 1 ][ 1 ] );
		JLJS_TMDSs[ JLJS_TMDSs.length ] = JLJS_TMDS;
		JLJS_TMDS.dateSpecify( defaultDate[ 0 ], defaultDate[ 1 ] );




		for( var j = 0; j < calendarClasses.length; j ++ ) {
			var calImg =JLJS.getElementsByClassName( calendarClasses[ j ][ 0 ], "img", block )[ 0 ];
			if( ! calImg ) continue;
			if( JLJS.env.isMac && JLJS.env.isIE ) { calImg.parentNode.removeChild( calImg ); continue; }
			JLJS_TMDS.calendars[ j ] = calImg;
			JLJS_TMDS.calendars[ j ].type = calendarClasses[ j ][ 1 ];
			JLJS_TMDS.calendars[ j ]._TMDS_instance_ = JLJS_TMDS;
			JLJS.addEvent( JLJS_TMDS.calendars[ j ], "click", function( e ) {
					JLJS_TMCAL.click( e.target.type, e.target._TMDS_instance_.number );
			} );
		}




		for( var j = 0; j < narrowDownArgs.length; j ++ ) {
			var defSet = arguments[ JLJS_TM.number ][ j ][ "areaSlctSet" ];
			var defArea = arguments[ JLJS_TM.number ][ j ][ "default" ][ 0 ];
			var defCity = arguments[ JLJS_TM.number ][ j ][ "default" ][ 1 ];
			var defCity_OJ = arguments[ JLJS_TM.number ][ j ][ "default" ][ 2 ];

			var JLJS_TMAND = new JLJS_TM_airportNarrowDown( JLJS_TM, narrowDownArgs[ j ][ 0 ], narrowDownArgs[ j ][ 1 ], narrowDownArgs[ j ][ 2 ], narrowDownArgs[ j ][ 3 ], defSet, defArea );

			JLJS_TMAND.noGroup = ( arguments[ JLJS_TM.number ][ j ][ "noGroup" ] ) ? true : false;
			JLJS_TMAND.noLabel = ( arguments[ JLJS_TM.number ][ j ][ "noLabel" ] ) ? true : false;
			JLJS_TMAND.noDevide = ( arguments[ JLJS_TM.number ][ j ][ "noDevide" ] ) ? true : false;
			JLJS_TMAND.labelOpt = (
				arguments[ JLJS_TM.number ][ j ][ "labelOpt" ] || 
				( JLJS02.env.isIE50 || JLJS02.env.isIE55 || ( JLJS.env.isMac && JLJS.env.isIE ) || JLJS.env.isOpera )
			) ? true : false;
			JLJS_TMAND.noDOM = ( JLJS02.env.isIE50 ) ? true : false;
			JLJS_TMAND.onLineOnly = ( arguments[ JLJS_TM.number ][ j ][ "onLineOnly" ] ) ? true : false;
			JLJS_TMAND.onLineSeparatingView_Off = ( arguments[ JLJS_TM.number ][ j ][ "onLineSeparatingView_Off" ] ) ? true : false;
			JLJS_TMAND.noAreaSelection = ( arguments[ JLJS_TM.number ][ j ][ "noAreaSelection" ] ) ? true : false;
			JLJS_TMAND.EN = ( arguments[ JLJS_TM.number ][ j ][ "EN" ] ) ? true : false;
			JLJS_TMAND.AMD = ( arguments[ JLJS_TM.number ][ j ][ "AMD" ] ) ? true : false;
			if( arguments[ JLJS_TM.number ][ 3 ] )
				JLJS_TMAND.OJ_noAreaSelection = ( arguments[ JLJS_TM.number ][ 3 ][ "OJ_noAreaSelection" ] ) ? true : false;

			var ignoreCookie = ( typeof arguments[ JLJS_TM.number ][ j ][ "ignoreCookie" ] == "undefined" ) ?
				false : arguments[ JLJS_TM.number ][ j ][ "ignoreCookie" ];


			var cookieArea = JLJS02.getValueFromCookie( narrowDownArgs[ j ][ 1 ] + JLJS_TM.number );
			var cookieCity = JLJS02.getValueFromCookie( narrowDownArgs[ j ][ 2 ] + JLJS_TM.number );
			var cookieCity_OJ = JLJS02.getValueFromCookie( narrowDownArgs[ j ][ 3 ] + JLJS_TM.number );

			JLJS_TMAND.setDefaultByCookie( [ defArea, cookieArea ], [ defCity, cookieCity ], [ defCity_OJ, cookieCity_OJ ], ignoreCookie );

			JLJS_TMAND.setAreaSelector();

			if( JLJS_TMAND.defaultArea ) {
				if( JLJS_TMAND.area )
					for( var k = 0; k < JLJS_TMAND.area.options.length; k ++ )
						if( JLJS_TMAND.area.options[ k ].value == JLJS_TMAND.defaultArea ) {
							JLJS_TMAND.area.options[ k ].selected = true;
							break;
						}
				JLJS_TMAND.narrowDown( JLJS_TMAND.defaultArea );
			}
			else
				JLJS_TMAND.narrowDown();



			JLJS_TMAND.defaultArea = null;
			JLJS_TMAND.defaultCity = null;
			JLJS_TMAND.defaultCity_OJ = null;



			if( JLJS_TMAND.areaNode ) {
				JLJS.addEvent( JLJS_TMAND.areaNode, 'change', function( e ) {
					e.target._TMAND_instance_.narrowDown( e.target.value );
				} );
			}
		}
	}

	JLJS_TMCAL = new JLJS_TM_Calendar( JLJS_TMs );

}


function JLJS_TicketModuleSetup_Fares() {
	var targetBlockClass = 'ticketModule_Fares';
	var monthDatePairs = [[ 'PRM_MEETINGMONTH', 'PRM_MEETINGDATE' ], [ 'PRM_SENDINGMONTH', 'PRM_SENDINGDATE' ]];
	var narrowDownArgs = [[ 'd', 'PRM_DEPARTAREA', 'PRM_DEPARTURE', 'PRM_OPEN_ARRIVAL' ], [ 'a', 'PRM_ARRIVEAREA', 'PRM_ARRIVAL', 'PRM_OPEN_DEPARTURE' ]];

	var blocks = JLJS.getElementsByClassName( targetBlockClass );
	if( ! blocks ) return;
	for( var i = 0; i < blocks.length; i ++ ) {

		var block = blocks[ i ];
		var form = ( block ) ? JLJS.getElementsByTagName( 'form', block )[ 0 ] : null;
		if( ! form ) continue;
		var JLJS_TMF = new JLJS_TicketModule( form );
		JLJS_TMF.number = JLJS_TMFs.length;
		JLJS_TMFs[ JLJS_TMFs.length ] = JLJS_TMF;
		JLJS_TMF.block = block;
		JLJS_TMF.isFares = true;
		JLJS_TMF.isLogin = ( typeof Hantei != "function" ) ? false : Hantei();


		if( arguments[ JLJS_TMF.number ][ 3 ] ) {
			if( arguments[ JLJS_TMF.number ][ 3 ][ "method" ] ) JLJS_TMF.formMethod = arguments[ JLJS_TMF.number ][ 3 ][ "method" ];
			if( arguments[ JLJS_TMF.number ][ 3 ][ "target" ] ) JLJS_TMF.formTarget = arguments[ JLJS_TMF.number ][ 3 ][ "target" ];
			JLJS_TMF.isFromAbroad = ( arguments[ JLJS_TMF.number ][ 3 ][ "fromAbroad" ] ) ? true : false;
		}

		JLJS.addEvent( JLJS_TMF.formNode, 'submit', function( e ) {
			if( ! JLJS_TMF.submitForm()) e.preventDefault();
		} );







		for( var j = 0; j < narrowDownArgs.length; j ++ ) {
			var defSet = arguments[ JLJS_TMF.number ][ j ][ "areaSlctSet" ];
			var defArea = arguments[ JLJS_TMF.number ][ j ][ "default" ][ 0 ];
			var defCity = arguments[ JLJS_TMF.number ][ j ][ "default" ][ 1 ];
			var defCity_OJ = arguments[ JLJS_TMF.number ][ j ][ "default" ][ 2 ];

			var JLJS_TMFAND = new JLJS_TM_airportNarrowDown( JLJS_TMF, narrowDownArgs[ j ][ 0 ], narrowDownArgs[ j ][ 1 ], narrowDownArgs[ j ][ 2 ], narrowDownArgs[ j ][ 3 ], defSet, defArea );

			JLJS_TMFAND.noGroup = ( arguments[ JLJS_TMF.number ][ j ][ "noGroup" ] ) ? true : false;
			JLJS_TMFAND.noLabel = ( arguments[ JLJS_TMF.number ][ j ][ "noLabel" ] ) ? true : false;
			JLJS_TMFAND.noDevide = ( arguments[ JLJS_TMF.number ][ j ][ "noDevide" ] ) ? true : false;
			JLJS_TMFAND.labelOpt = (
				arguments[ JLJS_TMF.number ][ j ][ "labelOpt" ] || 
				( JLJS02.env.isIE50 || JLJS02.env.isIE55 || ( JLJS.env.isMac && JLJS.env.isIE ) || JLJS.env.isOpera )
			) ? true : false;
			JLJS_TMFAND.noDOM = ( JLJS02.env.isIE50 ) ? true : false;
			JLJS_TMFAND.onLineOnly = ( arguments[ JLJS_TMF.number ][ j ][ "onLineOnly" ] ) ? true : false;
			JLJS_TMFAND.onLineSeparatingView_Off = ( arguments[ JLJS_TMF.number ][ j ][ "onLineSeparatingView_Off" ] ) ? true : false;
			JLJS_TMFAND.noAreaSelection = ( arguments[ JLJS_TMF.number ][ j ][ "noAreaSelection" ] ) ? true : false;
			JLJS_TMFAND.EN = ( arguments[ JLJS_TMF.number ][ j ][ "EN" ] ) ? true : false;
			JLJS_TMFAND.AMD = ( arguments[ JLJS_TMF.number ][ j ][ "AMD" ] ) ? true : false;
			if( arguments[ JLJS_TMF.number ][ 3 ] )
				JLJS_TMAND.OJ_noAreaSelection = ( arguments[ JLJS_TMF.number ][ 3 ][ "OJ_noAreaSelection" ] ) ? true : false;

			var ignoreCookie = ( typeof arguments[ JLJS_TMF.number ][ j ][ "ignoreCookie" ] == "undefined" ) ?
				false : arguments[ JLJS_TMF.number ][ j ][ "ignoreCookie" ];


			var cookieArea = JLJS02.getValueFromCookie( narrowDownArgs[ j ][ 1 ] + JLJS_TMF.number );
			var cookieCity = JLJS02.getValueFromCookie( narrowDownArgs[ j ][ 2 ] + JLJS_TMF.number );
			var cookieCity_OJ = JLJS02.getValueFromCookie( narrowDownArgs[ j ][ 3 ] + JLJS_TMF.number );

			JLJS_TMFAND.setDefaultByCookie( [ defArea, cookieArea ], [ defCity, cookieCity ], [ defCity_OJ, cookieCity_OJ ], ignoreCookie );

			JLJS_TMFAND.setAreaSelector();

			if( JLJS_TMFAND.defaultArea ) {
				if( JLJS_TMFAND.area )
					for( var k = 0; k < JLJS_TMFAND.area.options.length; k ++ )
						if( JLJS_TMFAND.area.options[ k ].value == JLJS_TMFAND.defaultArea ) {
							JLJS_TMFAND.area.options[ k ].selected = true;
							break;
						}
				JLJS_TMFAND.narrowDown( JLJS_TMFAND.defaultArea );
			}
			else
				JLJS_TMFAND.narrowDown();



			JLJS_TMFAND.defaultArea = null;
			JLJS_TMFAND.defaultCity = null;
			JLJS_TMFAND.defaultCity_OJ = null;



			if( JLJS_TMFAND.areaNode ) {
				JLJS.addEvent( JLJS_TMFAND.areaNode, 'change', function( e ) {
					e.target._TMAND_instance_.narrowDown( e.target.value );
				} );
			}
		}
	}
}










JLJS_AMDs = [];

function JLJS_ticketModule_Amadeus( formNode ) {
	if( ! formNode ) return;
	this.formNode = formNode;
	this.formNode._TM_instance_ = this;
	this.formMethod = null;
	this.formTarget = null;
	this.block = null;
	this.additionalPamameterBlock = null;
	this.number = null;
	this.dateSelectors = [];
	this.narrowDownSelector = {};

	this.EN = null;
	this.isJumpingToOJPage = null;
	this.OJ_URL = null;

	this.fareType = null;
	this.tripType = null;
	this.depYearMon = null;
	this.depYear = null;
	this.depMon = null;
	this.depDay = null;
	this.depTime = null;
	this.rtnYearMon = null;
	this.rtnYear = null;
	this.rtnMon = null;
	this.rtnDay = null;
	this.rtnTime = null;
	this.ADT = null;
	this.CHD = null;
	this.INF = null;

	this.isV10 =
		JLJS02.site.region.isAU || JLJS02.site.region.isSG || JLJS02.site.region.isHK ||
		JLJS02.site.region.isUK || JLJS02.site.region.isAR || JLJS02.site.region.isFR ||
		JLJS02.site.region.isDE || JLJS02.site.region.isNL;
	this.isV9 =
		null;


	this.cookiePRMs = [
		"B_MONTH", "B_DAY", "B_TIME",
		"E_MONTH", "E_DAY", "E_TIME",
		"B_MONTH_1", "B_DAY_1", "B_TIME_1",
		"B_MONTH_2", "B_DAY_2", "B_TIME_2",
		"B_MONTH_3", "B_DAY_3", "B_TIME_3",
		"B_LOCATION_1", "E_LOCATION_1",
		"B_LOCATION_2", "E_LOCATION_2",
		"B_LOCATION_3", "E_LOCATION_3",
		"FIELD_ADT_NUMBER", "FIELD_CHD_NUMBER", "FIELD_INFANTS_NUMBER"
	];
}

JLJS_ticketModule_Amadeus.prototype = {
	setFormElements : function() {
		this.formNode.method =
			this.formMethod ? this.formMethod :
			JLJS02.site.region.isERmember ? "post" :
			JLJS02.site.region.isARmember ? "post" : "post";
		this.formNode.target =
			this.formTarget ? this.formTarget :
			this.isV10 ? "IBE_window" :
			"otherwindow";

		JLJS.addEvent( this.formNode, 'submit', function( e ) {
			if( ! e.target._TM_instance_.submitCheck()) e.preventDefault();
		} );

		this.additionalParameterBlock = this.formNode.appendChild( document.createElement( 'div' ) );
	},

	toggleOR : function() {
		this.getTripType();
		var value;
		if( typeof arguments[ 0 ] != "undefined" )
			value = arguments[ 0 ];
		else {
			var node = this.formNode[ "TRIP_TYPE" ];
			var type = node.type ? node.type : node[ 0 ].type;
			if( type != "radio" ) return;
		}
		this.formNode[ "E_MONTH" ].disabled =
		this.formNode[ "E_DAY" ].disabled =
		this.formNode[ "E_TIME" ].disabled = ( this.tripType == "O" ) ? true : false;
	},

	getFareType : function() {
		var node = this.formNode[ "fareType" ];
		var type = node ? node.type ? node.type : node[ 0 ].type : null;
		var value = null;
		if( type ) {
			switch( type ) {
				case "text": value = node.value; break;
				case "hidden": value = node.value; break;
				case "checkbox": if( node.checked ) value = node.value; break;
				case "select-one": value = node.options[ node.selectedIndex ].value; break;
				case "radio":
					for( var j = 0; j < node.length; j ++ )
						if( node[ j ].checked ) value = node[ j ].value;
					break;
			}
		}
		this.fareType = value ? value : "pseudoVal";
	},

	getTripType : function() {
		var node = this.formNode[ "TRIP_TYPE" ];
		var type = node ? node.type ? node.type : node[ 0 ].type : null;
		var value = null;
		if( type ) {
			switch( type ) {
				case "text": value = node.value; break;
				case "hidden": value = node.value; break;
				case "checkbox": if( node.checked ) value = node.value; break;
				case "select-one": value = node.options[ node.selectedIndex ].value; break;
				case "radio":
					for( var j = 0; j < node.length; j ++ )
						if( node[ j ].checked ) value = node[ j ].value;
					break;
			}
		}
		this.tripType = value;
	},

	private_submitCheck : function() {

		return false;
	},

	submitCheck : function() {
		this.convertMonValue();
		this.getFareType();
		this.getTripType();
		var errorMsg = "";

		if( this.formNode[ "B_LOCATION_1" ].options[ this.formNode[ "B_LOCATION_1" ].selectedIndex ].value == "" )
			errorMsg +=
				! this.EN ? "- \u51FA\u767A\u5730\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002\n" :
				JLJS02.site.region.isFR ? "- Choisir une ville de départ.\n" :
				JLJS02.site.region.isDE ? "- Bitte geben Sie einen Zielflughafen ein.\n" :
				"- Choose a departure city.\n";
		if( this.formNode[ "E_LOCATION_1" ].options[ this.formNode[ "E_LOCATION_1" ].selectedIndex ].value == "" )
			errorMsg +=
				! this.EN ? "- \u76EE\u7684\u5730\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002\n" :	
				JLJS02.site.region.isFR ? "- Choisir une ville d'arrivée.\n" :
				JLJS02.site.region.isDE ? "- Bitte geben Sie einen Abflughafen ein.\n" :
				"- Choose an arrival city.\n";

		if( this.isV9 && this.fareType == "pseudoVal" )
			errorMsg +=
				! this.EN ? "- \u904B\u8CC3\u306E\u7A2E\u985E\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n" :
				JLJS02.site.region.isFR ? "- Choisissez votre tarif.\n" :
				JLJS02.site.region.isDE ? "- Bitte wählen Sie eine Tarifart.\n" :
				"- Choose fare type.\n";

		else {
			this.depYearMon = this.formNode[ "B_MONTH" ].options[ this.formNode[ "B_MONTH" ].selectedIndex ].value;
			this.depDay = this.formNode[ "B_DAY" ].options[ this.formNode[ "B_DAY" ].selectedIndex ].value;
			this.depDay = ( this.depDay.length < 2 ) ? ( "0" + this.depDay ) : this.depDay;
			this.depTime = this.formNode[ "B_TIME" ].value ? this.formNode[ "B_TIME" ].value : "0000";
			this.formNode[ "B_DATE_1" ].value = this.depYearMon + this.depDay + this.depTime;

			this.depYear = this.depYearMon.substr( 0, 4 );
			this.depMon = this.depYearMon.substr( 4, 2 );



			var errorMsg_tmp = this.checkDate( this.depMon, this.depDay, this.depYear, 0 );
			if( errorMsg_tmp ) errorMsg += errorMsg_tmp;

			else {
				var today = new Date();
				var depDate = new Date();
				var limitDate = new Date();
				var stay = new Date();

				depDate.setFullYear( this.depYear, eval( this.depMon ) - 1, this.depDay );
				
				var node = this.formNode[ "E_AREA" ];
				var isToJPN = node ? node[ node.selectedIndex ].value.match( /^JPN(_[0-9]+)?$/ ) : null;

				if (!isToJPN){
					if ( JLJS02.site.region.isAR && this.fareType == "Super Sale" && this.destination == "JPN" ){
						isToJPN = true;
					}
				}

				var limit = [ 2100, 12, 31 ];
				if ( JLJS02.site.region.isAR && this.fareType == "Super Sale" ) {
					if (isToJPN) {
						var dep = this.formNode[ "B_LOCATION_1" ].value;
						if (dep == "HNL" || dep == "KOA") {
							limit = [ 2008, 8, 24 ];
						}else{
							limit = [ 2008, 8, 24 ];
						}
					}else{
						limit = [ 2008, 5, 31 ];
					}
				}

				limitDate.setFullYear( limit[ 0 ], limit[ 1 ] - 1, limit[ 2 ] );
				var monNames =
					JLJS02.site.region.isFR ? [ "Jan", "Fev", "Mar", "Avr", "Mai", "Juin", "Juil", "Août", "Sep", "Oct", "Nov", "Dec" ] :
					JLJS02.site.region.isDE ? [ "Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez" ] :
					[ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];



				var errorMsg_tmp = "";
				if( limitDate.getTime() < depDate.getTime()) {
					errorMsg_tmp =
						! this.EN ? "- \u3053\u306E\u904B\u8CC3\u306E\u9069\u7528\u671F\u9650\u306F" + limit[ 0 ] + "\u5E74" + limit[ 1 ] + "\u6708" + limit[ 2 ] + "\u65E5\u3067\u3059\u3002\n" :
						JLJS02.site.region.isFR ? "La validité de ce tarif expire le " + limit[ 2 ] + " " + monNames[ limit[ 1 ] - 1 ] + ", " + limit[ 0 ] + ".\n" :
						JLJS02.site.region.isDE ? "Dieser Tarif kann nach dem " + limit[ 2 ] + "/" + limit[ 1 ] + "/" + limit[ 0 ] + " nicht angewandt werden.\n" :
						"- The application of this fare expires on " + monNames[ limit[ 1 ] - 1 ] + " " + limit[ 2 ] + ", " + limit[ 0 ] + ".\n";
				}
				if( errorMsg_tmp ) errorMsg += errorMsg_tmp;


				else {
					var days_beforeDep = Math.floor(( depDate.getTime() - today.getTime()) / ( 1000 * 60 * 60 * 24 )); 
					var n = null;
					if( JLJS02.site.region.isAU )
						n = days_beforeDep < 5 ? 5 : null;

					if( JLJS02.site.region.isHK )
						n = days_beforeDep < 2 ? 2 : null;
						
					if( JLJS02.site.region.isSG )
						n = days_beforeDep < 1 ? 1 : null;

					else if( JLJS02.site.region.isUK )
						n =
							( this.fareType == "E" && days_beforeDep < 7 ) ? 7 :
							( this.fareType == "B" && days_beforeDep < 7 ) ? 7 :
							( this.fareType == "Super APEX" && days_beforeDep < 35 ) ? 35 :
							( this.fareType == "APEX" && days_beforeDep < 21 ) ? 21 :
							( this.fareType == "PEX" && days_beforeDep < 7 ) ? 7 :
							( this.fareType == "Economy Saver" && days_beforeDep < 7 ) ? 7 :
							( this.fareType == "Leisure Business Saver" && days_beforeDep < 14 ) ? 14 :
							( this.fareType == "Business Saver" && days_beforeDep < 7 ) ? 7 :
							days_beforeDep < 0 ? 0 : null;

					else if( JLJS02.site.region.isAR )
						n = days_beforeDep < 0 ? 0 : null;


					var errorMsg_tmp = "";

					if( n == 0 ) errorMsg_tmp =
						! this.EN ? "- \u51FA\u767A\u65E5\u304C\u672C\u65E5\u3088\u308A\u3082\u524D\u306B\u306A\u3063\u3066\u304A\u308A\u307E\u3059\u3002\n" :
						JLJS02.site.region.isFR ? "- La date de départ doit être au plus tôt demain.\n" :
						JLJS02.site.region.isDE ? "- Das Abflugdatum muss später als heute sein.\n" :
						"- Departure date shold be later than today.\n";



					else if( n ) errorMsg_tmp =
						! this.EN ? "- \u51FA\u767A\u65E5\u306E" + n + "\u65E5\u524D\u307E\u3067\u306B\u3054\u4E88\u7D04\u304C\u5FC5\u8981\u3067\u3059\u3002\n" :
						JLJS02.site.region.isFR ? "- La date de départ doit être au moins " + n + " jours avant le départ.\n" :
						JLJS02.site.region.isDE ? "- Das  Buchungsdatum muss mindestens " + n + " Tage vor der Reise sein.\n" :
						"- Booking date must be at least " + n + " days before departure.\n";
					if( errorMsg_tmp ) errorMsg += errorMsg_tmp;


					else if( this.tripType == "R" || this.tripType == "M" ) {
						this.rtnYearMon = this.formNode[ "E_MONTH" ].options[ this.formNode[ "E_MONTH" ].selectedIndex ].value;
						this.rtnDay = this.formNode[ "E_DAY" ].options[ this.formNode[ "E_DAY" ].selectedIndex ].value;
						this.rtnDay = ( this.rtnDay.length < 2 ) ? ( "0" + this.rtnDay ) : this.rtnDay;
						this.rtnTime = this.formNode[ "E_TIME" ].value ? this.formNode[ "E_TIME" ].value : "0000";
						this.formNode[ "B_DATE_2" ].value = this.rtnYearMon + this.rtnDay + this.rtnTime;

						this.rtnYear = this.rtnYearMon.substr( 0, 4 );
						this.rtnMon = this.rtnYearMon.substr( 4, 2 );



						var errorMsg_tmp = this.checkDate( this.rtnMon, this.rtnDay, this.rtnYear, 1 );
						if( errorMsg_tmp ) errorMsg += errorMsg_tmp;

						else {
							var rtnDate = new Date();
							rtnDate.setFullYear( this.rtnYear, eval( this.rtnMon ) - 1, this.rtnDay );


							var errorMsg_tmp = "";
							if( limitDate.getTime() < depDate.getTime()) {
								errorMsg_tmp =
									! this.EN ? "- \u3053\u306E\u904B\u8CC3\u306E\u9069\u7528\u671F\u9650\u306F" + limit[ 0 ] + "\u5E74" + limit[ 1 ] + "\u6708" + limit[ 2 ] + "\u65E5\u3067\u3059\u3002\n" :	
									JLJS02.site.region.isFR ? "La validité de ce tarif expire le " + limit[ 2 ] + " " + monNames[ limit[ 1 ] - 1 ] + ", " + limit[ 0 ] + ".\n" :
									"- The application of this fare expires on " + monNames[ limit[ 1 ] - 1 ] + " " + limit[ 2 ] + ", " + limit[ 0 ] + ".\n";
							}
							if( errorMsg_tmp ) errorMsg += errorMsg_tmp;

							else {

								if( depDate.getTime() > rtnDate.getTime())
									errorMsg +=
										! this.EN ? "- \u5E30\u56FD\u642D\u4E57\u65E5\u304C\u51FA\u767A\u65E5\u3088\u308A\u3082\u524D\u306B\u306A\u3063\u3066\u304A\u308A\u307E\u3059\u3002\n" :
										JLJS02.site.region.isFR ? "- La date de retour doit être ultérieure à la date de départ.\n" :
										JLJS02.site.region.isDE ? "- Das Rückflugdatum muss später als das Abflugdatum sein.\n" :
										"- Return date should be later than departure date.\n";


								else if( this.fareType.match( /^E(_lowest)?$/ ) || this.fareType.match( /^B(_lowest)?$/ ) || this.fareType == "F" ) {}

							}
						}
					}
				}
			}
		}


		if( this.isV10 ) {
			this.ADT = eval( this.formNode[ "FIELD_ADT_NUMBER" ].value );
			this.CHD = eval( this.formNode[ "FIELD_CHD_NUMBER" ].value );
			this.INF = eval( this.formNode[ "FIELD_INFANTS_NUMBER" ].value );
		}
		else {
			this.ADT = eval( this.formNode[ "ADTPAX" ].value );
			this.CHD = eval( this.formNode[ "CHDPAX" ].value );
			this.INF = eval( this.formNode[ "InfantPAX" ].value );
		}
		if( ! this.ADT )
			errorMsg +=
				! this.EN ? "- \u304A\u5B50\u69D8\u306E\u307F\u306E\u3054\u4E88\u7D04\u306F\u53D7\u3051\u4ED8\u3051\u3066\u304A\u308A\u307E\u305B\u3093\u3002\n" :
				JLJS02.site.region.isFR ? "- Avec un passager adulte au minimum.\n" :
				JLJS02.site.region.isDE ? "- Es muss mindestens ein erwachsener Passagier reisen.\n" :
				"- At least 1 adult passenger is required.\n";

		if ( this.ADT < this.INF )
			errorMsg +=
				! this.EN ? "- 1\u4E73\u5150\u306B\u3064\u304D\u5927\u4EBA\u4E00\u540D\u69D8\u306E\u540C\u4F34\u304C\u5FC5\u8981\u3067\u3059\u3002\n" :
				JLJS02.site.region.isFR ? "- " + this.ADT + " enfant(s) en bas âge seulement peuvent être réservés avec " + this.ADT + " adulte(s).\n" :
				JLJS02.site.region.isDE ? "- Pro " + this.ADT + " Erwachsene(r) kann/können nur " + this.ADT + " Kleinkind(er) gebucht werden.\n" :
				"- Only " + this.ADT + " infant(s) can be booked for " + this.ADT + " adult(s).\n";

		if( this.ADT + this.CHD > 9 )
			errorMsg +=
				! this.EN ? "- \u5927\u4EBA\uFF0B\u5B50\u4F9B\u306E\u5408\u8A08\u304C9\u540D\u69D8\u4EE5\u4E0A\u306E\u3054\u4E88\u7D04\u306F\u51FA\u6765\u307E\u305B\u3093\u3002\n" :
				JLJS02.site.region.isFR ? "- 9 passagers au maximum seulement peuvent être réservés [adulte(s) + enfant(s)].\n" :
				JLJS02.site.region.isDE ? "- Die Gesamtanzahl der Passagiere (Erwachsene und Kinder) darf nicht mehr als 9 betragen.\n" :
				"- Only 9 passengers maximum can be booked for adult(s) + child(ren).\n";


		if( this.private_submitCheck()) errorMsg += this.private_submitCheck();

		if( ! errorMsg ) {
			this.setHiddenPrm();
			this.writeCookie();
			if( this.tripType == "M" && this.isJumpingToOJPage ) {
				document.location = this.OJ_URL;
				return false;
			}
			else {
				if( this.isV10 )
					var wnd = window.open( "", "IBE_window", "width=820,height=700,resizable=yes,location=no,menubar=no,scrollbars=yes,status=yes,titlebar=yes,toolbar=no" );
				this.formNode.submit(); 
				this.reConvertMonValue();
				return true;
			}
		}
		else {
			alert( errorMsg );
			this.reConvertMonValue();
			return false;
		}
	},

	convertMonValue : function() {
		var d = new Date();
		var year   = d.getFullYear();
		var month  = d.getMonth();
		for( var i = 0; i < 12; i ++ ) {
			var Y = i < month ? year + 1 : year;
			var M = ( i + 1 ) < 10 ? "0" + ( i + 1 ) : ( i + 1 );
			this.formNode[ "B_MONTH" ].options[ i ].value = Y + "" + M;
			this.formNode[ "E_MONTH" ].options[ i ].value = Y + "" + M;
		}
	},

	reConvertMonValue : function() {
		for( var i = 0; i < 12; i ++ ) {
			this.formNode[ "B_MONTH" ].options[ i ].value = this.formNode[ "B_MONTH" ].options[ i ].value.substring(4,6);
			this.formNode[ "E_MONTH" ].options[ i ].value = this.formNode[ "E_MONTH" ].options[ i ].value.substring(4,6);
		}
	},

	setHiddenPrm : function() {

	
		/* ??????? (??) */
this.formNode[ "EMBEDDED_TRANSACTION" ].value = this.tripType == "M" ? "AirComplexAvailability" : "AirAvailability";
this.formNode[ "TRIP_FLOW" ].value = "YES";
this.formNode[ "DIRECT_LOGIN" ].value = "NO";
this.formNode[ "SEVEN_DAY_SEARCH" ].value = "TRUE";
for( var i = 1; i <= 6; i ++ )
	this.formNode[ "B_ANY_TIME_" + i ].value = "TRUE";


/* ??????? (V10) */

var disablePrms = [
	"SO_LANG_SITE_AGENCY_LINE1", "SO_LANG_SITE_AGENCY_LINE2",
	"SO_SITE_USER_MOD", "SO_SITE_MOD_DELIVERY", "SO_SITE_MOD_E_TICKET",
	"SO_SITE_USER_MOP", "SO_SITE_MOP_CREDIT_CARD", "SO_QUEUE_OFFICE_ID",
	"SO_SITE_ALLOW_SERVICE_FEE", "SO_SITE_SERVICE_FEE_MODE"
];

for( var i = 0; i < disablePrms.length; i ++ )
	if( typeof this.formNode[ disablePrms[ i ]] != "undefined" )
		this.formNode[ disablePrms[ i ]].disabled = true;

this.formNode[ "ARRANGE_BY" ].value = "N";

this.formNode[ "JL_SITE_LANGUAGE" ].value = ! this.EN ? "JP" : "EN";

this.formNode[ "LANGUAGE" ].value = ! this.EN ? "JP" : "GB";	

this.formNode[ "EXTERNAL_ID" ].value = "JAL_ER_NL";

/* ??????????? */
while( this.additionalParameterBlock.firstChild )
	this.additionalParameterBlock.removeChild( this.additionalParameterBlock.firstChild );

for( var i = 0; i < this.ADT; i ++ ) {
	var newINPUT = document.createElement( 'input' );
	newINPUT.type = "hidden";
	newINPUT.name = "TRAVELLER_TYPE_" + ( i + 1 );
	newINPUT.value = "ADT";
	this.additionalParameterBlock.appendChild( newINPUT );
}

for( var i = this.ADT; i < this.ADT + this.CHD; i ++ ) {
	var newINPUT = document.createElement( 'input' );
	newINPUT.type = "hidden";
	newINPUT.name = "TRAVELLER_TYPE_" + ( i + 1 );
	newINPUT.value = "CHD";
	this.additionalParameterBlock.appendChild( newINPUT );
}

// ??) ????V10???????????TRAVELLER_TYPE_n?"INF"???
// ??????HAS_INFANT_n?"TRUE"???
if( this.isV10 && this.fareType == "pseudoVal" && this.tripType != "M" ) {	// ??????
	for( var i = this.ADT + this.CHD; i < this.ADT + this.CHD + this.INF; i ++ ) {
		var newINPUT = document.createElement( 'input' );
		newINPUT.type = "hidden";
		newINPUT.name = "TRAVELLER_TYPE_" + ( i + 1 );
		newINPUT.value = "INF";
		this.additionalParameterBlock.appendChild( newINPUT );
	}
}
else {
	for( var i = 0; i < this.INF; i ++ ) {
		var newINPUT = document.createElement( 'input' );
		newINPUT.type = "hidden";
		newINPUT.name = "HAS_INFANT_" + ( i + 1 );
		newINPUT.value = "TRUE";
		this.additionalParameterBlock.appendChild( newINPUT );
	}
}

if( JLJS02.site.region.isERmember && ! JLJS02.site.region.isUK ) {
	if( this.INF ) {
		this.formNode[ "SO_SITE_USER_MOD" ].value = "EXPML";
		this.formNode[ "SO_SITE_MOD_DELIVERY" ].value = "TRUE";
		this.formNode[ "SO_SITE_MOD_E_TICKET" ].value = "FALSE";
	}
}


/* ?????????????? */


/* [FR DE NL V10] */

this.formNode.action = "/world/common/script/reservation_notice/NL/";

this.formNode[ "SITE" ].value = "BBSEBBSE";
this.formNode[ "CABIN" ].value = "";

for( var i = 1; i <= 6; i ++ ) {
	this.formNode[ "AIRLINE_" + i + "_1" ].value =
	this.formNode[ "AIRLINE_" + i + "_2" ].value =
	this.formNode[ "AIRLINE_" + i + "_3" ].value = "";
	this.formNode[ "RBD_" + i + "_1" ].value =
	this.formNode[ "RBD_" + i + "_2" ].value =
	this.formNode[ "RBD_" + i + "_3" ].value = "";
}

this.formNode[ "SEARCH_PAGE" ].value = "SD";

this.formNode[ "SO_SITE_CLASS_OF_SERVICE" ].disabled =
this.formNode[ "SO_SITE_FARE_TYPE" ].disabled =
this.formNode[ "SO_SITE_FP_UI_HIDE_MODIF_SRH" ].disabled = true;

this.formNode[ "SO_SITE_OFFICE_ID" ].value = "AMSJL18AA";

this.formNode[ "SO_LANG_SITE_AGENCY_LINE2" ].disabled = false;
this.formNode[ "SO_LANG_SITE_AGENCY_LINE2" ].value =
	! this.EN ? "0205-829-477" : "0205-829-488";

var SO_GL = function() { return(
	'<GLOBAL_LIST mode="complete"><NAME>SO_SINGLE_MULTIPLE_COMMAND_BUILDER</NAME><LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[AP <SOS_PHONE>]]></LIST_VALUE><LIST_VALUE>S</LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>3</CODE><LIST_VALUE><![CDATA[SROTHSYY-JAL EUROPEAN REGION INTERNET BOOKING ' + arguments[ 0 ] + ']]></LIST_VALUE><LIST_VALUE>S</LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>1</CODE><LIST_VALUE><![CDATA[APE-<USERMAIL_COMPLETE>]]></LIST_VALUE><LIST_VALUE>S</LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>3</CODE><LIST_VALUE><![CDATA[OSYYCTCT LON 44-20-7629-6956 JAL LONDON]]></LIST_VALUE><LIST_VALUE>S</LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>4</CODE><LIST_VALUE><![CDATA[OSYYCTCP <HFONE>]]></LIST_VALUE><LIST_VALUE>S</LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>4</CODE><LIST_VALUE><![CDATA[OSYYLCTC <SOS_PHONE>]]></LIST_VALUE><LIST_VALUE>S</LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>5</CODE><LIST_VALUE><![CDATA[OSYYSERVICEFEE EUR' + arguments[ 1 ] + ']]></LIST_VALUE><LIST_VALUE>S</LIST_VALUE></LIST_ELEMENT></GLOBAL_LIST><GLOBAL_LIST><NAME>SITE_SERVICE_FEE</NAME><LIST_ELEMENT><CODE>0</CODE><LIST_VALUE>0</LIST_VALUE><LIST_VALUE>1</LIST_VALUE><LIST_VALUE>' + arguments[ 1 ] + '</LIST_VALUE><LIST_VALUE>EUR</LIST_VALUE></LIST_ELEMENT></GLOBAL_LIST><GLOBAL_LIST mode="complete"><NAME>SITE_SITE_FARE_COMMANDS_AND_OPTIONS</NAME><LIST_ELEMENT><CODE>6</CODE><LIST_VALUE>1</LIST_VALUE><LIST_VALUE>2</LIST_VALUE><LIST_VALUE>4</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE>1</LIST_VALUE><LIST_VALUE>FALSE</LIST_VALUE><LIST_VALUE>FALSE</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE>TRUE</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>3</CODE><LIST_VALUE>1</LIST_VALUE><LIST_VALUE>2</LIST_VALUE><LIST_VALUE>4</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE>1</LIST_VALUE><LIST_VALUE>FALSE</LIST_VALUE><LIST_VALUE>FALSE</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE>TRUE</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE></LIST_ELEMENT><LIST_ELEMENT><CODE>1</CODE><LIST_VALUE>1</LIST_VALUE><LIST_VALUE>2</LIST_VALUE><LIST_VALUE>4</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE>1</LIST_VALUE><LIST_VALUE>FALSE</LIST_VALUE><LIST_VALUE>FALSE</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE>TRUE</LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE><LIST_VALUE></LIST_VALUE></LIST_ELEMENT></GLOBAL_LIST>'
); };

this.formNode[ "SO_GL" ].value =
	'<?xml version="1.0" encoding="iso-8859-1"?><SO_GL>' + (
		JLJS02.site.region.isFR ? SO_GL( "FR", "15.00" ) :
		JLJS02.site.region.isDE ? SO_GL( "DE", "15.00" ) :
		JLJS02.site.region.isNL ? SO_GL( "NL", "10.00" ) : ""
	) + '</SO_GL>';

	

	},

	writeCookie : function() {
		var domain = document.domain;
		var path = "/";
		for ( var i = 0; i < this.cookiePRMs.length; i ++ ) {
			var PRM = this.cookiePRMs[ i ];
			if( this.formNode[ PRM ] ) {
				var value = PRM + this.number + "=" + this.formNode[ PRM ].value + ";";
				value += "domain=" + domain + ";";
				value += "path=" + path + ";";
				document.cookie = value;
			}
		}
	},

	checkDate : function( month, day, year, returning ) {
		var comp1 = ( month == "02" || month == "04" || month == "06" || month == "09" || month == "11" );
		var comp2 = ( day == "31" );
		var Y = eval( year );
		var leap_year = ( Y % 4 == 0 && Y % 100 != 0 ) || ( Y % 400 == 0 );

		if(
			( comp1 && comp2 ) ||
			( month == "02" && day == "30" ) ||
			( ! leap_year && month == "02" && day == "29" )
		) {
			if( ! returning )
				return ! this.EN ?
					"- \u51FA\u767A\u65E5\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002\n" :	
					"- Departure date is not valid.\n";
			else
				return ! this.EN ?
					"- \u5E30\u56FD\u642D\u4E57\u65E5\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002\n" :	
					"- Return date is not valid.\n";
		}
		else return "";
	},

	dateSpecify : function() {
		var departureMon = arguments[ 0 ];
		var departureDay = arguments[ 1 ];
		var returnMon = arguments[ 2 ];
		var returnDay = arguments[ 3 ];

		if( this.formNode[ "B_MONTH" ] && this.formNode[ "B_DAY" ] ) {
			var S = new JLJS_DateSelector( this.formNode[ "B_MONTH" ], this.formNode[ "B_DAY" ] );
			S.adjustToToday();

			if(
				( typeof departureMon == "string" && departureMon.match( "today" )) ||
				( typeof departureDay == "string" && departureDay.match( "today" ))
			) {
				if( departureMon.match( "today" )) {
					var offset = departureMon.replace( "today", "" );
					S.applyOffset( offset + "m" );
				}
				if( departureDay.match( "today" )) {
					var offset = departureDay.replace( "today", "" );
					S.applyOffset( offset + "d" );
				}
			}
			else {
				if( JLJS02.site.region.isUK )
					S.applyOffset( '+8d' );
				else
					S.applyOffset( '+7d' );
			}

			var d = this.formNode[ "B_DAY" ].selectedIndex + 1;
			if( departureMon ) S.adjustToDate( departureMon + "-" + d );
			var m = this.formNode[ "B_MONTH" ].selectedIndex + 1;
			if( departureDay ) S.adjustToDate( m + "-" + departureDay );
		}

		if( this.formNode[ "E_MONTH" ] && this.formNode[ "E_DAY" ] ) {
			var S = new JLJS_DateSelector( this.formNode[ "E_MONTH" ], this.formNode[ "E_DAY" ] );
			S.adjustToToday();

			if(
				( typeof returnMon == "string" && returnMon.match( "today" )) ||
				( typeof returnDay == "string" && returnDay.match( "today" ))
			) {
				if( returnMon.match( "today" )) {
					var offset = returnMon.replace( "today", "" );
					S.applyOffset( offset + "m" );
				}
				if( returnDay.match( "today" )) {
					var offset = returnDay.replace( "today", "" );
					S.applyOffset( offset + "d" );
				}
			}
			else
				this.ChangeDate();

			var d = this.formNode[ "E_DAY" ].selectedIndex + 1;
			if( returnMon ) S.adjustToDate( returnMon + "-" + d );
			var m = this.formNode[ "E_MONTH" ].selectedIndex + 1;
			if( returnDay ) S.adjustToDate( m + "-" + returnDay );
		}
	},

	ChangeDate : function() {
		var d = new Date();
		var M = this.formNode[ "B_MONTH" ].selectedIndex;
		var D = this.formNode[ "B_DAY" ].selectedIndex + 1;
		var Y = M < d.getMonth() ? d.getFullYear() + 1 : d.getFullYear();
		var n = 5;
		var d2 = new Date( Y, M, D + n );
		this.formNode[ "E_MONTH" ].selectedIndex = d2.getMonth();
		this.formNode[ "E_DAY" ].selectedIndex = d2.getDate() - 1;
	}
}






function JLJS_TicketModuleSetup_Amadeus() {
	var targetBlockClass = 'ticketModule_AMD';
	var monthDatePairs = [[ 'B_MONTH', 'B_DAY' ], [ 'E_MONTH', 'E_DAY' ]];
	var calendarClasses = [[ 'TM_Calendar_Meet', 'meet' ], [ 'TM_Calendar_Send', 'send' ]];
	var narrowDownArgs = [[ 'd', 'B_AREA', 'B_LOCATION_1', 'E_LOCATION_2' ], [ 'a', 'E_AREA', 'E_LOCATION_1', 'B_LOCATION_2' ]];

	var blocks = JLJS.getElementsByClassName( targetBlockClass );
	if( ! blocks ) return;
	for( var i = 0; i < blocks.length; i ++ ) {
		var block = blocks[ i ];
		var form  = ( block ) ? JLJS.getElementsByTagName( 'form', block )[ 0 ] : null;
		if( ! form ) continue;
		var JLJS_AMD = new JLJS_ticketModule_Amadeus( form );
		JLJS_AMD.number = JLJS_AMDs.length;
		JLJS_AMDs[ JLJS_AMDs.length ] = JLJS_AMD;
		JLJS_AMD.block = block;

		if( arguments[ JLJS_AMD.number ][ 3 ] ) {
			if( arguments[ JLJS_AMD.number ][ 3 ][ "method" ] ) JLJS_AMD.formMethod = arguments[ JLJS_AMD.number ][ 3 ][ "method" ];
			if( arguments[ JLJS_AMD.number ][ 3 ][ "target" ] ) JLJS_AMD.formTarget = arguments[ JLJS_AMD.number ][ 3 ][ "target" ];
			JLJS_AMD.EN = ( arguments[ JLJS_AMD.number ][ 3 ][ "EN" ] ) ? true: false;
			JLJS_AMD.isJumpingToOJPage = ( arguments[ JLJS_AMD.number ][ 3 ][ "isJumpingToOJPage" ] ) ? true: false;
			if( arguments[ JLJS_AMD.number ][ 3 ][ "OJ_URL" ] ) JLJS_AMD.OJ_URL = arguments[ JLJS_AMD.number ][ 3 ][ "OJ_URL" ];
		}

		JLJS_AMD.setFormElements();


		var defaultDate = [];
		var m, d;
		for( var j = 0; j < monthDatePairs.length; j ++ ) {
			defaultDate[ j ] = arguments[ JLJS_AMD.number ][ 2 ][ "default" ][ j ];
			if( arguments[ JLJS_AMD.number ][ 2 ][ "ignoreCookie" ] ) {}
			else {
				m = null;
				d = null;
				if( m && d ) defaultDate[ j ] = m + "-" + d;
			}
		}

		var JLJS_AMDDS = new JLJS_TM_DateSelector( JLJS_AMD, monthDatePairs[ 0 ][ 0 ], monthDatePairs[ 0 ][ 1 ], monthDatePairs[ 1 ][ 0 ], monthDatePairs[ 1 ][ 1 ] );
		JLJS_AMDDSs[ JLJS_AMDDSs.length ] = JLJS_AMDDS;
		JLJS_AMDDS.dateSpecify( defaultDate[ 0 ], defaultDate[ 1 ] );


		for( var j = 0; j < calendarClasses.length; j ++ ) {
			var calImg =JLJS.getElementsByClassName( calendarClasses[ j ][ 0 ], "img", block )[ 0 ];
			if( ! calImg ) continue;
			JLJS_AMDDS.calendars[ j ] = calImg;
			JLJS_AMDDS.calendars[ j ].type = calendarClasses[ j ][ 1 ];
			JLJS_AMDDS.calendars[ j ]._TMDS_instance_ = JLJS_AMDDS;
			JLJS.addEvent( JLJS_AMDDS.calendars[ j ], "click", function( e ) {
					JLJS_AMDCAL.click( e.target.type, e.target._TMDS_instance_.number );
			} );
		}

		for( var j = 0; j < narrowDownArgs.length; j ++ ) {
			var defSet = arguments[ JLJS_AMD.number ][ j ][ "areaSlctSet" ];
			var defArea = arguments[ JLJS_AMD.number ][ j ][ "default" ][ 0 ];
			var defCity = arguments[ JLJS_AMD.number ][ j ][ "default" ][ 1 ];
			var defCity_OJ = arguments[ JLJS_AMD.number ][ j ][ "default" ][ 2 ];

			var JLJS_TMAND = new JLJS_TM_airportNarrowDown( JLJS_AMD, narrowDownArgs[ j ][ 0 ], narrowDownArgs[ j ][ 1 ], narrowDownArgs[ j ][ 2 ], narrowDownArgs[ j ][ 3 ], defSet, defArea );

			JLJS_TMAND.noGroup = ( arguments[ JLJS_AMD.number ][ j ][ "noGroup" ] ) ? true : false;
			JLJS_TMAND.noLabel = ( arguments[ JLJS_AMD.number ][ j ][ "noLabel" ] ) ? true : false;
			JLJS_TMAND.noDevide = ( arguments[ JLJS_AMD.number ][ j ][ "noDevide" ] ) ? true : false;
			JLJS_TMAND.labelOpt = (
				arguments[ JLJS_AMD.number ][ j ][ "labelOpt" ] || 
				( JLJS02.env.isIE50 || JLJS02.env.isIE55 || ( JLJS.env.isMac && JLJS.env.isIE ) || JLJS.env.isOpera )
			) ? true : false;
			JLJS_TMAND.noDOM = ( JLJS02.env.isIE50 ) ? true : false;
			JLJS_TMAND.onLineOnly = ( arguments[ JLJS_AMD.number ][ j ][ "onLineOnly" ] ) ? true : false;
			JLJS_TMAND.onLineSeparatingView_Off = ( arguments[ JLJS_AMD.number ][ j ][ "onLineSeparatingView_Off" ] ) ? true : false;
			JLJS_TMAND.noAreaSelection = ( arguments[ JLJS_AMD.number ][ j ][ "noAreaSelection" ] ) ? true : false;
			JLJS_TMAND.EN = ( arguments[ JLJS_AMD.number ][ j ][ "EN" ] ) ? true : false;
			JLJS_TMAND.AMD = ( arguments[ JLJS_AMD.number ][ j ][ "AMD" ] ) ? true : false;
			if( arguments[ JLJS_AMD.number ][ 3 ] )
				JLJS_TMAND.OJ_noAreaSelection = ( arguments[ JLJS_AMD.number ][ 3 ][ "OJ_noAreaSelection" ] ) ? true : false;

			var ignoreCookie = ( typeof arguments[ JLJS_AMD.number ][ j ][ "ignoreCookie" ] == "undefined" ) ?
				false : arguments[ JLJS_AMD.number ][ j ][ "ignoreCookie" ];


			var cookieArea = null;
			var cookieCity = null;
			var cookieCity_OJ = null;

			JLJS_TMAND.setDefaultByCookie( [ defArea, cookieArea ], [ defCity, cookieCity ], [ defCity_OJ, cookieCity_OJ ], ignoreCookie );

			JLJS_TMAND.setAreaSelector();

			if( JLJS_TMAND.defaultArea ) {
				if( JLJS_TMAND.area )
					for( var k = 0; k < JLJS_TMAND.area.options.length; k ++ )
						if( JLJS_TMAND.area.options[ k ].value == JLJS_TMAND.defaultArea ) {
							JLJS_TMAND.area.options[ k ].selected = true;
							break;
						}
				JLJS_TMAND.narrowDown( JLJS_TMAND.defaultArea );
			}
			else
				JLJS_TMAND.narrowDown();



			JLJS_TMAND.defaultArea = null;
			JLJS_TMAND.defaultCity = null;
			JLJS_TMAND.defaultCity_OJ = null;



			if( JLJS_TMAND.areaNode ) {
				JLJS.addEvent( JLJS_TMAND.areaNode, 'change', function( e ) {
					e.target._TMAND_instance_.narrowDown( e.target.value );
				} );
			}
		}

		var node = JLJS_AMD.formNode[ "TRIP_TYPE" ];
		var type = node.type ? node.type : node[ 0 ].type;
		if( type == "radio" ) {
			JLJS.addEvent( node[ 0 ], 'click', function( e ) {
				e.target.form._TM_instance_.toggleOR();
			} );
			JLJS.addEvent( node[ 1 ], 'click', function( e ) {
				e.target.form._TM_instance_.toggleOR();
			} );
			if( node[ 2 ] ) JLJS.addEvent( node[ 2 ], 'click', function( e ) {
				e.target.form._TM_instance_.toggleOR();
			} );
			JLJS_AMD.toggleOR();
		}
	}

	JLJS_AMDCAL = new JLJS_TM_Calendar( JLJS_AMDs );
	JLJS_AMDCAL.AMD = true;
}



function JLJS_TicketModuleModify_Amadeus() {
	var n = 0;
	var narrowDownArgs = [[ 'd', 'B_AREA', 'B_LOCATION_1', 'E_LOCATION_2' ], [ 'a', 'E_AREA', 'E_LOCATION_1', 'B_LOCATION_2' ]];
	var AMD = JLJS_AMDs[ n ]

	for( var i = 0; i < narrowDownArgs.length; i ++ ) {
		if( ! arguments[ n ][ i ][ "areaSlctSet" ] && ! arguments[ n ][ i ][ "default" ] ) continue;
		var defSet = arguments[ n ][ i ][ "areaSlctSet" ];
		var defArea = arguments[ n ][ i ][ "default" ][ 0 ];
		var defCity = arguments[ n ][ i ][ "default" ][ 1 ];
		var defCity_OJ = arguments[ n ][ i ][ "default" ][ 2 ];

		var JLJS_TMAND = new JLJS_TM_airportNarrowDown( AMD, narrowDownArgs[ i ][ 0 ], narrowDownArgs[ i ][ 1 ], narrowDownArgs[ i ][ 2 ], narrowDownArgs[ i ][ 3 ], defSet, defArea );

		JLJS_TMAND.noGroup = ( arguments[ n ][ i ][ "noGroup" ] ) ? true : false;
		JLJS_TMAND.noLabel = ( arguments[ n ][ i ][ "noLabel" ] ) ? true : false;
		JLJS_TMAND.noDevide = ( arguments[ n ][ i ][ "noDevide" ] ) ?true : false;
		JLJS_TMAND.labelOpt = (
			arguments[ n ][ i ][ "labelOpt" ] || 
			( JLJS02.env.isIE50 || JLJS02.env.isIE55 || ( JLJS.env.isMac && JLJS.env.isIE ) || JLJS.env.isOpera )
		) ? true : false;
		JLJS_TMAND.noDOM = ( JLJS02.env.isIE50 ) ? true :false;
		JLJS_TMAND.onLineOnly = ( arguments[ n ][ i ][ "onLineOnly" ] ) ? true : false;
		JLJS_TMAND.onLineSeparatingView_Off = ( arguments[ n ][ i ][ "onLineSeparatingView_Off" ] ) ? true : false;
		JLJS_TMAND.noAreaSelection = ( arguments[ n ][ i ][ "noAreaSelection" ] ) ? true : false;
		JLJS_TMAND.EN = ( arguments[ n ][ i ][ "EN" ] ) ? true : false;
		JLJS_TMAND.AMD = ( arguments[ n ][ i ][ "AMD" ] ) ? true : false;

		if( arguments[ n ][ 3 ] ) {
			JLJS_TMAND.OJ_noAreaSelection = ( arguments[ n ][ 3 ][ "OJ_noAreaSelection" ] ) ? true : false;
			JLJS_TMAND.modifyOJOnly = ( arguments[ n ][ 3 ][ "modifyOJOnly" ] ) ? true : false;
		}

		var ignoreCookie = ( typeof arguments[ n ][ i ][ "ignoreCookie" ] == "undefined" ) ?
			false : arguments[ n ][ i ][ "ignoreCookie" ];


		var cookieArea = null;
		var cookieCity = null;
		var cookieCity_OJ = null;

		JLJS_TMAND.setDefaultByCookie( [ defArea, cookieArea ], [ defCity, cookieCity ], [ defCity_OJ, cookieCity_OJ ], ignoreCookie );

		JLJS_TMAND.setAreaSelector();

		if( JLJS_TMAND.defaultArea ) {
			if( JLJS_TMAND.area )
				for( var k = 0; k < JLJS_TMAND.area.options.length; k ++ )
					if( JLJS_TMAND.area.options[ k ].value == JLJS_TMAND.defaultArea ) {
						JLJS_TMAND.area.options[ k ].selected = true;
						break;
					}
			JLJS_TMAND.narrowDown( JLJS_TMAND.defaultArea );
		}
		else
			JLJS_TMAND.narrowDown();



		JLJS_TMAND.defaultArea = null;
		JLJS_TMAND.defaultCity = null;
		JLJS_TMAND.defaultCity_OJ = null;



		if( JLJS_TMAND.areaNode ) {
			JLJS.addEvent( JLJS_TMAND.areaNode, 'change', function( e ) {
				e.target._TMAND_instance_.narrowDown( e.target.value );
			} );
		}
	}
}
