﻿//  Okay, to play with this, modify the number of intMembersCount so that it equals the number of players minus one.  Then, add the array of member's information accordinly while modifying only the first array number for each invidivuals
var IE4 = (document.all)
var NS4 = (document.layers)

//to use in writing in HTML
var strCallSign = '';
var strRank = '';
var strPriRank = '';
var strRevRank = '';
var strRankImage = '';
var strBranch = '';
var strLocation = '';
var strICQ = '';
var strZoneID = '';
var strSquad = '';
var strFleet = '';
var strDivision = '';
var strCommand = '';
var strEmail = '';
var strBio = '';
var strGames = '';
var strMedals = '';

//parameters that defines number of members +
var intMembersCount;
var intHighCommandFirst;
var intHighCommandLast;
var intCivilanFirst;
var intCivilanLast;
var intSeniorOffFirst;
var intSeniorOffLast;
var intLineOffFirst;
var intLineOffLast;
var intJuniorOffFirst;
var intJuniorOffLast;
var intRecruitsFirst;
var intActiveLast;
var intRecruitsLast;
var intReservesFirst;
var intReservesLast;
var intPastandInactiveFSFirst;
var intPastandInactiveFSLast;
var intOnLeaveFirst;
var intOnLeaveLast;
var intMissingInActionFirst;
var intMissingInActionLast;
var arrMembers;
var arrRanks;
var arrGames;
var arrSquads;
var arrTime;
var arrRecruits;
var arrPastandInactiveFS;
var blnFound;
var i;

//for easy array retrivalvar intCallSign;
var intRank;
var intPriRank;
var intRevRank;
var intRankImages;
var intBranch;
var intFleet;
var intLocation;
var intICQ;
var intZoneID;
var intDivision;
var intSquad;
var intCommand
;var intEmail;
var intBio;
var intGames;
var intMedals;
function LoadArrMembers() {

//First and Last Rank Numbers
intMembersCount = 199;  //               	       <--  VERIFY THIS NUMBER, it show the last possible number for MEMBERS
intActiveFirst = 1; //                     		 <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intActiveLast = 299; //                   		   <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intHighCommandFirst = 1; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intHighCommandLast = 7; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intCivilanFirst = 8; //                      	<--  VERIFY THIS NUMBER, it show the first possible number for recruits
intCivilanLast = 10; //                    	  <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intSenioroffFirst = 11; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intSenioroffLast = 50; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intLineoffFirst = 51; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intLineoffLast = 99; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intJunioroffFirst = 100; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intJunioroffLast = 199; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intRecruitsFirst = 200; //                      <--  VERIFY THIS NUMBER, it show the first possible number for recruits
intRecruitsLast = 299;  //                      <--  VERIFY THIS NUMBER, it show the last possible number for recruits
intReservesFirst = 300; //                      <--  VERIFY THIS NUMBER, it show the first possible number for reserves
intReservesLast = 349;  //                      <--  VERIFY THIS NUMBER, it show the last possible number for reserves
intOnLeaveFirst = 350;  //                      <--  VERIFY THIS NUMBER, it show the last possible number for leave
intOnLeaveLast = 399;  //                      <--  VERIFY THIS NUMBER, it show the last possible number for leave
intMissingInActionFirst = 400;  //                      <--  VERIFY THIS NUMBER, it show the last possible number for leave
intMissingInActionLast = 499;   //                      <--  VERIFY THIS NUMBER, it show the last possible number for leave
intPastandInactiveFSFirst = 500; //		<--  VERIFY THIS NUMBER, it show the first possible number for Retired
intPastandInactiveFSLast = 599;  // 		<--  VERIFY THIS NUMBER, it show the last possible number for Retired

arrMembers = new Array();
arrCivilan = new Array();
arrRecruits = new Array();
arrSenioroff = new Array();
arrLineoff = new Array();
arrJunioroff = new Array();
arrReserves = new Array();
arrOnLeave = new Array();
arrMissingInAction = new Array();
arrRanks = new Array();
arrFleet = new Array();
arrGames = new Array();
arrSquads = new Array();
arrTime = new Array();
blnFound;
i;
intCallSign = 0;
intRank = 1;
intPriRank = 1;
intBranch = 2;
intLocation = 3;
intICQ = 4;
intZoneID = 5;
intFleet = 6;
intSquad = 7;
intCommand = 8;
intEmail = 9;
intBio = 10;
intGames = 11;
intMedals = 12;

	//Members
        //Callsign,									Rank,		 Branch, 	    Location,     X-Fire,          		Aliases,       Fleet,     	Squadron, 	Command,        Email,					    		Bio, 					games,						Medals;
	//High Command 1-7
	arrMembers[1] = new Array('Rubber Chicken',		'HC4',		'Marine',		'AC',	    	'rchicken',		'Kotold',	   'HC',	'HC',		'FSC',		'rubber-chicken@fatalshadows.com',		'rchicken.html',		'AGF,JGB,RTC,JK1,UTO,XVT,R6O,RGS,RTC,CSO,MW4,PSO,EVE,BHD,KOC,BF1,DOD,NSM,SWG,GWO,BF2,FGP','')
 	arrMembers[2] = new Array('Falcon4',				'HC3',		'Marine',		'AE',       	'4falcon4',      		'FS_Falcon_A',        'HC',	'HC',		'FSX',		'falcon4@bellsouth.net',			'falcon4.html',			'AGF,JGB,MW3,MW4,SCO,R6O,RGS,FCO,JK1,SCT,XVT,TR2,EVE,RTC,BHD,KOC,BF1,BF2','')
	arrMembers[4] = new Array('Felthyr',	     			'HC1',		'Marine',		'AP',	     	'82263224',		'Brownzerg',		 'HC', 		'HC',		'',		'brownzerg@hotmail',				'felthyr.html',			'JGB,TR2,RTC,CSO,MW3,NSM,BF2','')
	arrMembers[5] = new Array('Paratroop',			'HC1',		'Marine',		'AE',	    	 '',   	'Seoul',		'',		'HC',		'',		'cbaldowski@hotmail.com',			'paratroop.html',		'JGB,RTC,CSO.PSO,EVE,BHD,EQO','')	

	//Civilian 8-10
	
	
	//Senior Officers! 11-50
    arrMembers[12] = new Array('Nightwolf187',          	'SR6',		'Navy',			'AE',	     '',     'FS_Nightwolf187',          'DF',	'SD',	'CO',    'pisces_wolf2_187@yahoo.com',         		'nightwolf187.html',			'JGB,AGF','')
	arrMembers[13] = new Array('Nudge',			'SO2',		'Marine',		'B',       	'',      	'FS_Nudge',        'DF',	'ST',		'CO',		'charli_c100@hotmail.com',			'nudge.html',			'JGB','')

	//Line Officers! 51-99

	//Junior Officers! 100-199	

	//Recruits! 200-299

	
	//Reserves!  300-349
	arrMembers[304] = new Array('Frag',				'HR2',		'Navy',		'AC',	     	'54153706',      	'Tabgro',			   '',   	'P',		'',		'kod@charter.net',				'frag.html',			'JGB,CSO,SWG,KOC','')
	arrMembers[305] = new Array('Lawrence564',		'HR1',		'Navy',		'AE',	    	'',     	'FS_Lawrence_A',	   '',	'P',		'',		'lawrence.gauthier@videotron.ca',		'lawrence564.html',		'AGF,JGB,XVT,JK1,RTC,SWG,KOC','')
	

	//On Leave 350-399
	arrMembers[355] = new Array('Bobcat',				'HR1',		'Navy', 		'AE',	     	'63134551',      	'FS_Fury',		 '', 		'P',		'',		'bobnance@nc.rr.com',				'bobcat.html',			'AGF,JGB,MW4,R6O,RGS,XVT,BTB,MW3,JK1,RTC','')	
	arrMembers[356] = new Array('Thermal',			'CA7',		'Civilian',		'AE',       	'',      	'Varexda Firawan',     		   'DF',	'P',		'',		'varexda@bellsouth.net',			'thermal.html',			'AGF,GWO','')

	
	//Missing In Action 400-450
        arrMembers[401] = new Array('Lancer',          	'LO1',		'Marine',		'AC',	     '105390729',     'FS_Lancer',          'MF',	'P',	'',    'Starhunter2001@aol.com',         		'Lancer.html',			'JGB,AGF','')
	arrMembers[402] = new Array('MadACR',		'JO1',	'Marine',	'AE',		 '',	            'MadACR',	       'MF',   'P',	'',		'acrosekr@uncc.edu',		      '',					'JGB,MW4',			      '')
	arrMembers[403] = new Array('Panther',		     		'HC1',		'Marine',		'AP',	     	'',	      			'FS_Panther',		 '', 		'P',		'',		'Cseck@aol.com',				'Panther.html',			'AGF,JGB,BTB,EVE','')
	arrMembers[404] = new Array('Jazzism',			'JO1',		'Marine',		'U',	    	 '',   	'Jazzism',	'',   	'P',		'',		'jaysmores@hotmail.com',			'',		'JGB','')
	arrMembers[405] = new Array('Paith',			'LO2',	'Marine',	'AE',	     '131586',	      'Paithian',	    'SD',	'',	    'quindinar@insightbb.com',			'paith.html',				'JGB',								'')
	arrMembers[406] = new Array('Hot_Shot',			'LO2',		'Marine',	'AE',	     	'178411535',     '',	'hotshot53',		'P',		'',		'djbnumber53@hotmail.com',			'hot_shot.html',		'JGB','')



 // SQUAD RANKS
RankLength = 59; //		<--  VERIFY THIS NUMBER, it shows the last possible number for RANKS

intRankDet = 0;  //		<-- Legacy code, do not distrub

//intPriRankDet = 0;//		<-- do not distrub

intMarine = 2;	
arrRanks[0] = new Array('HC4',		'Grand Admiral')
arrRanks[1] = new Array('HC3',		'Sky Marshall')
arrRanks[2] = new Array('HC2',		'Secretary of the Marines')
arrRanks[3] = new Array('HC1',		'Marshall General')
arrRanks[4] = new Array('AB1',		'Ambassador')
arrRanks[5] = new Array('SO8',		'General')
arrRanks[6] = new Array('SO7',		'Lieutenant General')
arrRanks[7] = new Array('SO6',		'Major General')
arrRanks[8] = new Array('SO5',		'Brigadier General')
arrRanks[9] = new Array('SO4',		'Colonel')
arrRanks[10] = new Array('SO3',		'Lieutenant Colonel')
arrRanks[11] = new Array('SO2',		'Major')
arrRanks[12] = new Array('SO1',		'Captain')
arrRanks[13] = new Array('LO2',		'First Lieutenant')
arrRanks[14] = new Array('LO1',		'Second Lieutenant')
arrRanks[15] = new Array('JO7',		'Sergeant Major')
arrRanks[16] = new Array('JO6',		'Master Gunnery Sgt')
arrRanks[17] = new Array('JO5',		'First Sergeant')
arrRanks[18] = new Array('JO4',		'Master Sergeant')
arrRanks[19] = new Array('JO3',		'Gunnery Sergeant')
arrRanks[20] = new Array('JO2',		'Staff Sergeant')
arrRanks[21] = new Array('JO1',		'Sergeant')
arrRanks[22] = new Array('AA4',		'Corporal')
arrRanks[23] = new Array('AA3',		'Lance Corporal')
arrRanks[24] = new Array('AA2',		'Pvt 1st Class')
arrRanks[25] = new Array('AA1',		'Private')
	  

intNavy = 1;
arrRanks[26] = new Array('HR4',		'Grand Admiral')
arrRanks[27] = new Array('HR3',		'Sky Marshall')
arrRanks[28] = new Array('HR2',		'Secretary of the Navy')
arrRanks[29] = new Array('HR1',		'Fleet Admiral')
arrRanks[30] = new Array('AB2',		'Ambassador')
arrRanks[31] = new Array('SR11',	'Senior Admiral')
arrRanks[32] = new Array('SR10',	'Vice Admiral')
arrRanks[33] = new Array('SR9',		'Lt Admiral')
arrRanks[34] = new Array('SR8',		'Rear Admiral')
arrRanks[35] = new Array('SR7',		'Captain')
arrRanks[36] = new Array('SR6',		'Commander')
arrRanks[37] = new Array('SR5',		'Lt Commander')
arrRanks[38] = new Array('SR4',		'Lieutenant')
arrRanks[39] = new Array('SR3',		'Lieutenant Jr Grade')
arrRanks[40] = new Array('OR4',		'Mst Chief Petty Off')
arrRanks[41] = new Array('OR3',		'Sr Chief Petty Off')
arrRanks[42] = new Array('OR2',		'Chief Petty Officer')
arrRanks[43] = new Array('OR1',		'Petty Off 1st Class')
arrRanks[44] = new Array('RR5',		'Petty Off 2nd Class')
arrRanks[45] = new Array('RR4',		'Petty Off 3rd Class')
arrRanks[46] = new Array('RR3',		'Ensign')
arrRanks[47] = new Array('RR2',		'Apprentice')
arrRanks[48] = new Array('RR1',		'Cadet')


intCivilian = 3;
arrRanks[49] = new Array('CA11',		'Ambassador')
arrRanks[50] = new Array('CA10',		'Ambassador')
arrRanks[51] = new Array('CA9',		'Ambassador')
arrRanks[52] = new Array('CA8',		'Ambassador')
arrRanks[53] = new Array('CA7',		'Ambassador')
arrRanks[54] = new Array('CA6',		'Envoy-General')
arrRanks[55] = new Array('CA5',		'Envoy')
arrRanks[56] = new Array('CA4',		'Legate')
arrRanks[57] = new Array('CA3',		'Consul')
arrRanks[58] = new Array('CA2',		'Vice-Consul')
arrRanks[59] = new Array('CA1',		'Attach?')



	  // GAMES PLAYED
	  GameLength = 27; //		<--  VERIFY THIS NUMBER, it shows the last possible number for Games

        arrGames[0] = new Array('AGF',		'Allegiance Zone')
        arrGames[1] = new Array('EQO',		'EverQuest')
        arrGames[2] = new Array('FCO',		'Force Commander')
	 arrGames[3] = new Array('JK1',		'JediKnight')
        arrGames[4] = new Array('JGB',		'Jumpgate')
        arrGames[5] = new Array('MW3',		'Mechwarrior III')
        arrGames[6] = new Array('MW4',		'Mechwarrior IV')
        arrGames[7] = new Array('SCT',		'StarCraft')
        arrGames[8] = new Array('UTO',		'Unreal Tournamnet')
        arrGames[9] = new Array('XVT',		'Xwing Vs Tie Fighter')
        arrGames[10] = new Array('TR2',		'Tribes 2')
	 arrGames[11] = new Array('R6O',		'Rainbow Six')
	 arrGames[12] = new Array('RGS',	'Rogue Spear')
	 arrGames[13] = new Array('ACO',	'Asherons Call')
	 arrGames[14] = new Array('AOB',	'Anarchy Online Beta')
	 arrGames[15] = new Array('RTC',		'Return to Castle Wolfenstein')
	 arrGames[16] = new Array('EVE',	'Eve-Online')
        arrGames[17] = new Array('CSO',	'Counter-Strike')
        arrGames[18] = new Array('PSO',	'Planetside')
        arrGames[19] = new Array('SWG',	'Star Wars Galaxies')
        arrGames[20] = new Array('BHD',	'Black Hawk Down')
        arrGames[21] = new Array('KOC',	'Kings of Chaos')
        arrGames[22] = new Array('BF1',		'Battle Field 1942')
        arrGames[23] = new Array('DOD',	'Day of Defeat')
        arrGames[24] = new Array('NSM',	'Natural Selection')
        arrGames[25] = new Array('GWO',	'Guild Wars')
        arrGames[26] = new Array('BF2',		'Battlefield 2')
        arrGames[27] = new Array('FGP',	'Forgotten Planets')

	  // SQUADS
	  SquadLength = 18;
  arrSquads[0] = new Array('ALL',		'ALL',			'<FONT color=#ffffff>ALL</FONT>')
  arrSquads[1] = new Array('VS',		'Voodo Scourge',	'<FONT color=#ff00ff>Voodo Scourge</FONT>')
  arrSquads[2] = new Array('SS',		'Skull',		'<FONT color=#804040>Skull</FONT>')
  arrSquads[3] = new Array('ST',		'Shadow',		'<FONT color=#00ffff>Shadow</FONT>')
  arrSquads[4] = new Array('SD',		'Shadow Daggers',	'<FONT color=#00ff00>Shadow Daggers</FONT>')
  arrSquads[5] = new Array('A5',		'Ace Five',		'<FONT color=#ffff00>Ace Five</FONT>')
  arrSquads[6] = new Array('BK',		'Black Knights',	'<font color=#808080">Black Knights</FONT>')
  arrSquads[7] = new Array('DA',		'Dark Angels',		'<font color=#055DFF">Dark Angels</FONT>')
  arrSquads[8] = new Array('RR',		'Academy',		'<FONT color=#ff0000>Academy</FONT>')
  arrSquads[9] = new Array('P',		'PENDING',		'<FONT color=#FF8C00>PENDING</FONT>')
  arrSquads[10] = new Array('AB',		'Ambassador',		'<FONT color=#9932CC>Ambassador</FONT>')
  arrSquads[11] = new Array('SP',		'Suspended',		'<FONT color=#FF0000>Suspended</FONT>')
  arrSquads[12] = new Array('MIA',	'MIA',			'<FONT color=#FF0000>MISSING IN ACTION</FONT>')
  arrSquads[13] = new Array('142',	'142nd Armored Divsion',	'<FONT color=#FF8000>142nd Armored Divsion</FONT>')
  arrSquads[14] = new Array('101',	'101st Airborne Rangers',	'<FONT color=#006400>101st Airborne Rangers</FONT>')
  arrSquads[15] = new Array('22',		'22nd Flight Group',			'<FONT color=#804040>22nd Flight Group</FONT>')
  arrSquads[16] = new Array('118',	'118th Rangers',			'<FONT color=#FFFF00>118th Rangers</FONT>')
  arrSquads[17] = new Array('23',		'23rd Fighter Escorts',		'<FONT color=#ffa500>23rd Fighter Escorts</FONT>')
  arrSquads[18] = new Array('HC',		'High Command',	'<FONT color=#FFD700>High Command</FONT>')
  
  	  // FLEET
  arrFleet[0] = new Array('DF',		'Dagger Fleet')
  arrFleet[1] = new Array('MF',		'Macross Fleet')
  arrFleet[2] = new Array('CG',		'Crusader Guard')
  arrFleet[3] = new Array('HC',		'High Command')

	  // TimeZones
  arrTime[0] = new Array('EN',	'Europe (GMT+2)')
  arrTime[1] = new Array('EM',	'Europe (GMT+1)')
  arrTime[2] = new Array('B',	'England-Iceland (GMT)')
  arrTime[3] = new Array('MA',	'Mid-Atlantic (GMT-2)')
  arrTime[4] = new Array('AE',	'America, EST (GMT-5)')
  arrTime[5] = new Array('AC',	'America, CST (GMT-6)')
  arrTime[6] = new Array('AM',	'America, MST (GMT-7)')
  arrTime[7] = new Array('AP',	'America, PST (GMT-8)')
  arrTime[8] = new Array('AU',	'Sydney,  AUS (GMT+10)')
  arrTime[9] = new Array('U',	'Whereabouts Unknown')
}
function SquadSwitch(intMemberUID) {
	strSquadT = '';
	for (z=0; z<=SquadLength; z++) {
		if (arrMembers[intMemberUID][intSquad].toLowerCase() == arrSquads[z][0].toLowerCase()) {
			strSquadT = arrSquads[z][2];
		}


	}


}
function TimeSwitch(intMemberUID){
	strTimeL = '';
	for (z=0; z < arrTime.length; z++) {
		if (arrMembers[intMemberUID][intLocation] == arrTime[z][0]) {
			strTimeL = arrTime[z][2];
		}


	}


}


function RankSwitch(Rank, Branch, arrRanks){
	var MBranch = 0;
	if (Branch == "Marine") { MBranch = 1; } else { MBranch = 1; }

	for (z=0; z<=RankLength; z++) {


		if (arrRanks[z][0].indexOf(Rank) > -1) {
			strPriRank = arrRanks[z][MBranch];
		}	}
	return strPriRank;
}

	