function $(id) {
    return document.getElementById(id);
}


function setCookie(name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) + 
        ((expires) ? ";expires=" + expires.toGMTString() : "") + 
        ((path) ? ";path=" + path : "") + 
        ((domain) ? ";domain=" + domain : "") + 
        ((secure) ? ";secure" : "");
    document.cookie = curCookie;
}

function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf(";" + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else begin += 2;
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) end = dc.length;
    return unescape(dc.substring(begin + prefix.length, end));
}


    setTimeout(launcher, 0 * 1000);
}

var keywords = [
'halo',
'momentum',
'influence',
'negotiate',
'boss',
'service',
'coach',
'relate',
'branding',
'position',
'transition',
'change',
'network',
'charisma',
'vision',
'pr',
'connections',
'priority'];

window.onload = function() {
    var frm = document.forms['bonus'];
    frm.onsubmit = function(e) {
        var inp = document.forms['bonus'].destination;
        var txt = inp.value.toLowerCase();
        for (var i=0; i<keywords.length; i++) {
            if (keywords[i] == txt) {
                window.open('http://www.theroadtoceo.com/' + txt + '.html', txt);
                return false;
            }
        }
        alert('Keyword not found, please enter another');
        return false;
    }
}
