	var m_r = new Array();

	function getInsideWindowWidth() {
	
		if (window.innerWidth) {
			return window.innerWidth;
		} else if (isIE6CSS) {
			// measure the html element's clientWidth
			return document.body.parentElement.clientWidth;
		} else if (document.body && document.body.clientWidth) {
			return document.body.clientWidth;
		}
		return 0;
	
	}
	
	// Return the available content height space in browser window function getInsideWindowHeight() {
	function getInsideWindowHeight() {
	
		if (window.innerHeight) {
			return window.innerHeight;
		} else if (isIE6CSS) {
			// measure the html element's clientHeight
			return document.body.parentElement.clientHeight;
		} else if (document.body && document.body.clientHeight) {
			return document.body.clientHeight;
		}
		return 0;
	}
	
	function initDHTMLAPI() {

		if (document.images) {
			isCSS = (document.body && document.body.style) ? true : false;
			isW3C = (isCSS && document.getElementById) ? true : false;
			isIE4 = (isCSS && document.all) ? true : false;
			isNN4 = (document.layers) ? true : false;
			isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
			isOpera = (navigator.userAgent.indexOf("Opera") > -1) ? true:false;
			isFirefox = (navigator.userAgent.indexOf("Firefox") > -1) ? true:false;
			}
	}
	
	function resizeMap() 
	{		
	//	debugger;	
		if (true == m_displayTrueSize)
			return;
		var newWidth = getInsideWindowWidth() - m_minWidth;
		var newHeight = parseInt(newWidth * gResizeRatio) ;
		if (newHeight > (getInsideWindowHeight() - m_minHeight)) {
			newHeight = (getInsideWindowHeight() - m_minHeight);
			newWidth = parseInt(newHeight * 1/gResizeRatio ) ;
		}
			//new resize
			var x;
			var rObj = null;
			for (x = 0; x < m_r.length; x++)
			{
				rObj = m_r[x];
				rObj.Resize(newHeight, newWidth);
			}
	}
	
	function initializeMap() 
	{
		var x;
		var rObj = null;
		for (x = 0; x < m_r.length; x++)
		{
			rObj = m_r[x];
			rObj.MinHeight = m_minHeight;
			rObj.MinWidth = m_minWidth;
//			rObj.ResizeRatio = gResizeRatio;
			rObj.Initialize();
		}
	}

function RegisterResizable(elem)
{
	m_r[m_r.length] = elem;
}		


