
// assumes that c:\inetpub\wwwroot\montego\jscript\leftmenu.js has been included

function my_trim( key1 )
{
	var key = key1;
	while ( key.length && key.charAt( key.length - 1 ) == " "  ) key = key.slice(0, -1);
	while ( key.length && key.charAt( 0 ) == " " ) key = key.substring( 1 ) ;		
	
	return key;
}

function PricingModels ( foldersTree, nestdir, folderdir )
{
var path_plus   = folderdir ? "../" : "" ;
var path_f      = nestdir || "";
var folderdir_f = folderdir	|| "Consult/";
var aux1;

path_f      = my_trim( path_f );
folderdir_f = my_trim( folderdir_f );

aux1=insFld(foldersTree,gFld("Pricing Models"),"");
insDoc(aux1,gLnk(0,"Black-Scholes",			path_f + folderdir_f + "BS/bsm.htm"));
insDoc(aux1,gLnk(0,"Black",					path_f + folderdir_f + "Black/blacks.htm"));
insDoc(aux1,gLnk(0,"Garman",				path_f + folderdir_f + "Garman/garman.htm"));
insDoc(aux1,gLnk(0,"Binomial",				path_f + folderdir_f + "Binomial/binomial.htm"));
insDoc(aux1,gLnk(0,"Merton",				path_f + folderdir_f + "Merton/merton.htm"));
insDoc(aux1,gLnk(0,"Asset",					path_f + folderdir_f + "Asset/exchange.htm"));
insDoc(aux1,gLnk(0,"Barrier",				path_f + folderdir_f + "Barrier/barrier.htm"));
insDoc(aux1,gLnk(0,"LookBack",				path_f + folderdir_f + "Lookback/lookback.htm"));
insDoc(aux1,gLnk(0,"Average Asian",			path_f + folderdir_f + "Average/average.htm"));
insDoc(aux1,gLnk(0,"Whaley",				path_f + folderdir_f + "MBAW/mbaw.htm"));
insDoc(aux1,gLnk(0,"Binary",				path_f + folderdir_f + "Binary/binary.htm"));
insDoc(aux1,gLnk(0,"Compound",				path_f + folderdir_f + "Compound/compound.htm"));
insDoc(aux1,gLnk(0,"Rainbow",				path_f + folderdir_f + "Rainbow/rainbow.htm"));
insDoc(aux1,gLnk(0,"Quanto",				path_f + folderdir_f + "Quanto/quanto.htm"));
insDoc(aux1,gLnk(0,"Volatility Indicator",  path_f + folderdir_f + "VI/volInd.htm"));
insDoc(aux1,gLnk(0,"Implied Volatility",    path_f + folderdir_f + "MIM/impVol.htm"));
insDoc(aux1,gLnk(0,"Historic Volatility",   path_f + folderdir_f + "HSM/histVol.htm"));
insDoc(aux1,gLnk(0,"Forward Rate Agreement",path_f + folderdir_f + "FRA/fra.htm"));
insDoc(aux1,gLnk(0,"FX Forward",			path_f + folderdir_f + "FX/fxforward.htm"));
insDoc(aux1,gLnk(0,"Monte Carlo",			path_f + folderdir_f + "MonteCarlo/MonteCarlo.htm"));
insDoc(aux1,gLnk(0,"Bonds",					path_f + folderdir_f + "Bonds/Bonds.htm"));
insDoc(aux1,gLnk(0,"Convertible Bonds",		path_f + folderdir_f + "ConvertBond/ConvertBond.htm"));
insDoc(aux1,gLnk(0,"Bond Value Calculator",	path_f + path_plus   + "Scripting/BondValueCalculator.htm"));
}