
function launchScaledWindow(ref, iWidth, iHeight) { 
	var iWidthMax = screen.width - 120;
	var iHeightMax = screen.height - 120;
	var p = iWidth / iHeight;
	if (iWidth > iWidthMax) { 
		iWidth = iWidthMax;
		iHeight = iWidthMax / p;
	} 
	if (iHeight > iHeightMax) { 
		iHeight = iHeightMax;
		iWidth = iHeightMax * p;
	} 
	var sFeatures = 'width='+iWidth+',height='+iHeight+',scrollbars=0,resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0';
	window.open(ref.href, ref.target, sFeatures); 
	return false;
}

function toggleLayer(sID) {
	var obj = document.getElementById(sID);
	if (obj.style.display == "inline") { 
		document.getElementById(sID).style.display = "none";
	} else {
		document.getElementById(sID).style.display = "inline";
	}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function showHideDiv(sID, bState) { 
	var e = document.getElementById(sID);
	if (e != null) { 
		if (bState) { 
			e.style.display = '';
		} else { 
			e.style.display = 'none';
		}
	}
}