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.setLeftPanelSize = function(obj,compensation){
		try{
			obj.style.height = (this.getHeight() + compensation) + "px";
		}catch(e){
			alert(e);
		}
	}
	
	this.setObjectHeight = function(obj,compensation)
   {
		try
      {
			obj.style.height = (this.getHeight() + compensation) + "px";
		}
      catch(e)
      {
			alert(e);
		}
	}
	
	this.setTDSize = function(obj)
   {
		this.setObjectHeight(obj,-120);
	}
}

function initializeHeight(mainTDObj, bodyContentDIVObj){
	try
   {
		var bss	= new BrowserScreenSize();
		if(mainTDObj != null)
      {
			bss.setObjectHeight(mainTDObj,-119);
		}
		if(bodyContentDIVObj != null)
      {
			bss.setObjectHeight(bodyContentDIVObj,-172);
		}
	}
   catch(e)
   {
		alert(e);
	}
}

function converDMSFromDecimal(val){
	var deg = null;
	var min = null;
	var sec = null;
	
	try{
		if(val != null){
			deg = parseInt(val);
			min = parseInt(60*(val-deg));
			sec = (60*(((val-deg)*60)-min)).toFixed(3);
			//alert(deg+" : "+min+" : "+sec);
			return deg+"&deg; "+min+"\' "+sec+"\"";
		}else{
			return "";
		}
	}catch(e){
		alert(e);
		return "";
	}
}

