//function to show info
function ShowMemberInfo(intMemberUID, blnNewWin) {
        var blnFound = false;
	if (arrMembers[intMemberUID]) {
		blnFound = true;
		strCallSign = arrMembers[intMemberUID][intCallSign];
		strBranch = arrMembers[intMemberUID][intBranch];
		
//		RankSwitch(arrMembers[intMemberUID][intRank], strBranch, arrRanks);
		RankSwitch(arrMembers[intMemberUID][intPriRank], strBranch, arrRanks);
		
//		strRankImages = arrMembers[intMemberUID][intRank];
		strRankImages = arrMembers[intMemberUID][intPriRank];
		strRank = '&nbsp;' + strPriRank + '&nbsp;<br><IMG SRC="images/ranks/' + strRankImages + '.jpg">';
		strPriRank = '&nbsp;' + strPriRank + '&nbsp;<br><IMG SRC="images/ranks/' + strRankImages + '.jpg">';
                switch (arrMembers[intMemberUID][intLocation]) {
                        case 'EN':  {strLocation = 'Europe (GMT+2)'; break;}
                        case 'EM':  {strLocation = 'Europe (GMT+1)'; break;}
                        case 'B':  {strLocation = 'England-Iceland (GMT)'; break;}
                        case 'MA': {strLocation = 'Mid-Atlantic (GMT-2)'; break;}
                        case 'AE': {strLocation = 'America, EST (GMT-5)'; break;}
                        case 'AC': {strLocation = 'America, CST (GMT-6)'; break;}
                        case 'AM': {strLocation = 'America, MST (GMT-7)'; break;}
                        case 'AP': {strLocation = 'America, PST (GMT-8)'; break;}
			   case 'AU': {strLocation = 'Sydney,  AUS (GMT+10)'; break;}
                        case 'U':  {strLocation = 'Whereabouts Unknown'; break;}
                        default:   {strLocation = ''; break;}
                }
                strLocation = strLocation;
                strICQ = arrMembers[intMemberUID][intICQ];
                strZoneID = arrMembers[intMemberUID][intZoneID];
                strEmail = '<A HREF="mailto:' + arrMembers[intMemberUID][intEmail] + '">' + arrMembers[intMemberUID][intEmail] + '</A>';
		    SquadSwitch(intMemberUID); strSquad = strSquadT;
                switch (arrMembers[intMemberUID][intCommand]) {
                        case 'FSC': {strCommand = 'Fatal Shadows Commander'; break;}
                        case 'FSX': {strCommand = 'Fatal Shadows Executive Officer'; break;}
                        case 'FC': {strCommand = 'Fleet Commander'; break;}
			   case 'AB': {strCommand = 'Ambassador'; break;}
                        case 'FX': {strCommand = 'Fleet Executive Officer'; break;}
                        case 'CO': {strCommand = 'Squadron Commander'; break;}
                        case 'XO': {strCommand = 'Squadron Executive Officer'; break;}
                        default:   {strCommand = ''; break;}
		    }
		    strBio = '<A HREF="bio/' + arrMembers[intMemberUID][intBio] + '" target="_blank">' + arrMembers[intMemberUID][intBio] + '</A>';
		    GameList(arrMembers[intMemberUID][intGames]);			
        }

        if (blnFound==false) {
                strCallSign.innerHTML = 'NOT FOUND';
                strRank.innerHTML = 'NOT FOUND';
//              strPriRank.innerHTML = 'NOT FOUND';
                strLocation.innerHTML = 'NOT FOUND';
                strICQ.innerHTML = 'NOT FOUND';
                strZoneID.innerHTML = 'NOT FOUND';
                strEmail.innerHTML = 'NOT FOUND';
                strBranch.innerHTML = 'NOT FOUND';
                strFleet.innerHTML = 'NOT FOUND';
                strSquad.innerHTML = 'NOT FOUND';
                strCommand.innerHTML = 'NOT FOUND';
                strBio.innerHTML = 'NOT FOUND';
                strGames.innerHTML = 'NOT FOUND';
        }
        if (IE4) {
                document.all.sCallSign.innerHTML = strCallSign;
                document.all.sRank.innerHTML = strRank;
//              document.all.sRank.innerHTML = strPriRank;
                document.all.sLocation.innerHTML = strLocation;
                document.all.sICQ.innerHTML = '<A HREF="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=' + strICQ + '">' + strICQ + '</A>';
                document.all.sZoneID.innerHTML = strZoneID;
                document.all.sEmail.innerHTML = strEmail;
                document.all.sBranch.innerHTML = strBranch;
                document.all.sFleet.innerHTML = strFleet;
                document.all.sSquad.innerHTML = strSquad;
                document.all.sCommand.innerHTML = strCommand;
                document.all.sBio.innerHTML =strBio;
                document.all.sGames.innerHTML = strGames;
                window.location.href = '#aMembersInfo';

        } else {

              var MemType =  window.open('', 'Member', 'width=315,height=225,directory=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no');
        with (MemType.document) {
		  open("text/html", "replace");
		    write('<BODY bgColor=#000000 link=#ffff00 vlink=#ffff00 text=#ffffff alink=#ffff00>');
                  write('<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>');
                  write('<TR><TD COLSPAN=3><fontcolor="#FF8000"><font size="2"><B>Pilot Information</B><BR></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD WIDTH=75 ALIGN=RIGHT VALIGN=TOP><font size="2">Callsign</TD>');
                  write('<TD WIDTH=10>&nbsp;</TD>');
                  write('<TD WIDTH=217><font size="2"><SPAN ID=sCallSign>' + strCallSign + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Rank</TD>');
                  write('<TD>&nbsp;</TD>');
                  write('<TD><font size="2"><SPAN ID=sRank>' + strRank + '</SPAN></TD>');
//                write('<TD><font size="2"><SPAN ID=sRank>' + strPriRank + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Location</TD>');
                  write('<TD>&nbsp;</TD>');
                  write('<TD><font size="2"><SPAN ID=sLocation>' + strLocation + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Xfire</TD>');
                  write('<TD>&nbsp;</TD>');
                  write('<TD><font size="2"><SPAN ID=sICQ>' + strICQ + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Aliases</TD>');
                  write('<TD>&nbsp;</TD>');
                  write('<TD><font size="2"><SPAN ID=sZoneID>' + strZoneID + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Email</TD>');
                  write('<TD>&nbsp;</TD>');
                  write('<TD><font size="2"><SPAN ID=sEmail>' + strEmail + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Branch</TD>');
                  write('<TD>&nbsp;</TD>');
                  write('<TD><font size="2"><SPAN ID=sBranch>' + strBranch + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Fleet</TD>');
                  write('<TD>&nbsp;</TD>');
                  write('<TD><font size="2"><SPAN ID=sFleet>' + strFleet + '</SPAN></TD>');
                  write('</TR>');
                  write('<TR>');
                  write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Squad</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sSquad>' + strSquad + '</SPAN></TD>');
               write('</TR>');
                write('<TR>');
                write('<TR>');
               write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Command</TD>');
               write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sCommand>' + strCommand + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Bio</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sBio>' + strBio + '</SPAN></TD>');
                write('</TR>');
                write('</TABLE>');
		close();
        }
	}
}

function GameList(GameTile){
	var GameTole;
	strGames = '';
	for (z=0; z<=GameLength; z++) {
	if (arrGames[z]) {
		GameTole = arrGames[z][0];	
			if (GameTile.indexOf(GameTole) > -1) {
				strGames += arrGames[z][1] + '<br>';
			}
		}
	}
	return strGames;
}
function TimeSwitch(intMemberUID){
                switch (arrMembers[intMemberUID][intLocation]) {
                        case 'EN':  {strTimeL = 'Europe (GMT+2)'; break;}
                        case 'EM':  {strTimeL = 'Europe (GMT+1)'; break;}
                        case 'B':  {strTimeL = 'England-Iceland (GMT)'; break;}
                        case 'MA': {strTimeL = 'Mid-Atlantic (GMT-2)'; break;}
                        case 'AE': {strTimeL = 'America, EST (GMT-5)'; break;}
                        case 'AC': {strTimeL = 'America, CST (GMT-6)'; break;}
                        case 'AM': {strTimeL = 'America, MST (GMT-7)'; break;}
                        case 'AP': {strTimeL = 'America, PST (GMT-8)'; break;}
                        case 'AU': {strTimeL = 'Sydney,  AUS (GMT+10)'; break;}
                        case 'U':  {strTimeL = 'Whereabouts Unknown'; break;}
                        default:   {strTimeL = ''; break;}
                }
}
function WritePilotTable() {
        with (document) {
                write('<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>');
                write('<TR><TD COLSPAN=3><fontcolor="#FF8000"><font size="2"><B>Pilot Information</B><BR></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD WIDTH=75 ALIGN=RIGHT VALIGN=TOP><font size="2">Callsign</TD>');
                write('<TD WIDTH=10>&nbsp;</TD>');
                write('<TD WIDTH=217><font size="2"><SPAN ID=sCallSign>' + strCallSign + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Rank</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sRank>' + strRank + '</SPAN></TD>');
//                write('<TD><font size="2"><SPAN ID=sRank>' + strPriRank + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Location</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sLocation>' + strLocation + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">ICQ #</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sICQ>' + strICQ + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Aliases</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sZoneID>' + strZoneID + '</SPAN></TD>');
                write('</TR>');
               write('<TR>');
               write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Email</TD>');
               write('<TD>&nbsp;</TD>');
               write('<TD><font size="2"><SPAN ID=sEmail>' + strEmail + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Branch</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sBranch>' + strBranch + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Fleet</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sFleet>' + strFleet + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Squad</TD>');
               write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sSquad>' + strSquad + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Command</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sCommand>' + strCommand + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Bio</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sBio>' + strBio + '</SPAN></TD>');
                write('</TR>');
                write('<TR>');
                write('<TD ALIGN=RIGHT VALIGN=TOP><font size="2">Games</TD>');
                write('<TD>&nbsp;</TD>');
                write('<TD><font size="2"><SPAN ID=sGames>' + strGames + '</SPAN></TD>');
                write('</TR>');
               write('</TABLE>');
        }
}

