function IG_crossbrowser() {
	
	this.getWidth = function() {
		var x = -1;
		if( self.innerWidth ) {
			x = self.innerWidth;
		} else if( document.documentElement && document.documentElement.clientWidth ) {
			x = document.documentElement.clientWidth;
		} else if( document.body ) {
			x = document.body.clientWidth;
		}
		return x;
	}
	
	this.getHeight = function() {
		var y = -1;
		if( self.innerHeight ) {
			y = self.innerHeight;
		} else if( document.documentElement && document.documentElement.clientHeight ) {
			y = document.documentElement.clientHeight;
		} else if( document.body ) {
			y = document.body.clientHeight;
		}
		return y;
	}	
}

function IG_berns( x, y, frame_id ) {
	var obj = document.getElementById( frame_id );
	var area_width = 680;
	var area_height = 350;
	
	this.load = function( src ) { obj.src = src; }
	this.show = function() { this.refresh(); obj.style.display = "block"; }
	this.hide = function() { obj.style.display = "none";  }
	this.refresh = function() { obj.style.left = this.getXPos()+"px"; obj.style.top = this.getYPos()+"px"; obj.style.width = this.getWidth()+"px"; obj.style.height = this.getHeight()+"px"; }
	this.getXPos = function() { return parseInt((xbrowser.getWidth() - this.getWidth())/2); }
	this.getYPos = function() { return parseInt((xbrowser.getHeight() - this.getHeight())/2); }
	this.getWidth = function() { var width = area_width > xbrowser.getWidth() ? xbrowser.getWidth() : area_width; return width; }
	this.getHeight = function() { var height = area_height; if( xbrowser.getHeight < 470 ) { height = xbrowser.getHeight-120; }; height=(height>=0?height:0); return height; }
	this.getObj = function() { return obj; }
}

// -- Skapa objekt för att lättare hantera olika webbläsare
var xbrowser = new IG_crossbrowser();
// --

// -- Funktioner som används av flash...
function bookingRestaurant() {
	bookingClose();
	frame_restaurant.load("http://book.livebookings.net/respop/Landing.aspx?p=SE-RES-BERNS&rsid=100017");
	frame_restaurant.show();
}

function bookingRestaurant2() {
	bookingClose();
	frame_restaurant2.load("http://book.livebookings.net/respop/Landing.aspx?p=SE-RES-BERNS&rsid=104167");
	frame_restaurant2.show();
}

function bookingHotel() {
	bookingClose();
	frame_hotel.load("https://utelllink.ibe.netbooker.com/web/FrontController.nb4?module=PropertySearch&operation=SinglePropertySearch&execute=yes&propertyCodeType=UD&chainCode=UI&instanceId=78&propertyCode=42578&locale=en");
	frame_hotel.show();
}

function pressCenter() {
	bookingClose();
	frame_press.show();
}

function bookingClose() {
	frame_restaurant.hide();
	frame_restaurant2.hide();	
	frame_hotel.hide();
	frame_press.hide();
}

function pressClose() {
	bookingClose();
}
// --