		function initTemplate(){
//			$('.fullBtn').click(doFullScreen);
			 fixTemplate('init');
		}
		
		function fixTemplate(reason) {
			var baseHeight = $('.regio').height();
			var baseWidth = $('.regio').width();
			// function is called when:
			// 1) page loads (reason == "init")
			// 2) after page was resized to fullscreen (reason == "to fullscreen")
			// 3) after page was resized _back from_ fullscreen (reason == "from fullscreen")
			// 4) tab switched (reason == "tab")
			if (jQuery.browser.msie && (parseFloat(jQuery.browser.version) <= 10)) {
				$('.map').css('height', baseHeight-82);
				$('.map').css('width', baseWidth-320);
				//ie6 fixes here if needed
				absoluteFixHeight('.content');
				absoluteFix('.leftpanel');
				absoluteFixHeight('.leftPanelContent');
				absoluteFix('.infoPanel');
				absoluteFixHeight('#tc1 .sidepanel_content');
				absoluteFixHeight('#tc2 .sidepanel_content');
				absoluteFixHeight('#tc3 .sidepanel_content');
				absoluteFix('.rightpanel');
				absoluteFix('.map');
			}
			
			if(reason == "to fullscreen" || reason == "from fullscreen"){
				if(typeof onFullScreenToggle == 'function'){
					onFullScreenToggle(reason == "to fullscreen" ? true : false);
				}
			}
		}
		
		function absoluteFix(container){
			absoluteFixWidth(container);
			absoluteFixHeight(container);
		}
		
		function absoluteFixWidth(container){
			if (($(container).css('left') == 'auto') || ($(container).css('right') == 'auto')) return;
			var width = $(container).parent().width() - dePx($(container).css('left')) - dePx($(container).css('right')) - dePx($(container).css('padding-left')) - dePx($(container).css('padding-right'));
			$(container).width(width);
		}
		
		function absoluteFixHeight(container){
			if (($(container).css('top') == 'auto') || ($(container).css('bottom') == 'auto')) return;
			var height = $(container).parent().height() - dePx($(container).css('top')) - dePx($(container).css('bottom')) - dePx($(container).css('padding-top')) - dePx($(container).css('padding-bottom')); 
			$(container).height(height);
		}
		
		function dePx(value){
			return Number(value.replace('px',''));
		}

		function doFullScreen() {
			$('.regio').toggleClass('fullscreen');
			fixTemplate();
		}

