﻿function flightInfoLeftBanner(par1, par2, par3) {
}

function flightInfoRightBanner(par1, par2, par3) {
	document.write("<div align=\"center\">");
	document.write("<img src=\"/chi/img/spacer.gif\" height=\"10\" border=\"0\">");
	document.write("</div>");
	document.write("<div id=\"bannerRight\">");
	document.write("<div class=\"bannerRightImg\" align=\"center\"><a href=\"/CBT/Controller?locale=gb\" onclick=\"javascript:trackPage('banner', this);\"><img src=\"/gb/img/flight/banner_prd_side.gif\" alt=\"来往中国内地交通接驳\" 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";
}

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();
}
