document.write("<SCRIPT language=\"javascript\" src=\"/ecs/include/footer.js\"></SCRIPT>");

var NS4 = (document.layers);
var IE4 = (document.all);

if (NS4) {
	document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/ecs/include/ecs_ns_content.css">');
} else {
	document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="/ecs/include/ecs_ie_content.css">');
}

function footerHtml(bSiteInfo, oLayer) {

	var footerSize = 15;
	var footer = "";
	var oDocument;
	
	if (oLayer != null) {
		oDocument = oLayer.document;
	} else {
		oDocument = document;		
	}

	//back to the top if needed
	if (NS4) {
		if (window.innerHeight <= (document.height + footerSize))	{
			if (oLayer == null || oLayer.top > window.innerHeight-120)
				backToTop(oDocument, (oLayer == null));
			
		} else if (oLayer == null) {
			footer += "<BR><BR>";
		}
	} else if (document.body.clientHeight <= (oDocument.body.scrollHeight + footerSize)) {
		backToTop(oDocument, (oLayer == null));
	} else if (oLayer == null) {
		footer += "<BR><BR>";
	}

	footer += "<IMG vspace=3 height=1 width=\"590\" border=0 src=\"/ecs/images/red_pix.gif\">";
	footer+="<TABLE width=\"590\"><TR>";
	if ((bSiteInfo == null) || (bSiteInfo)) {
		footer+="<TD align=\"left\"><A class=\"footer\" href=\"/ecs/html/common/SiteInfo.html\">Site Info</A></TD>";
	}
		footer+="<TD class=\"footer\">";
	if ((bSiteInfo == null) || (!bSiteInfo)) {
		footer+="<A class=\"footer\" href=\"/ecs/data/misc/archive.html\">Archive</A>&nbsp;";
	}
		footer+="<TD class=\"footer\">";
	if ((bSiteInfo == null) || (!bSiteInfo)) {
		footer+="<A class=\"footer\" href=\"/ecs/html/common/Santa_Fe_Privacy_Policy_v3.html\">Privacy</A>&nbsp;";
	}
	footer+="<TD class=\"footer\">";
	if ((bSiteInfo == null) || (!bSiteInfo)) {
		footer+="<A class=\"footer\" href=\"/ecs/html/common/Disclaimer.html\">Disclaimer</A>&nbsp;";
	}
	/* Santa Fe needs to update this copyright link */
	footer+=copyRightStatement;
	footer+="</TD></TR></TABLE>";

	oDocument.write(footer);
}

function openPage(url) {
	this.location.href="/ecs"+url;
}

function backToTop(oDocument, needSpace) {

	var str = "";
	if (needSpace) str="<BR><BR>";
	//str += "<BR><BR><TABLE width=\"590\"><TR><TD align=\"right\">";	
	str += "<TABLE width=\"590\"><TR><TD align=\"right\">";
	str += "<A href=\"javascript:scrollTo(0,0)\"";
	str += " onMouseOver=\"window.status='back to top';return true;\"";
	str += " onMouseOut=\"window.status='';return true;\">";
	str += "<IMG border=\"0\" src=\"/ecs/images/misc_backToTop.gif\">";
	str += "</A></TD></TR></TABLE>\n";

	oDocument.write(str);

}

function toIndex(location) {

	var	sLocationCode = "";
	
	if (location == "Beijing") {
		sLocationCode = "BJG";
	} else if (location == "Guangzhou") {
		sLocationCode = "CAN";
	} else if (location == "Shanghai") {
		sLocationCode = "SHA";
	} else if (location == "Singapore") {
		sLocationCode = "SIN";
	} else if (location == "Bangkok") {
		sLocationCode = "BKK";
	} else if (location == "Indonesia") {
		sLocationCode = "ID";
	} else if (location == "Malaysia") {
		sLocationCode = "MY";
	} else if (location == "Philippines") {
		sLocationCode = "PH";
	} else if (location == "JPN") {
		sLocationCode = "JP";
	} else {
		sLocationCode = location;
	}
	
	var str = "";
	str += " | <A class=\"head\" href=\"/ecs/data/sfguide/";
	str += sLocationCode;
	str += "/index.html\">Back to Table of Contents</A>";
	
	document.write(str);
	
}

/* not in use since 22 nov 2002 */
function toLocation(countryCode, locationCode) {

	var str = "";

	if (countryCode == "ID") {
		str = " | <A class=\"head\" href=\"/ecs/jsp/main/Country.jsp?countryCode=ID\">Back to Country Information</A>";
	} else {
		str += " | <A class=\"head\" href=\"/ecs/locationInfo.do?countryCode=";
		str += countryCode;
		str += "&locationCode=";
		str += locationCode;
	
		if ((countryCode == "CN") || (countryCode == "TH")) {
			str += "&people=No";
		}

		str += "\">Back to Location Information</A>";
	}
	
	document.write(str);
}

function toHome(isSecure) {
	var str = sHomeURI;
	if (isSecure == '1') {
		str = sMyHomeURI;
	} 
	document.write("<A href=\"" + str + "\" target=\"_top\"><IMG src=\"/ecs/images/btn_backHome.gif\" border=\"0\"></A>");
}
