﻿document.onkeydown = keydown;

function keydown(evt) {
    //    if (!evt)
    //        evt = event;

    evt = (evt) ? evt : ((window.event) ? event : null);
    if (evt) {
        var Location0 = "http://www.gamblingcommission.gov.uk/gf-accessibility.aspx"; //ACCESS KEY + 0
        var Location1 = "http://www.gamblingcommission.gov.uk"; //ACCESS KEY + 1
        var Location2 = "http://www.gamblingcommission.gov.uk/gh-media/latest_news.aspx"; //ACCESS KEY + 2
        var Location3 = "http://www.gamblingcommission.gov.uk/gf-site_map.aspx"; //ACCESS KEY + 3
        var Location5 = "http://www.gamblingcommission.gov.uk/gf-faqs.aspx"; //ACCESS KEY + 5
        var Location6 = "http://www.gamblingcommission.gov.uk/gf-accessibility.aspx"; //ACCESS KEY + 6
        var Location7 = "http://www.gamblingcommission.gov.uk/gh-contact_us/complaints.aspx"; //ACCESS KEY + 7
        var Location8 = "http://www.gamblingcommission.gov.uk/gf-terms_and_conditions.aspx"; //ACCESS KEY + 8
        var Location9 = "http://www.gamblingcommission.gov.uk/gh-contact_us.aspx"; //ACCESS KEY + 9
        var LocationS = "#maincontent"; //ACCESS KEY + S

        if (evt.altKey && evt.keyCode == 48)
            window.location = Location0;
        if (evt.altKey && evt.keyCode == 49)
            window.location = Location1;
        if (evt.altKey && evt.keyCode == 50)
            window.location = Location2;
        if (evt.altKey && evt.keyCode == 51)
            window.location = Location3;
        if (evt.altKey && evt.keyCode == 52)
            document.getElementById('Template_searchbox_TermsTextBox').focus();
        if (evt.altKey && evt.keyCode == 53)
            window.location = Location5;
        if (evt.altKey && evt.keyCode == 54)
            window.location = Location6;
        if (evt.altKey && evt.keyCode == 55)
            window.location = Location7;
        if (evt.altKey && evt.keyCode == 56)
            window.location = Location8;
        if (evt.altKey && evt.keyCode == 57)
            window.location = Location9;
        if (evt.altKey && evt.keyCode == 83)
            window.location.hash = LocationS;
    } 
}
