/*
Created by:     JMH
Created date:   02/19/2009

Notes:
This script file provides the mapping of Coremetrics Category IDs to Category Names. The Category names will be pulled from SharePoint Page Layouts
and passed to this file for processing. We then pass the Category ID down to be inserted into the Coremetrics tag on that specific Page
*/


//  Default Coremetrics categorization
//  These defaults are managed by FI and should be always validated against the Coremetrics CDF file
var cmCDFArray = new Array();
cmCDFArray['Home'] = 'FIC';
cmCDFArray['Products'] = 'FIC:101';
cmCDFArray['Services'] = 'FIC:201';
cmCDFArray['Industries'] = 'FIC:301';
cmCDFArray['Communities'] = 'FIC:401';
cmCDFArray['Partners'] = 'FIC:501';
cmCDFArray['Company'] = 'FIC:601';
cmCDFArray['About Us'] = 'FIC:602';
cmCDFArray['News'] = 'FIC:603';
cmCDFArray['Events'] = 'FIC:604';
cmCDFArray['Social Responsibility'] = 'FIC:605';
cmCDFArray['ViewPoints'] = 'FIC:606';
cmCDFArray['Investors'] = 'FIC:607';
cmCDFArray['Careers'] = 'FIC:608';
cmCDFArray['Search Register Contact Us'] = 'FIC:701';
cmCDFArray['Forms'] = 'FIC:801';
cmCDFArray['Landing'] = 'FIC:901';

cmCDFArray['Default'] = 'FIC';  // Fail safe

//  TODO
//
function getCMCdtCategoryIDFromPageTitle(pageTitle) {
}

//  TODO
//
function getCMCdtCategoryIDFromPageUrl(pageUrl) {
}

//  TODO
// 
function getCMCdtCategoryIDFromDefaults(categoryName) {
    try {
        return cmCDFArray[categoryName];
    } catch (e) {
    return cmCDFArray['Default'];
    }
}

//  TODO
// 
function getCMCdtDefaultCategoryID() {
    return cmCDFArray['Default'];
}
