var ARR_GLOB = new Array();
ARR_GLOB['017'] = 'land_001.htm';
ARR_GLOB['230'] = 'land_002.htm';
ARR_GLOB['125'] = 'land_003.htm';
ARR_GLOB['176'] = 'land_004.htm';
ARR_GLOB['220'] = 'land_005.htm';
ARR_GLOB['223'] = 'land_006.htm';
ARR_GLOB['258'] = 'land_007.htm';
ARR_GLOB['232'] = 'land_008.htm';
ARR_GLOB['241'] = 'land_009.htm';
ARR_GLOB['011'] = 'land_010.htm';
ARR_GLOB['012'] = 'land_011.htm';
ARR_GLOB['013'] = 'land_012.htm';
ARR_GLOB['023'] = 'land_013.htm';
ARR_GLOB['031'] = 'land_014.htm';
ARR_GLOB['866'] = 'land_015.htm';
ARR_GLOB['033'] = 'land_016.htm';
ARR_GLOB['037'] = 'land_017.htm';
ARR_GLOB['512'] = 'land_018.htm';
ARR_GLOB['689'] = 'land_019.htm';
ARR_GLOB['885'] = 'land_020.htm';
ARR_GLOB['038'] = 'land_021.htm';
ARR_GLOB['039'] = 'land_022.htm';
ARR_GLOB['009'] = 'land_028.htm';
ARR_GLOB['010'] = 'land_029.htm';
ARR_GLOB['221'] = 'land_030.htm';
ARR_GLOB['254'] = 'land_031.htm';
ARR_GLOB['293'] = 'land_032.htm';
ARR_GLOB['664'] = 'land_033.htm';
ARR_GLOB['563'] = 'land_034.htm';
ARR_GLOB['461'] = 'land_005.htm';
ARR_GLOB['014'] = 'misc_001.htm';
ARR_GLOB['016'] = 'misc_002.htm';
ARR_GLOB['018'] = 'misc_003.htm';
ARR_GLOB['021'] = 'misc_004.htm';
ARR_GLOB['884'] = 'misc_005.htm';
ARR_GLOB['036'] = 'misc_006.htm';
ARR_GLOB['002'] = 'misc_010.htm';
ARR_GLOB['003'] = 'misc_011.htm';
ARR_GLOB['004'] = 'misc_012.htm';
ARR_GLOB['005'] = 'misc_013.htm';
ARR_GLOB['006'] = 'misc_014.htm';
ARR_GLOB['001'] = 'natu_001.htm';
ARR_GLOB['015'] = 'natu_002.htm';
ARR_GLOB['019'] = 'natu_003.htm';
ARR_GLOB['020'] = 'natu_004.htm';
ARR_GLOB['024'] = 'natu_005.htm';
ARR_GLOB['027'] = 'natu_006.htm';
ARR_GLOB['028'] = 'natu_007.htm';
ARR_GLOB['039'] = 'natu_008.htm';
ARR_GLOB['034'] = 'natu_009.htm';
ARR_GLOB['035'] = 'natu_010.htm';
ARR_GLOB['602'] = 'natu_011.htm';
ARR_GLOB['697'] = 'natu_012.htm';
ARR_GLOB['724'] = 'natu_013.htm';
ARR_GLOB['040'] = 'natu_014.htm';
ARR_GLOB['007'] = 'natu_019.htm';
ARR_GLOB['008'] = 'natu_020.htm';
ARR_GLOB['041'] = 'natu_021.htm';
ARR_GLOB['022'] = 'peop_001.htm';
ARR_GLOB['042'] = 'peop_002.htm';
ARR_GLOB['552'] = 'peop_003.htm';
ARR_GLOB['044'] = 'peop_004.htm';
ARR_GLOB['045'] = 'peop_005.htm';
ARR_GLOB['043'] = 'peop_009.htm';


// override keyPress event
document.onkeypress = CheckForEnter;
function CheckForEnter(evt) {
    evt = (evt) ? evt : event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
    if (charCode == 13) {
        check(1)
        return false;
    }
    return true;
}

function check(enterPress) {
    var val = document.forms["frmSearch"].elements["search"].value;
    if (!val || val == "") {
        if (!enterPress) {
            alert("Please enter reference number of the\nimage you wish to search for.");
        }
        return;
    }
    if (ARR_GLOB[val]) {
        document.location = ARR_GLOB[val];
    }
    else {
        document.location = 'noReturn.htm';
    }
}

function FocusBtn() {
    var elem = document.forms["frmSearch"].elements["btn01"];
    elem.focus();
}

function CheckField(frmObj) {
    alert(frmObj.id);
    var val = document.forms["frmSearch"].elements["search"].value;
    if (!val || val == "") {
        alert("Please enter reference number of the\nimage you wish to search for.");
        return false;
    }
    else {
        if (ARR_GLOB[val]) {
            document.location = ARR_GLOB[val];
        }
        else {
            document.location = 'noReturn2.htm';
        }
    }
}

function CheckInfo(frmObj) {
    alert(frmObj.id);
    var val = document.forms["contact"].elements["Name"].value; document.forms["contact"].elements["Reference Number"].value;
    if (!val || val == "") {
        alert("Please check that all fields have been\nfilled in correctly and press 'Send'");
        return false;
    }
    else {
        document.location = 'contact2.htm';
    }
}
