function launchAirportCode(fieldName, formName, nohref) { var width var height var leftdist var topdist width = screen.width; height = screen.height; leftdist = Math.round((width - 510) / 2); topdist = Math.round((height - 400) / 2); var newParam = "?jspEntry='yes'"; if (nohref) {var newParam = "?nohref='yes';"}; eval('document.'+formName+'.currentCodeForm.value = fieldName'); eval('document.'+formName+'.currentCalForm.value = formName'); var codeWin = eval(window.open('/apps/utility/AirportCode.jhtml'+newParam,formName,'width=510,height=400,top='+topdist+',left='+leftdist+',scrollbars=yes,menu=no')) codeWin.focus(); } var formReturn = window.name; function setAirportCode(code) { preField = eval('window.opener.document.'+formReturn+'.currentCodeForm.value'); window.opener.document.getElementById( formReturn + '.' + preField ).value = code; window.close(); }