﻿<!--
/*
 File		: AtoZ.js

 Purpose    : Generate the A to Z images and links for Guides and Resources pages 
 
 Functions  : 

 Modification History :
 Version    Date            By              Description
 -----------------------------------------------------------------------
 1st        2002-05-13     Vivian Au        First Version
 -----------------------------------------------------------------------
*/

//check which alphabet should be disable for the corresponding section
    var chkSection = new Object;
    chkSection['airlinecodes'] = new Array('i', 'y', 'z');
    chkSection['cityairport'] = new Array();
    chkSection['country'] = new Array('x');
    chkSection['currency'] = new Array('w', 'x');
    chkSection['glossary'] = new Array('j','k','o','q','w','x','y','z');
    chkSection['pubholidays'] = new Array('w','x');

    var atozStr = "";

    var notClickAble = new Object;
    for (a = 0; a < chkSection[guidesSection].length; a++) {
        notClickAble[chkSection[guidesSection][a]] = true;
    }

    var alpObj = new Object;  
    var tmpLink; 
//genAtoZImage is in common.js
    for (a = 97; a < 123; a++) {
        var thisAlp = String.fromCharCode(a);
        tmpLink = guidesSection + "_" + thisAlp + ".htm";
        alpObj[thisAlp] = new Image();
        if (notClickAble[thisAlp]) {
            alpObj[thisAlp].src = thisPath + "images/common/" + thisAlp + "_off.gif";
        } else {
            alpObj[thisAlp].src = thisPath + "images/common/" + thisAlp + ".gif";
        }
        atozStr += genAtoZImage(alpObj[thisAlp].src, tmpLink, notClickAble[thisAlp], '19', '18', thisAlp.toUpperCase());
        atozStr += "<IMG SRC=\"" + thisPath + "images/common/blank.gif\" WIDTH=\"2\" HEIGHT=\"1\" BORDER=\"0\">";
    }

document.write(atozStr);
//-->
