/* These directory roots are for debug, they bypass the access control*/
//var sPDFRootMay2002 = "http://www.nomura.com/research/home/English/BackIssue/";
var sPDFRootPreMay2002 = "http://www.ftseall-world.com/ftseaccesscontrol1.asp?Location=http://www.ftseall-world.com/English/BackIssue/";

var sPDFRootMay2002 = "http://www.ftseall-world.com/ftseaccesscontrol1.asp?Location=http://www.nomura.com/research/home/English/BackIssue/";

/* This array is used for the menu drop-down date list and entry[0] for the latest date field */
/* Every month, add a date string at the beginning of the array */
var saIssues= new Array(
'--Select Issue--',
'April 2003','March 2003',
'February 2003','January 2003','December 2002','November 2002','October 2002','September 2002','August 2002','July 2002','June 2002','May 2002',
'April 2002','March 2002','February 2002','January 2002','December 2001','November 2001','October 2001','September 2001','August 2001','July 2001',
'June 2001','May 2001','April 2001','March 2001','February 2001','January 2001'
);

/* This array is used to specify each month's directory sub-path*/
/* Every month, add a directory sub-path string at the beginning of the array */
var saMonth=new Array(
'April2003/ftse_0403',
'March2003/ftse_0303',
'February2003/ftse_0203',
'January2003/ftse_0103',
'December2002/ftse_1202',
'November2002/ftse_1102',
'October2002/ftse_1002',
'September2002/ftse_0902',
'August2002/ftse_0802',
'July2002/ftse_0702',
'June2002/ftse_0602',
'May2002/ftse_0502',
'April2002/ftse_0402',
'March2002/ftse_0302',
'Feb2002/ftse_0202',
'Jan2002_new/ftse_0102',
'Dec2001/ftse_1201',
'Nov2001/ftse_1101',
'Oct2001/ftse_1001',
'Sept2001/ftse_0901',
'Aug2001/ftse_0801',
'July2001/ftse_0701',
'June2002/ftse_0602',
'May2002/ftse_0502',
'April2002/ftse_0402',
'March2002/ftse_0302',
'Feb2002/ftse_0202',
'Jan2002/ftse_0102'
);

var saLatestSuffix=new Array(
'main','s1_all-world','s2_world','s3_developed','s4_all-emerging','s5_country-details','s6_multinationals','s7_global100','s8_appendices','merge')

var saPreMar2003Suffix=new Array(
'main','s1_all-world','s2_world','s3_developed','s4_all-emerging','s5_multinationals','s6_global100','s7_appendices','merge','merge')

var saPreMay2002Suffix=new Array(
'main','s1','s2','s3','s4','s5','s6','merge','merge','merge')

var saLatestOption=new Array(
'--Select Section--','Preface','FTSE All-World','FTSE World','FTSE Developed','FTSE All-Emerging','Country Details','FTSE Multinationals','FTSE Global 100','Appendices','Complete (8Mb)')

var saPreMar2003Option=new Array(
'--Select Section--','Preface','FTSE All-World','FTSE World','FTSE Developed','FTSE All-Emerging','FTSE Multinationals','FTSE Global 100','Appendices','Complete (8Mb)','')

var saPreMay2002Option =new Array(
'--Select Section--','Preface','FTSE All-World','FTSE Developed','FTSE All-Emerging','FTSE Multinationals','FTSE Global 100','Appendices','Complete (8Mb)','','')


function DoCheckSections()
{
if (document.frmPDFSection.Issue.selectedIndex < saIssues.length-26 /*After March 2003*/)
	{
	return"Latest";
	}
else
	{
	if (document.frmPDFSection.Issue.selectedIndex < saIssues.length-16 /*After May 2002*/)
	{return "PreMarch2003";}
	else
	{return "PreMay2002";}
	}/* end if-else */
}/* end function DoCheckSections */

function DoResetSection()
{
document.frmPDFSection.Section.selectedIndex=0;

switch (DoCheckSections())
	{
	case "Latest":
		/* alert ("Latest");*/
		for (var i in saLatestOption) 
 			{document.frmPDFSection.Section.options[i].text=saLatestOption[i]; }
		break;
	case "PreMarch2003":
		/*alert ("PreMarch2003");*/
		for (var i in saPreMar2003Option) 
 			{document.frmPDFSection.Section.options[i].text=saPreMar2003Option[i]; }
		break;
	case "PreMay2002":
		/*alert ("PreMay2002");*/
		for (var i in saPreMay2002Option) 
 			{document.frmPDFSection.Section.options[i].text=saPreMay2002Option[i]; }
		break;
	}/* end switch */
}/* end function DoResetSection */

function DoReportForm()
{if (document.frmPDFSection.Section.selectedIndex==0)
	{alert("Please select a section");}
	else if(document.frmPDFSection.Issue.selectedIndex==0)
	{alert("Please select an issue");}
else
	{DoReportFormP(document.frmPDFSection.Issue.selectedIndex-1, document.frmPDFSection.Section.selectedIndex-1, DoCheckSections());}
}/* end function DoReportForm */

function DoReportFormP(pIssue, pSection, pMenu)
{
var strAccessControl;
a=saMonth[pIssue];
//b=document.frmPDFSection.Section.options[document.frmPDFSection.Section.selectedIndex].value;
switch (pMenu)
	{
	case "Latest":
		/* alert ("Latest");*/
		c=sPDFRootMay2002+a+"v_"+saLatestSuffix[pSection];
		break;
	case "PreMarch2003":
		/*alert ("PreMarch2003");*/
		c=sPDFRootMay2002+a+"v_"+saPreMar2003Suffix[pSection];
		break;
	case "PreMay2002":
		/*alert ("PreMay2002");*/
		c=sPDFRootPreMay2002+a+"_"+saPreMay2002Suffix[pSection];
		break;
	}/* end switch */

//strAccessControl = 
c=c+".pdf";
//alert(c);
spawn=window.open(c, "WaitLoad", "status=yes,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600,top=100,left=200");				
spawn.focus

}/* end function DoReportFormP */

