function JLJS_class_window() {
	this.name = {};
	this.name.isOther = ( window.name == "otherwindow" ) ? true : false;
	this.name.isJal = ( window.name == "jal" ) ? true : false;
	this.name.isNon = ( !this.name.isOther && !this.name.isJal ) ? true : false;
}

JLJS_class_window.prototype = {
	changeHTMLByWindowName: function() {
		if( this.name.isNon )
			window.onunload = function() { window.name = "" };
		else {
			this.hideElements();
			this.outputSimpleHeader();
		}
	},

	hideElements: function() {
		var isJMB = document.location.pathname.match( /^\/(jmb|jalmile|jlph)\// );
		
		var classes =
			isJMB ? [ "#rnHead", ".topicPathA01", ".sectionTitleA01", ".sectionTitleA02", ".sectionTitleB01", ".sectionTitleC01",".topicPathA02", ".topicPath", ".cateTitleA01", ".secTitleA01", ".secTitleB01" ] :
			[ "#rnHead", ".topicPathA01",".topicPathA02", ".topicPath" ];

		var rule = "display: none;";
		var selector = classes.join( ", " );
		document.writeln( '<style type="text/css"><!--' + selector + '{ ' + rule + ' }' + '--></style>' );
	},

	outputSimpleHeader: function() {
		document.writeln( '<div id="rnSimpleHead"><!-- [rnSimpleHeadL01] --><div id="rnSimpleHeadL01"><h1 id="rnSimpleLogo01"><img src="/local/common_rn/img/logo_s_001.gif" width="171" height="38" alt="JAL | JAPAN AIRLINES"></h1></div><!-- /[rnSimpleHeadL01] --></div><!-- /[rnSimpleHead] -->' );
	},

	jal: {
		changeHTML: function( id, HTML ) {
			if( window.name != "jal" ) return;	
			document.getElementById( id ).innerHTML = HTML;
		}
	}
}

var JLJS_window = new JLJS_class_window;


JLJS_window.changeHTMLByWindowName();



