<!--

	// Retrieve Browser Information:
	var nav_id = -1;
	// -1 - unknown
	//  0 - IE
	//  1 - Opera
	//  2 - Netscape

	var __nav = navigator.appName;
	var __ver = navigator.appVersion;

	if(__nav.indexOf("Microsoft Internet Explorer") != -1) nav_id = 0;
	if(navigator.userAgent.indexOf("Opera") != -1) nav_id = 1;
	if(__nav.indexOf("Netscape") != -1) nav_id = 2;

	if (document.images) {
    	var imagesSpacer = new Image(1, 1);
    	imagesSpacer.src="images/spacer.gif";
    }
	//--------------------------------------------------------------------------

    // Return the element coords in browser window
	function getElementPosition(elemID) {
	    var offsetTrail = document.getElementById(elemID);
	    var offsetLeft = 0;
	    var offsetTop = 0;
	    while (offsetTrail) {
	        offsetLeft += offsetTrail.offsetLeft;
	        offsetTop += offsetTrail.offsetTop;
	        offsetTrail = offsetTrail.offsetParent;
	    }
	    if (navigator.userAgent.indexOf("Mac") != -1 && 
	        typeof document.body.leftMargin != "undefined") {
	        offsetLeft += document.body.leftMargin;
	        offsetTop += document.body.topMargin;
	    }
	    return {left:offsetLeft, top:offsetTop};
	}

	// Return the available content height space in browser window
	function getInsideWindowHeight() {
		var isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? 
        true : false;

	    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;
	}

	// Return the available content width space in browser window
	function getInsideWindowWidth() {
		var isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? 
        true : false;

	    if (window.innerWidth) {
	        return window.innerWidth;
	    } else if (isIE6CSS) {
	        // measure the html element's clientHeight
	        return document.body.parentElement.clientWidth;
	    } else if (document.body && document.body.clientWidth) {
	        return document.body.clientWidth;
	    }
	    return 0;
	}

	// Retrieve the rendered width of an element
	function getObjectWidth(elem) {
		var result = 0;
		if (elem.offsetWidth) {
			result = elem.offsetWidth;
		} else if (elem.clip && elem.clip.width) {
			result = elem.clip.width;
		} else if (elem.style && elem.style.pixelWidth) {
			result = elem.style.pixelWidth;
		}
		return parseInt(result);
	}

	// Retrieve the rendered height of an element
	function getObjectHeight(elem) {
		var result = 0;
		if (elem.offsetHeight) {
			result = elem.offsetHeight;
		} else if (elem.clip && elem.clip.height) {
			result = elem.clip.height;
		} else if (elem.style && elem.style.pixelHeight) {
			result = elem.style.pixelHeight;
		}
		return parseInt(result);
	}

	//--------------------------------------------------------------------------

	// NAVIGATION FUNCTIONS:

	// open dialog window with Width & Height parameters:
	function openWnd(url, w, h) {
		var width = w;
		var height = h;
		var left = parseInt((screen.availWidth/2) - (width/2));
		var top = parseInt((screen.availHeight/2) - (height/2));
		var windowFeatures = "width=" + width + ",height=" + height +
			",left=" + left + ",top=" + top +
			",screenX=" + left + ",screenY=" + top +
			",status=0,resizable=1,menubar=0,scrollbars=0";
		var myWindow = window.open(url, "", windowFeatures);
	}

	// open url:
	function GoToURL(url) {
		document.location.href = url;
	}




function pageResize() {
	var rightPanel = document.getElementById("rightPanel");
	var workarea = document.getElementById("workarea");
	var footer = document.getElementById("footer");
	var imgH = document.getElementById("imgH");
	var hCenter = getObjectHeight(workarea);
	var winH = getInsideWindowHeight();
	var minH = winH - 335;
	var H = (hCenter > minH)? hCenter : minH;
	imgH.style.height = H; 
//	rightPanel.style.height = H;
//	footer.style.top = H + 186;	
//	alert(getObjectWidth(rightPanel));
}

function pageLoad() {
	pageResize();
}

//-->
