function BrowserScreenSize(){
	var theWidth, theHeight;
	// Window dimensions:
		if (window.innerWidth) {
			theWidth = window.innerWidth;
		} else if (document.documentElement && document.documentElement.clientWidth) {
			theWidth = document.documentElement.clientWidth;
		} else if (document.body) {
			theWidth = document.body.clientWidth;
		}

		if (window.innerHeight) {
			theHeight = window.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) {
			theHeight = document.documentElement.clientHeight;
		} else if (document.body) {
			theHeight = document.body.clientHeight;
		}
	
	this.getWidth = function(){
		return theWidth;
	}
	
	this.getHeight = function(){
		return theHeight;
	}
	
	this.setMapSize = function(mapContainer,mapCanvasObj,compensetion) {
		try {
			var calculatedHeight = (this.getHeight() + compensetion) + "px";
						
			mapCanvasObj.style.height = calculatedHeight;
			mapContainer.style.height = calculatedHeight;
			
			//loadingPaneObj.height = calculatedHeight;			
			//alert("Map Size Set : W-" + sizeObj.getWidth() + " / H-" + sizeObj.getHeight());
		} catch (e) {
			alert("EX : " + e);
		}
	}
		
	this.setObjectHeight = function(obj,compensation){
		try{
			obj.style.height = (this.getHeight() + compensation) + "px";			
		}catch(e){
			//alert(e);
		}
	}
}

function initializeHeight(mainBodyObj, leftPaneContentDIVObj, mapCanvasDivObj){
	/* parameter for main Body */
	var headerHeight = 80;
	var footerHeight = 30;
	var bodyMargin = 5;
	
	/* Parameter for inner Container */
	var borderCompensation = 6;
	var otherCompensation = 15; // Padding + border
	var totalCompensation = (30+24+13); // Header+Footer+shadow
	
	//alert((headerHeight+footerHeight+bodyMargin)+":"+(headerHeight+footerHeight+bodyMargin+totalCompensation+otherCompensation));
	try{
		var bss	= new BrowserScreenSize();
		if(mainBodyObj != null){
			bss.setObjectHeight(mainBodyObj,-(headerHeight+footerHeight+bodyMargin));
		}
		if(leftPaneContentDIVObj != null){
			bss.setObjectHeight(leftPaneContentDIVObj,-(headerHeight+footerHeight+bodyMargin+totalCompensation+otherCompensation));
		}
		if(mapCanvasDivObj != null){
			bss.setObjectHeight(mapCanvasDivObj,-(headerHeight+footerHeight+bodyMargin+totalCompensation+otherCompensation+borderCompensation));
		}
	}catch(e){
		alert(e);
	}
}

