/**
 * Simple fix for Ordnance Survey Open Space InfoWindow.
 * Fixes the gaps that appear in Firefox on Windows XP and Ubuntu
 * by overriding some methods of the OpenSpace InfoWindow class.
 * Ensure this script is included *after* the OS OpenSpace script.
 * @author Matt Walker (matt.walker -[at]- dottedeyes [*dot*] com)
 */

OpenSpace.InfoWindow = OpenLayers.Class(OpenSpace.InfoWindow, {
	_calcBBounds: function () {
		this.bPx.x = this.blSz.w;
		this.bPx.y = this.size.h - this.brSz.h - 1; // minus 1px (Firefox Windows XP)
		this.bSz.w = this.size.w - this.blSz.w - this.brSz.w + 4; // plus 4px (Firefox Ubuntu)
		this.bSz.h = 16; // plus 1px (Firefox Windows XP)
	},
	_calcBLBounds: function () {
		this.blSz.w = 15;
		this.blSz.h = 16;
		this.blPx.x = 0;
		this.blPx.y = this.size.h - this.brSz.h - 1; // minus 1px (Firefox Windows XP)
	},
	_calcTBounds: function () {
		this.tPx.x = this.tlSz.w;
		this.tPx.y = 0;
		this.tSz.w = this.size.w - this.tlSz.w - this.trSz.w + 4; // plus 4px (Firefox Ubuntu)
		this.tSz.h = 15;
	}
});