function flightInfoLeftBanner(par1, par2, par3) {

	/*

	document.write("<div>");

	document.write("	<div><a href=\"#\"><img src=\"http://www.hongkongairport.com/eng/img/ad_ad.jpg\" alt=\"\" border=\"0\" /></a></div>");

	document.write("</div>");

	*/

}



function flightInfoRightBanner(par1, par2, par3) {

	/*

	if (par1 == "eng" && par2 == "passenger" && par3 == "departure") {

		document.write("<div align=\"center\">");

		document.write("<img src=\"/eng/img/spacer.gif\" height=\"10\" border=\"0\">");

		document.write("</div>");

		document.write("<div id=\"bannerRight\">");

		document.write("<div class=\"bannerRightImg\" align=\"center\"><a href=\"javascript:NewWindow('/eng/flight/airline-information/notice_popup.html', 'airlines', '517', '701', 'yes', 'yes');\"><img src=\"/eng/img/flight/banner_passenger_notice.jpg\" alt=\"\" width=\"195\" height=\"70\" border=\"0\"></a></div>");

		document.write("</div>");

	}

	

	document.write("<div id=\"bannerRight\">");

	document.write("	<div class=\"bannerRightImg\"><a href=\"/eng/worldwideflight.html\" target=\"_blank\"><img src=\"/eng/img/banner_1.gif\" alt=\"\" width=\"191\" height=\"66\" border=\"0\" /></a></div>");

	document.write("	<br class=\"clearer\" />");

	document.write("	<div class=\"bannerRightImg\">");

	document.write("		<a href=\"http://www.jasl.com.hk/\" target=\"_blank\">");

	genFlash("/eng/img/swf/jasl_banner.swf", 191, 66, "jasl_banner.swf", null);

	document.write("		</a>");

	document.write("	</div>");

	document.write("</div>");

	*/


	document.write("<div align=\"center\">");

	document.write("<img src=\"/eng/img/spacer.gif\" height=\"10\" border=\"0\">");

	document.write("</div>");

	document.write("<div id=\"bannerRight\">");

	if( par1 == "eng" && par2 == "passenger" && (par3 == "departure" || par3 == "arrival")){


		if(par3 == "arrival"){

			document.write("<div class=\"bannerRightImg\" align=\"center\"><a href=\"/eng/passenger/arrival/t1/airport-services-facilities/sms-information.html\" onClick=\"javascript:trackPage('banner',this);\"><img src=\"/eng/img/flight/SMS-flight-info-web-banner.jpg\" alt=\"Get Flight Information via SMS\" width=\"195\" height=\"70\" border=\"0\"></a></div>");

		}else{

			document.write("<div class=\"bannerRightImg\" align=\"center\"><a href=\"/eng/passenger/departure/all/airport-services-facilities/sms-information.html\" onClick=\"javascript:trackPage('banner',this);\"><img src=\"/eng/img/flight/SMS-flight-info-web-banner.jpg\" alt=\"Get Flight Information via SMS\" width=\"195\" height=\"70\" border=\"0\"></a></div>");

		}

			document.write("<div class=\"bannerRightImg\" align=\"center\"><a href=\"/eng/flight/airline-information/check-in-areas.html\" onClick=\"javascript:trackPage('banner',this);\"><img src=\"/eng/img/flight/counter_banner_03.jpg\" alt=\"NEW Airline check-in areas\" width=\"195\" height=\"70\" border=\"0\"></a></div>");
			

	}
	
	document.write("<div class=\"bannerRightImg\" align=\"center\"><a href=\"/CBT/Controller?locale=eng\" onclick=\"javascript:trackPage('banner', this);\"><img src=\"/eng/img/flight/banner_prd_side.gif\" alt=\"Transportation to Mainland China\" width=\"195\" height=\"140\" border=\"0\"></a></div>");
	
	document.write("</div>");

}



function flightInfoBottomBanner(par1, par2, par3) {

}



function resizeMainIframe() {

	var minHeight=325;

	var height=calcMainIframeHeight();

	//resize the iframe according to the size of the

	//window (all these should be on the same line)

	if (height <= minHeight) {

		height = minHeight;

	} else {

		height=parseInt(height - document.getElementById("main").offsetTop-8);

	}

	document.getElementById("main").style.height = height + "px";

	document.getElementById("main").style.width = "560px";

}



function calcMainIframeHeight() {

	var headerHeight = 115;

	var mainIframeHeight;

	var height;

	

	height = window.innerHeight; //Firefox

	if (height != undefined && height != null) {

		mainIframeHeight = height;

	} else {

		height = document.body.clientHeight; //IE

		if (height != undefined && height != null) {

			mainIframeHeight = height;

		}

	}

	

	if (mainIframeHeight == undefined || mainIframeHeight == null) {

		return 0;

	} else {

		return (mainIframeHeight - headerHeight);

	}

}



function printMainFrame() {

	parent["main"].focus();

	parent["main"].print();

}



function bodyOnLoad() {

//	genTop();

	genLeft();

	genWinTitle();

	genAnnounceLink();

	resizeMainIframe();

}