// Content: js resize
// 2008-05-28. FM 22832 CB: 
// Set the correct domain (klm.com) for the ICI pages on klm.com so that IFrame information can be read 
// when the IFrame is located on a different server than where the klm.com pages are located.
setDomainForICI();
setDomainForEcomplaints();
// End set correct domain

function setDomainForICI()
{
	var strLocation = this.location.href;

	if ( ( strLocation.indexOf("klm.com") >= 0 ) && 
	     ( strLocation.indexOf("internet_checkin/ici_flightpax") >= 0 ) )
	{
		document.domain = "klm.com";
	}
}

function setDomainForEcomplaints()
{
	var strLocation = this.location.href;

	if ( ( strLocation.indexOf("klm.com") >= 0 ) &&
	( strLocation.indexOf("customer_support/ecomplaints") >= 0 ) )
	{
		document.domain = "klm.com";
	}
}

var w=null;function log(m){if(!w)w=window.open();w.document.write(m+'<br />');}

function updateSize () {
	updateIt();
}

function updateIt () {

	if (top.mainContainer)
	{
		/* Disable optimizing width 800 layout if bluebiz is running with a 4 column application */
		if ((document.body.offsetWidth < 988) && (!document.getElementById('bb_login') || !document.getElementById('app4jffp'))) {
			top.mainContainer.className = "main800";
			var d = document.getElementById("language_selector");
			if (d) d.style.width = "773px";
		}
		else {
			top.mainContainer.className = "main1024";
			var d = document.getElementById("language_selector");
			if (d) d.style.width = "987px";
		}
		/* Force correct positioning */
		if (navigator.product && navigator.product == "Gecko") {
			top.mainContainer.style.position = "relative";
			top.mainContainer.style.position = "";
		}
	}
}