// To use the code lookup functionality, include this JS file into the relevant JSP
// To invoke the code lookup popup, call this function passing in the relevant parameters:
//   formIndex:           the index of the form where the input should return 
//                        (eg. '0' if there is only one form in the page).
//   codeFormElementName: the name of the form input where the selected ASX code
//                        should be returned; when the user selects a code from the
//                        code lookup window, this form input will be populated
//                        with the ASX code.
//   nameFormElementName: the id of the span area where the name of the selected 
//                        security should be returned; when the user selects a 
//                        code from the code lookup window, this span will be 
//                        populated with the name of the security; 
//                        this parameter is OPTIONAL.
function displayCodeLookup(formIndex,codeFormElementName,nameFormElementName)
{
	window.open('/asx/research/codeLookup.do?returnToFormIndex='+formIndex+'&codeFormElement='+codeFormElementName+'&nameFormElement='+nameFormElementName,'',"toolbar=1,width=535,height=450,left=362,top=159,scrollbars=yes,resizable=yes");
}

// watchlist version of code lookup, which is duplication of "regular" codelookup.
function displayWatchlistCodeLookup(formIndex,codeFormElementName,nameFormElementName)
{
	window.open('/home/watchlist/codeLookup.do?returnToFormIndex='+formIndex+'&codeFormElement='+codeFormElementName+'&nameFormElement='+nameFormElementName,'',"toolbar=1,width=535,height=450,left=362,top=159,scrollbars=yes,resizable=yes");
}

