if(typeof (fesa)=="undefined"){fesa={}}fesa.displaySecureAreaFiles=function(){fesa.displayFiles()};fesa.toggle=function(B,A){var G,F,D;var C;var E="";try{targetPlusHdr=document.getElementById(B+"hdrplus_"+A);targetMinusHdr=document.getElementById(B+"hdrminus_"+A);target=document.getElementById(B+"_"+A);if(target.style.display=="none"){targetPlusHdr.style.display="none";targetMinusHdr.style.display="block";if(B=="srch"){if(target.innerHTML.length==0){eles=target.id.split("_");G=pgobj[eles[1]];F=pgobj[eles[1]][eles[3]];if(pgobj.getIsLast(eles[1])){spacers[0]=0}else{spacers[0]=1}if(G.getIsLast(eles[3])){spacers[1]=0}else{spacers[1]=1}if(eles[3]=="per"){D=pgobj[eles[1]][eles[3]][[eles[2]]];C=""+eles[1]+"_"+[eles[2]]+"_";if(F.getIsLast([eles[2]])){spacers[2]=0}else{spacers[2]=1}}else{if(eles[3]=="lab"){D=pgobj[eles[1]][eles[3]][[eles[2]]];C=""+eles[1]+"_"+[eles[2]]+"_";if(F.getIsLast([eles[2]])){spacers[2]=0}else{spacers[2]=1}}}newSrchTable=document.createElement("table");newSrchTable.border="0";newSrchTable.cellSpacing="0";newSrchTable.cellPadding="0";newSrchTBody=document.createElement("tbody");newSrchTable.appendChild(newSrchTBody);target.appendChild(newSrchTable);if(D){fesa.displayRecurse(newSrchTBody,D,false,3,C)}else{E=fesa.ftable.startrow;for(s=0;s<4;s++){E+=fesa.ftable.blank+fesa.ftable.aftericons}E+="No files found for this criterion"+fesa.ftable.endrow;target.innerHTML=E}}target.style.display="block"}else{target.style.display="block"}}else{targetPlusHdr.style.display="block";targetMinusHdr.style.display="none";target.style.display="none"}}catch(H){}};fesa.createObject=function(C){var A=categories.id.length;var D=new fesa.SecObj();var B;B=fesa.getCategoryObjects(C,"unread");if(B){B.expanded=true;D["New~Files"]=B}B=fesa.getCategoryObjects(C,"all");if(B){B.expanded=false;D["All~Files"]=B}return(D.getCount()>0)?D:false};fesa.getCategoryObjects=function(C,E){var A=categories.id.length;var B=new fesa.SecObj();var D;for(j=0;j<A;j++){if((C==categories.secureareaid[j])&&(categories.parentcategoryid[j]==0)){D=fesa.catRecurse(C,categories.id[j],E);if(D){B[categories.id[j]]=D}}}return B.getCount()==0?false:B};fesa.ftable={startrow:"<table cellpadding='0' cellspacing='0' border='0' width='100%'><tr align='left'><td>",aftericons:"</td><td nowrap>",plus:"<img src='global/images/admin/plus.gif' border='0' width='19' height='16' onclick='fesa.toggle(divtp, eleid);'>",minus:"<img src='global/images/admin/minus.gif' border='0' width='19' height='16' onclick='fesa.toggle(divtp, eleid);'>",bplus:"<img src='global/images/admin/bplus.gif' border='0' width='19' height='16' onclick='fesa.toggle(divtp, eleid);'>",bminus:"<img src='global/images/admin/bminus.gif' border='0' width='19' height='16' onclick='fesa.toggle(divtp, eleid);'>",folder:"<img src='global/images/admin/category.gif' border='0' width='19' height='16'>",tejoin:"<img src='global/images/admin/tejoin.gif' border='0' width='19' height='16'>",down:"<img src='global/images/admin/down.gif' border='0' width='19' height='16'>",bcorner:"<img src='global/images/admin/bcorner.gif' border='0' width='19' height='16'>",blank:"<img src='global/images/admin/blank.gif' border='0' width='19' height='16'>",endrow:"</td><td width='100%' nowrap> &nbsp;</td></tr></table>"};fesa.displayFiles=function(){var I;var A=areas.id.length;var F=0;var K="";var J=0;var B;var D="";var E=0;var G=0;pgobj=new fesa.SecObj();var H=document.getElementById("filebody");for(var C=0;C<A;C++){I=fesa.createObject(areas.id[C]);if(I){pgobj[areas.id[C]]=I}}A=pgobj.getCount();for(area in pgobj){if((area.substr(0,3)!="get")&&(area!="files")&&(area!="expanded")){spacers[J]=(E==A-1)?0:1;spacers[1]=1;G=fesa.getIndex(areas,area);I=pgobj[area];newRow=H.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";B=new Array();B.push("<div id='areahdrminus_"+areas.id[G]+"' style='display:block;margin-bottom:-1;'>");B.push(fesa.ftable.startrow);D=(E==A-1)?fesa.ftable.bminus.replace("eleid",'"'+areas.id[G]+'"').replace("divtp",'"area"'):fesa.ftable.minus.replace("eleid",'"'+areas.id[G]+'"').replace("divtp",'"area"');B.push(D);B.push(fesa.ftable.aftericons);B.push(fesa.ftable.folder);B.push(fesa.ftable.aftericons);B.push("&nbsp;<b>"+areas.web_space_name[G]+"</b>");B.push(fesa.ftable.endrow);B.push("</div>");newCell.innerHTML=B.join("");newRow=H.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";B=new Array();B.push("<div id='areahdrplus_"+areas.id[G]+"' style='display:none;margin-bottom:-1;'>");B.push(fesa.ftable.startrow);D=(E==A-1)?fesa.ftable.bplus.replace("eleid",'"'+areas.id[G]+'"').replace("divtp",'"area"'):fesa.ftable.plus.replace("eleid",'"'+areas.id[G]+'"').replace("divtp",'"area"');B.push(D);B.push(fesa.ftable.aftericons);B.push(fesa.ftable.folder);B.push(fesa.ftable.aftericons);B.push("&nbsp;<b>"+areas.web_space_name[G]+"</b>");B.push(fesa.ftable.endrow);B.push("</div>");newCell.innerHTML=B.join("");newRow=H.insertRow(-1);newAreaCell=newRow.insertCell(-1);newAreaDiv=document.createElement("div");newAreaDiv.style.display="block";newAreaDiv.id="area_"+areas.id[G];newAreaTable=document.createElement("table");newAreaTable.border="0";newAreaTable.cellSpacing="0";newAreaTable.cellPadding="0";newAreaTBody=document.createElement("tbody");newAreaTable.appendChild(newAreaTBody);newAreaDiv.appendChild(newAreaTable);newAreaCell.appendChild(newAreaDiv);for(ele in I){if((ele.substr(0,3)!="get")&&(ele!="files")&&(ele!="expanded")){K=""+areas.id[G]+"_"+F+"_";newRow=newAreaTBody.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";B=new Array();B.push("<div id='subhdrminus_"+K+ele+"' style='display:block;margin-bottom:-1;'>");B.push(fesa.ftable.startrow);D=(spacers[J]==0)?fesa.ftable.blank+fesa.ftable.aftericons:fesa.ftable.down+fesa.ftable.aftericons;B.push(D);B.push(fesa.ftable.minus.replace("eleid",'"'+K+ele+'"').replace("divtp",'"sub"'));B.push(fesa.ftable.aftericons);B.push(fesa.ftable.folder);B.push(fesa.ftable.aftericons);B.push("&nbsp;");B.push(ele.replace(/~/g," "));B.push(fesa.ftable.endrow);B.push("</div>");newCell.innerHTML=B.join("");newRow=newAreaTBody.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";B=new Array();B.push("<div id='subhdrplus_"+K+ele+"' style='display:none;margin-bottom:-1;'>");B.push(fesa.ftable.startrow);D=(spacers[J]==0)?fesa.ftable.blank+fesa.ftable.aftericons:fesa.ftable.down+fesa.ftable.aftericons;B.push(D);B.push(fesa.ftable.plus.replace("eleid",'"'+K+ele+'"').replace("divtp",'"sub"'));B.push(fesa.ftable.aftericons);B.push(fesa.ftable.folder);B.push(fesa.ftable.aftericons);B.push("&nbsp;");B.push(ele.replace(/~/g," "));B.push(fesa.ftable.endrow);B.push("</div>");newCell.innerHTML=B.join("");newRow=newAreaTBody.insertRow(-1);newSubCell=newRow.insertCell(-1);newSubCell.style.verticalAlign="top";newSubDiv=document.createElement("div");newSubDiv.style.display="block";newSubDiv.id="sub_"+K+ele;newSubTable=document.createElement("table");newSubTable.border="0";newSubTable.cellSpacing="0";newSubTable.cellPadding="0";newSubTBody=document.createElement("tbody");newSubTable.appendChild(newSubTBody);newSubDiv.appendChild(newSubTable);newSubCell.appendChild(newSubDiv);fesa.displayRecurse(newSubTBody,I[ele],I[ele].getExpanded(),J+2,K);F+=1}}fesa.displaySearch(areas.id[G],newAreaTBody,periodhdrs,"per","Search by Period",J+2);fesa.displaySearch(areas.id[G],newAreaTBody,labelhdrs,"lab","Search by Document Type",J+2);E=E+1}}if(pgobj.getCount()==0){newRow=H.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";D=fesa.ftable.startrow+fesa.ftable.blank+fesa.ftable.aftericons+"No files found"+fesa.ftable.endrow;newCell.innerHTML=D}};fesa.displaySearch=function(J,H,B,I,D,L){var A=new fesa.SecObj();var G;var M=B.length;var K="";var C;var E="";var F=0;for(n=0;n<M;n++){G=fesa.getCategoryObjects(J,B[n].toLowerCase());if(G){A[B[n]]=G}}M=A.getCount();if(M>0){pgobj[J][I]=A;(I=="lab")?spacers[1]=1:spacers[1]=0;K=""+J+"_"+I;newRow=H.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";C=new Array();C.push("<div id='"+I+"hdrminus_"+K+"' style='display:none;margin-bottom:-1;'>");C.push(fesa.ftable.startrow);C.push(fesa.getSpacers(1));E=(I=="lab")?fesa.ftable.bminus.replace("eleid",'"'+K+'"').replace("divtp",'"'+I+'"'):fesa.ftable.minus.replace("eleid",'"'+K+'"').replace("divtp",'"'+I+'"');C.push(E);C.push(fesa.ftable.aftericons);C.push(fesa.ftable.folder);C.push(fesa.ftable.aftericons);C.push("&nbsp;");C.push(D);C.push(fesa.ftable.endrow);C.push("</div>");newCell.innerHTML=C.join("");newRow=H.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";C=new Array();C.push("<div id='"+I+"hdrplus_"+K+"' style='display:block;margin-bottom:-1;'>");C.push(fesa.ftable.startrow);C.push(fesa.getSpacers(1));E=I=="lab"?fesa.ftable.bplus.replace("eleid",'"'+K+'"').replace("divtp",'"'+I+'"'):fesa.ftable.plus.replace("eleid",'"'+K+'"').replace("divtp",'"'+I+'"');C.push(E);C.push(fesa.ftable.aftericons);C.push(fesa.ftable.folder);C.push(fesa.ftable.aftericons);C.push("&nbsp;");C.push(D);C.push(fesa.ftable.endrow);C.push("</div>");newCell.innerHTML=C.join("");newRow=H.insertRow(-1);newSrchCell=newRow.insertCell(-1);newSrchDiv=document.createElement("div");newSrchDiv.style.display="none";newSrchDiv.id=I+"_"+K;newSrchTable=document.createElement("table");newSrchTable.border="0";newSrchTable.cellSpacing="0";newSrchTable.cellPadding="0";newSrchTBody=document.createElement("tbody");newSrchTable.appendChild(newSrchTBody);newSrchDiv.appendChild(newSrchTable);newSrchCell.appendChild(newSrchDiv);for(srch in A){if((srch.substr(0,3)!="get")&&(srch!="files")&&(srch!="expanded")){K=""+J+"_"+srch+"_"+I;I=="lab"?spacers[1]=0:spacers[1]=1;newRow=newSrchTBody.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";C=new Array();C.push("<div id='srchhdrminus_"+K+"' style='display:none;margin-bottom:-1;'>"+fesa.ftable.startrow);C.push(fesa.getSpacers(L));E=(F==M-1)?fesa.ftable.bminus.replace("eleid",'"'+K+'"').replace("divtp",'"srch"'):fesa.ftable.minus.replace("eleid",'"'+K+'"').replace("divtp",'"srch"');C.push(E);C.push(fesa.ftable.aftericons);C.push(fesa.ftable.folder);C.push(fesa.ftable.aftericons);C.push("&nbsp;");C.push(srch.replace(/~/g," "));C.push(fesa.ftable.endrow);C.push("</div>");newCell.innerHTML=C.join("");newRow=newSrchTBody.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";C=new Array();C.push("<div id='srchhdrplus_"+K+"' style='display:block;margin-bottom:-1;'>"+fesa.ftable.startrow);C.push(fesa.getSpacers(L));E=(F==M-1)?fesa.ftable.bplus.replace("eleid",'"'+K+'"').replace("divtp",'"srch"'):fesa.ftable.plus.replace("eleid",'"'+K+'"').replace("divtp",'"srch"');C.push(E);C.push(fesa.ftable.aftericons);C.push(fesa.ftable.folder);C.push(fesa.ftable.aftericons);C.push("&nbsp;");C.push(srch.replace(/~/g," "));C.push(fesa.ftable.endrow);C.push("</div>");newCell.innerHTML=C.join("");newRow=newSrchTBody.insertRow(-1);newSrchCell=newRow.insertCell(-1);newSrchCell.style.verticalAlign="top";newSrchDiv=document.createElement("div");newSrchDiv.style.display="none";newSrchDiv.id="srch_"+K;newSrchCell.appendChild(newSrchDiv);F+=1}}}};fesa.displayRecurse=function(N,F,K,O,P){var G=0;var M=0;var J=0;var I=0;var B=0;var L=0;var E=0;var C;var H="";var A="";var D="";M=F.getCount();G+=1;for(ele in F){if((ele.substr(0,3)!="get")&&(ele!="expanded")){spacers[O]=G<M?1:0;if(ele=="files"){B=F[ele].length;for(k=0;k<B;k++){H="";I+=1;L=fesa.getIndex(files,F[ele][k]);D=path+"?fileid="+files.id[L]+"&wxsessionid="+wxsessionid;newRow=newCatTBody.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";iconUrl="<img src='global/images/admin/file.gif'>";for(m=0;m<giftypes.length;m++){gt=giftypes[m].toLowerCase();if(files.filelabel[L].toLowerCase()==gt){iconUrl="<img src='global/images/admin/"+giftypes[m]+".gif'>";break}}if((M==0)&&(I==B)){joiner=fesa.ftable.bcorner}else{joiner=fesa.ftable.tejoin}if(!(isNaN(files.filesize[L]))){if(files.filesize[J]>1000000){m_size=Math.round(files.filesize[L]/1000000);file_size=m_size;file_size_unit="mb"}else{m_size=Math.round(files.filesize[L]/1000);file_size=m_size;file_size_unit="kb"}}else{file_size="unknown";file_size_unit="kb"}C=new Array();C.push(fesa.ftable.startrow);C.push(fesa.getSpacers(O));C.push(joiner);C.push(fesa.ftable.aftericons);C.push(iconUrl);C.push(fesa.ftable.aftericons);C.push("&nbsp;");C.push('<a href="'+D+'" target="_blank">');C.push(files.obname[L]+" [ ");C.push(file_size+" "+file_size_unit+" ] </a>)");if(files.fileread[L]==0){iconUrl="<img src='global/images/admin/new.gif' border='0' width='31' height='12'>";C.push(iconUrl)}C.push(fesa.ftable.endrow);newCell.innerHTML=C.join("");filedesc=files.filedescription[L];if((typeof filedesc=="string")&&(filedesc.length>0)){newRow=newCatTBody.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";if(filedesc.length>73){filedesc=filedesc.substring(0,70)+'<span style="font-weight:bold;cursor:pointer;" onClick="javascript:document.getElementById(\'f_'+files.id[L]+P+"').style.visibility='visible'\">&nbsp;...(more)</span><div id='f_"+files.id[L]+P+'\' style="position:absolute; visibility:hidden; width:200px; height:115px; z-index:1; left: 500px;"><TABLE cellpadding=0 cellspacing=0 border=3><tr><td><TABLE cellpadding=0 cellspacing=0 border=0><TR bgcolor=Gray><TD nowrap><font color="##FFFFFF" style="font-weight:bold">'+files.obname[L]+"</font>&nbsp;&nbsp;</td><TD bgcolor=red align=right onClick=\"javascript:document.getElementById('f_"+files.id[L]+P+'\').style.visibility=\'hidden\'"><font color="#FFFFFF" style="font-weight:bold;cursor:pointer;">&nbsp;X&nbsp;</font></TD></TR><TR><TD colspan=2 bgcolor=Yellow>'+files.filedescription[L]+"</TD></TR></TABLE></TD></TR></TABLE></div>"}C=new Array();C.push(fesa.ftable.startrow);C.push(fesa.getSpacers(O));if((M>0)||(I<B)){C.push(fesa.ftable.down)}else{C.push(fesa.ftable.blank)}C.push(fesa.ftable.aftericons);C.push(fesa.ftable.blank);C.push(fesa.ftable.aftericons+" - ");C.push(filedesc);C.push(fesa.ftable.endrow);newCell.innerHTML=C.join("")}}}else{J=fesa.getIndex(categories,ele);B=F[ele].getFileCount();newRow=N.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";C=new Array();A=K?"style='display:block;'":"style='display:none;margin-bottom:-1;'";C.push("<div id='cathdrminus_"+P+categories.id[J]+"' "+A+">");C.push(fesa.ftable.startrow);C.push(fesa.getSpacers(O));H=G<M?fesa.ftable.minus.replace("eleid",'"'+P+ele+'"').replace("divtp",'"cat"'):fesa.ftable.bminus.replace("eleid",'"'+P+ele+'"').replace("divtp",'"cat"');C.push(H);C.push(fesa.ftable.aftericons);C.push(fesa.ftable.folder);C.push(fesa.ftable.aftericons);C.push("&nbsp;");C.push(categories.catname[J]);if(B>0){H=" ("+B+" document(s)";E=F[ele].getUnreadFileCount();if(E>0){H+=", "+E+" unread"}H+=")";C.push(H)}C.push(fesa.ftable.endrow);C.push("</div>");newCell.innerHTML=C.join("");newRow=N.insertRow(-1);newCell=newRow.insertCell(-1);newCell.style.verticalAlign="top";C=new Array();A=K?"style='display:none;'":"style='display:block;margin-bottom:-1;'";C.push("<div id='cathdrplus_"+P+categories.id[J]+"' "+A+">");C.push(fesa.ftable.startrow);C.push(fesa.getSpacers(O));H=G<M?fesa.ftable.plus.replace("eleid",'"'+P+ele+'"').replace("divtp",'"cat"'):fesa.ftable.bplus.replace("eleid",'"'+P+ele+'"').replace("divtp",'"cat"');C.push(H);C.push(fesa.ftable.aftericons);C.push(fesa.ftable.folder);C.push(fesa.ftable.aftericons);C.push("&nbsp;");C.push(categories.catname[J]);if(B>0){H=" ("+B+" document(s)";E=F[ele].getUnreadFileCount();if(E>0){H+=", "+E+" unread"}H+=")";C.push(H)}C.push(fesa.ftable.endrow);C.push("</div>");newCell.innerHTML=C.join("");newRow=N.insertRow(-1);newCatCell=newRow.insertCell(-1);newCatCell.style.verticalAlign="top";newCatDiv=document.createElement("div");if(K==true){newCatDiv.style.display="block"}else{newCatDiv.style.display="none"}newCatDiv.id="cat_"+P+categories.id[J];newCatTable=document.createElement("table");newCatTable.border="0";newCatTable.cellSpacing="0";newCatTable.cellPadding="0";newCatTBody=document.createElement("tbody");newCatTable.appendChild(newCatTBody);newCatDiv.appendChild(newCatTable);newCatCell.appendChild(newCatDiv);G+=1;fesa.displayRecurse(newCatTBody,F[ele],K,O+1,P)}}}};fesa.catRecurse=function(E,D,H){var B=new fesa.SecObj();var C=true;var F;var A;var G;G=fesa.getFileArray(E,D,H);if(G){B.files=G;C=false}var F=categories.parentcategoryid.filter(function(I){return(I==D)});for(child in F){if((!isNaN(child))&&(categories.secureareaid[child]==E)){A=fesa.catRecurse(E,categories.id[F[child]],H);if(A){B[categories.id[F[child]]]=A;C=false}}}return C?false:B};fesa.getFileArray=function(A,F,K){var L=new Date();var E=L.getYear();var D=L.getMonth();var B=L.getDate();var C=files.id.length;var I,H,J;var G=new Array();for(k=0;k<C;k++){if((files.secureareaid[k]==A)&&(files.categoryid[k]==F)){switch(K){case"unread":if(files.fileread[k]==0){G.push(files.id[k])}break;case"1~day":dte=new Date(files.datecreated[k]);dte.dateAdd("day",2);if(L.dateCompare(dte)<0){G.push(files.id[k])}break;case"1~week":dte=new Date(files.datecreated[k]);dte.dateAdd("day",1);dte.dateAdd("week",1);if(L.dateCompare(dte)<0){G.push(files.id[k])}break;case"1~month":dte=new Date(files.datecreated[k]);dte.dateAdd("month",1);if(L.dateCompare(dte)<0){G.push(files.id[k])}break;case"3~months":dte=new Date(files.datecreated[k]);dte.dateAdd("month",3);if(L.dateCompare(dte)<0){G.push(files.id[k])}break;case"1~year":dte=new Date(files.datecreated[k]);dte.dateAdd("year",1);if(L.dateCompare(dte)<0){G.push(files.id[k])}break;case"2~years":dte=new Date(files.datecreated[k]);dte.dateAdd("year",2);if(L.dateCompare(dte)<0){G.push(files.id[k])}break;case"doc":if(files.filelabel[k].toLowerCase()=="doc"){G.push(files.id[k])}break;case"exe":if(files.filelabel[k].toLowerCase()=="exe"){G.push(files.id[k])}break;case"xls":if(files.filelabel[k].toLowerCase()=="xls"){G.push(files.id[k])}break;case"pdf":if(files.filelabel[k].toLowerCase()=="pdf"){G.push(files.id[k])}break;case"txt":if(files.filelabel[k].toLowerCase()=="txt"){G.push(files.id[k])}break;case"rtf":if(files.filelabel[k].toLowerCase()=="rtf"){G.push(files.id[k])}break;case"zip":if(files.filelabel[k].toLowerCase()=="zip"){G.push(files.id[k])}break;default:G.push(files.id[k])}}}return G.length>0?G:false};fesa.getIndex=function(C,D){var A=0;for(var B=0;B<C.id.length;B++){if(C.id[B]==D){A=B;break}}return A};fesa.getSpacers=function(A){var B=new Array();for(cnt=0;cnt<A;cnt++){if(spacers[cnt]==0){B.push(fesa.ftable.blank+fesa.ftable.aftericons)}else{B.push(fesa.ftable.down+fesa.ftable.aftericons)}}return B.join("")};fesa.SecObj=function(){if(typeof fesa.SecObj._initialized=="undefined"){fesa.SecObj.prototype.getCount=function(){var A=0;for(elem in this){if((elem.substr(0,3)!="get")&&(elem!="files")&&(elem!="expanded")){A+=1}}return A};fesa.SecObj.prototype.getType=function(){return"fesa.SecObj"};fesa.SecObj.prototype.getExpanded=function(){for(elem in this){if(elem=="expanded"){return this[elem]}}return false};fesa.SecObj.prototype.getFileCount=function(){var A=0;for(elem in this){if(elem=="files"){A=this[elem].length;break}}return A};fesa.SecObj.prototype.getUnreadFileCount=function(){var A=0;for(elem in this){if(elem=="files"){for(v=0;v<this[elem].length;v++){if(files.fileread[fesa.getIndex(files,this[elem][v])]==0){A+=1}}break}}return A};fesa.SecObj.prototype.getIsLast=function(C){var B=this.getCount();var A=0;for(elem in this){if((elem.substr(0,3)!="get")&&(elem!="files")&&(elem!="expanded")){A+=1;if(elem==C){break}}}return A==B?true:false};fesa.SecObj._initialized=true}};Date.prototype.dateAdd=function(G,C){var H=0;var E=0;var B,D,A,F;switch(G){case"day":H=this.valueOf();E=H+C*24*60*60*1000;this.setTime(E);break;case"week":H=this.valueOf();E=H+C*7*24*60*60*1000;this.setTime(E);break;case"month":D=this.getYear()+Math.floor(C/12);F=this.getMonth()+C%12;this.setMonth(F);this.setFullYear(D);break;case"year":D=this.getFullYear();this.setFullYear(D+C);break;default:return }};Date.prototype.dateCompare=function(A){ms1=this.valueOf();ms2=A.valueOf();if(ms1==ms2){return 0}else{if(ms1<ms2){return -1}else{return 1}}};wsfe.allJsLoaded=true;