function JLJScommon02() {

	this.site = {};
	this.site.region = {};
	this.site.lang = {};
	var h = location.host;
	this.site.region.isNONE = h.match(/^www\.jal\.com$/) || h.match(/^[0-9\.]+$/) || h.match(/:8000/) ? true : false;

	this.site.region.isAOR = h.match(/\.aor\./) || h.match(/:8099/) ? true : false;
	this.site.region.isAU = h.match(/\.au\./) || h.match(/:8001/) ? true : false;
	this.site.region.isHK = h.match(/\.hk\./) || h.match(/:8002/) ? true : false;
	this.site.region.isCN = h.match(/\.cn\./) || h.match(/:8003/) ? true : false;
	this.site.region.isKR = h.match(/\.kr\./) || h.match(/:8004/) ? true : false;
	this.site.region.isSG = h.match(/\.sg\./) || h.match(/:8005/) ? true : false;
	this.site.region.isNZ = h.match(/\.nz\./) || h.match(/:8006/) ? true : false;
	this.site.region.isID = h.match(/\.id\./) || h.match(/:8007/) ? true : false;
	this.site.region.isPH = h.match(/\.ph\./) || h.match(/:8008/) ? true : false;
	this.site.region.isIN = h.match(/\.in\./) || h.match(/:8009/) ? true : false;
	this.site.region.isMY = h.match(/\.my\./) || h.match(/:8010/) ? true : false;
	this.site.region.isVN = h.match(/\.vn\./) || h.match(/:8011/) ? true : false;
	this.site.region.isTH = h.match(/\.th\./) || h.match(/:8012/) ? true : false;
	this.site.region.isGU = h.match(/\.gu\./) || h.match(/:8013/) ? true : false;
	this.site.region.isMP = h.match(/\.mp\./) || h.match(/:8014/) ? true : false;
	this.site.region.isTW = 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 = h.match(/\.er\./) || h.match(/:8199/) ? true : false;
	this.site.region.isUK = h.match(/\.uk\./) || h.match(/:8015/) ? true : false;
	this.site.region.isFR = h.match(/\.fr\./) || h.match(/:8016/) ? true : false;
	this.site.region.isDE = h.match(/\.de\./) || h.match(/:8017/) ? true : false;
	this.site.region.isNL = h.match(/\.nl\./) || h.match(/:8018/) ? true : false;
	this.site.region.isES = h.match(/\.es\./) || h.match(/:8019/) ? true : false;
	this.site.region.isIT = h.match(/\.it\./) || h.match(/:8020/) ? true : false;
	this.site.region.isEG = h.match(/\.eg\./) || h.match(/:8021/) ? true : false;
	this.site.region.isAT = h.match(/\.at\./) || h.match(/:8022/) ? true : false;
	this.site.region.isCH = h.match(/\.ch\./) || h.match(/:8023/) ? true : false;
	this.site.region.isRU = 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 = h.match(/\.ar\./) || h.match(/:8299/) ? true : false;
	this.site.region.isUS = h.match(/\.us\./) || h.match(/:8025/) ? true : false;
	this.site.region.isCA = h.match(/\.ca\./) || h.match(/:8026/) ? true : false;
	this.site.region.isMX = h.match(/\.mx\./) || h.match(/:8027/) ? true : false;
	this.site.region.isBR = 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 = (p.match(/\/ja\/.?/)) ? false : true;

	this.setLangCode(p);

	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 = {
	setLangCode : function (path) {
		this.site.lang.isLocal = false;
		if(path.match(/\/ja\/.?/)) {
			this.site.lang.code = "ja";
		}else if(path.match(/\/en\/.?/)){
			this.site.lang.code = "en";
		}else{
			this.site.lang.isLocal = true;
			if(path.match(/\/pt\/.?/)){
				this.site.lang.code = "pt";
			}else if(path.match(/\/zhhk\/.?/)){
				this.site.lang.code = "zhhk";
			}else if(path.match(/\/zhcn\/.?/)){
				this.site.lang.code = "zhcn";
			}else if(path.match(/\/zhtw\/.?/)){
				this.site.lang.code = "zhtw";
			}else if(path.match(/\/th\/.?/)){
				this.site.lang.code = "th";
			}else{
				this.site.lang.code = "";
			}
		}
	},
	
	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;