loginRefresh=true;var chainedOnload=window.onload;window.onload=function(){getPersonnelList();if(chainedOnload!=null){chainedOnload();}}
function getPersonnelList(){callGetJSON(new Array(),"GetPersonnelList",function(o,t,e){if(o!=null){if(e){alert(e);}
else{var profilelist='';if(o.length==0){profilelist='<tr><td colspan="5" valign="center" class="v12i">No users found on the system.</td></tr>';}
else{for(var i=0;i<o.length;i++){profilelist+='<tr'+(i%2==0?' class="altRow"':'')+'>'+'<td valign="top" align="left">'+o[i].name+'</td>'+'<td valign="top" align="left">'+o[i].rank+'</td>'+'<td valign="top" align="center">'+o[i].yearsService+'</td>'+'<td valign="top" align="center">'+
(!o[i].profile?'&nbsp;':'<span class="fakelink" onclick="window.location=\'profile.html?id='+o[i].userId+'\'">View Profile</span>')+'</td>'+'</tr>';}}
$('personnellist').innerHTML='<table border="0" cellspacing="0" cellpadding="1" class="v12" width="100%">'+'<tr>'+'<td style="padding-top:5px;">'+'<table id="userlisttbl" border="0" cellspacing="0" cellpadding="1" style="border:1px solid black;" class="v12" width="100%">'+'<tr style="background-color:#FBD818;">'+'<td valign="top" align="left"><b>Name</b></td>'+'<td valign="top" align="left"><b>Rank</b></td>'+'<td valign="top" align="center"><b>Years Of Service</b></td>'+'<td valign="top" align="center"><b>Profile Link</b></td>'+'</tr>'+
profilelist+'</table>'+'</td>'+'</tr>'+'</table>';}}});}