$(document).ready(function(){
	if(location.hash){
		var lhash = location.hash;
		location=lhash.substr(1);
	}
	
	fixSize();
	
});

$(window).resize(function(){
  fixSize();
});

function fixSize(){
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  w = myWidth;
  h = myHeight;
  // HOTEL BASEL PART
  	document.getElementById("leftCell").style.height = (h - 221)+"px";
  	document.getElementById("leftCellBg").style.height = (h - 221)+"px";
  	document.getElementById("rightCell").style.height = (h - 221)+"px";
  // ---------------
  
}

function showPage(url, content){
	$.ajax({
		url: url,
		type: 'GET',
		dataType: 'JSON',
		timeout: 1000,
		error: function(){
			alert('Error loading document');
		},
		data: {'flag':'ajax'},
		success: function(data){
			data=eval("("+data+")");
			location.hash = url;
			$("#content").html(data.content);
		}
	});
}

function homeTextChangeOn() {
	if(document.getElementById("textOn") && document.getElementById("textOff")){
		document.getElementById("textOff").style.display = "block";
		document.getElementById("textOn").style.display = "none";
	}
}
function homeTextChangeOff() {
	if(document.getElementById("textOn") && document.getElementById("textOff")){
		document.getElementById("textOn").style.display = "block";
		document.getElementById("textOff").style.display = "none";
	}
}