/////////////////////////////////////////////////////////////////////////////
//
// Function : JOP_MeetOurPeople
// Comments : This is the Spotlight Fragment, it will rotate the spotlight
//            based on a refresh.
//
/////////////////////////////////////////////////////////////////////////////

function JOP_MeetOurPeople(sitepath)
{
    this.m_NavPath    = g_navNode_Path;
    this.Sitepath     = sitepath;

    this.linkList     = new Array();
    this.urlList      = new Array();
    this.idList       = new Array();
    this.heightList   = new Array();
    this.widthList    = new Array();

    JOP_MeetOurPeople.prototype.Display              = JOP_MeetOurPeople_Display;
    JOP_MeetOurPeople.prototype.DisplayNode          = JOP_MeetOurPeople_DisplayNode;
    JOP_MeetOurPeople.prototype.pathInList           = JOP_MeetOurPeople_pathInList;
    JOP_MeetOurPeople.prototype.displayMeetOurPeople = JOP_MeetOurPeople_displayMeetOurPeople;
    JOP_MeetOurPeople.prototype.buildFlashList       = JOP_MeetOurPeople_buildFlashList;
}

function JOP_MeetOurPeople_Display (node)
{
    this.buildFlashList();
    this.DisplayNode(node);
}

function JOP_MeetOurPeople_DisplayNode (node)
{

    if ( this.m_NavPath[this.m_NavPath.length-1] == node.m_id ) {
        if ( this.pathInList(node.m_href) > -1 ) {
            this.displayMeetOurPeople(this.pathInList(node.m_href));
        }
    }
    
    if ( (this.m_NavPath[node.m_level] == node.m_id) || (node.m_level == 0) ) {
        for (var i = 0; i < node.m_subNodes.length; i++) {
           this.DisplayNode(node.m_subNodes[i]);
        }
    }
}

function JOP_MeetOurPeople_pathInList (folderPath)
{
    var returncode = -1;

    for (var i = 0; i < this.urlList.length; i++) {
        if (folderPath.indexOf(this.urlList[i]) > -1) {
            returncode = i;
        }
    }
    return returncode;
}

function JOP_MeetOurPeople_displayMeetOurPeople (i) {

    if ( i > -1 ) {
        document.write('<a href="' + ssUrlPrefix + this.linkList[i] + '"><H3>Meet Our People</H3></a>');
        document.write('<p>');
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + this.widthList[i] + '" height="' + this.heightList[i] + '">');
        document.write('<param name="movie" value="' + this.Sitepath + this.idList[i] + '">');
        document.write('<param name="quality" value="high">');
        document.write('<embed src="' + this.Sitepath + this.idList[i] + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + this.widthList[i] + '" height="' + this.heightList[i] + '"></embed>');
        document.write('</object>');
        document.write('</p>');
        document.write('<p><a class="arrow-right" href="' + ssUrlPrefix + this.linkList[i] + '">learn more</a></p>');
    }
}

function JOP_MeetOurPeople_buildFlashList () {

//US

    this.urlList.push('us/wej/index.html');
    this.idList.push('jweb_004916.swf');
    this.linkList.push('us/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('us/fa/StartingYourFinancialSalesCareer/index.html');
    this.idList.push('jweb_004385.swf');
    this.linkList.push('us/fa/StartingYourFinancialSalesCareer/AreWeRightForYou/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('us/fa/ExperiencedFinancialAdvisors/index.html');
    this.idList.push('jweb_004384.swf');
    this.linkList.push('us/fa/ExperiencedFinancialAdvisors/AreWeRightForYou/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('us/fa/index.html');
    this.idList.push('jweb_004383.swf');
    this.linkList.push('us/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('us/boa/index.html');
    this.idList.push('jweb_004382.swf');
    this.linkList.push('us/boa/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('us/headquarters/index.html');
    this.idList.push('jweb_004387.swf');
    this.linkList.push('us/headquarters/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('us/students/index.html');
    this.idList.push('jweb_004388.swf');
    this.linkList.push('us/students/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('us/index.html');
    this.idList.push('jweb_004386.swf');
    this.linkList.push('us/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

//CA

    this.urlList.push('ca/wej/index.html');
    this.idList.push('jweb_005183.swf');
    this.linkList.push('ca/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('ca/fa/StartingYourFinancialSalesCareer/index.html');
    this.idList.push('jweb_004391.swf');
    this.linkList.push('ca/fa/StartingYourFinancialSalesCareer/AreWeRightForYou/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('ca/fa/ExperiencedFinancialAdvisors/index.html');
    this.idList.push('jweb_004391.swf');
    this.linkList.push('ca/fa/ExperiencedFinancialAdvisors/AreWeRightForYou/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('ca/fa/index.html');
    this.idList.push('jweb_004390.swf');
    this.linkList.push('ca/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('ca/boa/index.html');
    this.idList.push('jweb_004389.swf');
    this.linkList.push('ca/boa/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('ca/headquarters/index.html');
    this.idList.push('jweb_004393.swf');
    this.linkList.push('ca/headquarters/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('ca/students/index.html');
    this.idList.push('jweb_004394.swf');
    this.linkList.push('ca/students/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('ca/index.html');
    this.idList.push('jweb_004392.swf');
    this.linkList.push('ca/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

//UK

    this.urlList.push('uk/wej/index.html');
    this.idList.push('jweb_005182.swf');
    this.linkList.push('uk/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('uk/fa/StartingYourFinancialSalesCareer/index.html');
    this.idList.push('jweb_005180.swf');
    this.linkList.push('uk/fa/StartingYourFinancialSalesCareer/AreWeRightForYou/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('uk/fa/ExperiencedFinancialAdvisers/index.html');
    this.idList.push('jweb_005181.swf');
    this.linkList.push('uk/fa/ExperiencedFinancialAdvisers/AreWeRightForYou/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('uk/fa/index.html');
    this.idList.push('jweb_004396.swf');
    this.linkList.push('uk/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('uk/boa/index.html');
    this.idList.push('jweb_004395.swf');
    this.linkList.push('uk/boa/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('uk/headquarters/index.html');
    this.idList.push('jweb_004398.swf');
    this.linkList.push('uk/headquarters/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');

    this.urlList.push('uk/index.html');
    this.idList.push('jweb_004397.swf');
    this.linkList.push('uk/wej/MeetOurPeople/index.html');
    this.widthList.push('115');
    this.heightList.push('130');
}
