/* array containing URLs for buttons in Flash header */
var urlMatrix = new Array();
urlMatrix["movies"] = "http://movies.channel.aol.com";
urlMatrix["music"] = "http://music.channel.aol.com";
urlMatrix["games"] = "aol://1722:games";
urlMatrix["celebrities"] = "http://aolsvc.news.aol.com/entertainment/main.adp";
urlMatrix["radio"] = "aol://1722:radio";
urlMatrix["television"] = "http://tv.channel.aol.com";
urlMatrix["entertainment"] = "http://epg.channel.aol.com ";
urlMatrix["city"] = "http://aolsvc.digitalcity.com";
urlMatrix["discover"] = "http://www.aol.com/optimized/bband.adp";


/* parseURL checks the first three chars in the URL string to see if its aol client only */
function parseURL(args) {
    var desiredUrl = urlMatrix[args];

    var ua = navigator.userAgent.toLowerCase();
    var ver = navigator.appVersion.toLowerCase();
    isinaolclient =  (ua.indexOf("aol") != -1);

    if (isinaolclient == 0) {
        if (desiredUrl.substring(0,3) == 'aol') {
            alert("This area is only available within the AOL client.");
        } else {
            document.location = desiredUrl;
        }	
    } else {
        document.location = desiredUrl;
    }
}
