
function topLink(anIdx)
{
var anImgName="topImg"+anIdx;
document.write("<a href=\"#pageTop\"><img name=\""+anImgName+"\" src=\"images/_top.jpg\" onmouseout=\""+anImgName+".src='images/_top.jpg';\" onmouseover=\""+anImgName+".src='images/_topP.jpg';\" width=\"39\" height=\"33\"></a>");
}

function DirItem( anItem )
{
   this.item=anItem;
} 

var hipaa = new Array();
hipaa.push(new DirItem("M270_4010 - 270 - Eligibility, Coverge or Benefit Inquiry"));
hipaa.push(new DirItem("M271_4010 - 271 - Eligibility, Coverge or Benefit Information"));
hipaa.push(new DirItem("M276_4010 - 276 - Health Care Claim Status Request"));
hipaa.push(new DirItem("M277_4010 - 277 - Health Care Claim Status Notification"));
hipaa.push(new DirItem("M278_4010 - Health Care Services Review Information"));
hipaa.push(new DirItem("M278_4010 - Health Care Services Review Information Response"));
hipaa.push(new DirItem("..."));

var ansix12_3030 = new Array();
ansix12_3030.push(new DirItem("M104 - Air Shipment Information"));
ansix12_3030.push(new DirItem("M110 - Air Freight Details and Invoice"));
ansix12_3030.push(new DirItem("M114 - Air Shipment Status Message"));
ansix12_3030.push(new DirItem("M130 - Student Educational Record (Transcript)"));
ansix12_3030.push(new DirItem("M131 - Student Educational Record (Transcript) Acknowledgment"));
ansix12_3030.push(new DirItem("M135 - Student Loan Application"));
ansix12_3030.push(new DirItem("M139 - Student Loan Guarantee Result"));
ansix12_3030.push(new DirItem("M140 - Product Registration"));
ansix12_3030.push(new DirItem("M141 - Product Service Claim Response"));
ansix12_3030.push(new DirItem("M142 - Product Service Claim"));
ansix12_3030.push(new DirItem("..."));

var ansix12_4010 = new Array();
ansix12_4010.push(new DirItem("M100 - Insurance Plan Description"));
ansix12_4010.push(new DirItem("M101 - Name and Address Lists"));
ansix12_4010.push(new DirItem("M104 - Air Shipment Information"));
ansix12_4010.push(new DirItem("M105 - Business Entity Filings"));
ansix12_4010.push(new DirItem("M106 - Motor Carrier Rate Proposal"));
ansix12_4010.push(new DirItem("M107 - Request for Motor Carrier Rate Proposal"));
ansix12_4010.push(new DirItem("M108 - Response to a Motor Carrier Rate Proposal"));
ansix12_4010.push(new DirItem("M109 - Vessel Content Details"));
ansix12_4010.push(new DirItem("M110 - Air Freight Details and Invoice"));
ansix12_4010.push(new DirItem("M112 - Property Damage Report"));
ansix12_4010.push(new DirItem("M120 - Vehicle Shipping Order"));
ansix12_4010.push(new DirItem("M121 - Vehicle Service"));
ansix12_4010.push(new DirItem("..."));

var edfact_d00 = new Array();
edfact_d00.push(new DirItem("APERAK - Application Error and Acknowledgement Message"));
edfact_d00.push(new DirItem("AUTHOR - Authorization Message"));
edfact_d00.push(new DirItem("BALANC - Balance Message"));
edfact_d00.push(new DirItem("BANSTA - Banking Status Message"));
edfact_d00.push(new DirItem("BAPLIE - Bayplan/Stowage Plan Occupied and Empty Locations Message"));
edfact_d00.push(new DirItem("BAPLTE - Bayplan/Stowage Plan Total Numbers Message"));
edfact_d00.push(new DirItem("BERMAN - Berth Management Message"));
edfact_d00.push(new DirItem("..."));

var edifact_d99a = new Array();
edifact_d99a.push(new DirItem("APERAK - Application Error and Acknowledgement Message"));
edifact_d99a.push(new DirItem("AUTHOR - Authorization Message"));
edifact_d99a.push(new DirItem("BALANC - Balance Message"));
edifact_d99a.push(new DirItem("BANSTA - Banking Status Message"));
edifact_d99a.push(new DirItem("BAPLIE - Bayplan/Stowage Plan Occupied and Empty Locations Message"));
edifact_d99a.push(new DirItem("BAPLTE - Bayplan/Stowage Plan Total Numbers Message"));
edifact_d99a.push(new DirItem("BMISRM - Bulk Marine Inspection Summary Report Message"));
edifact_d99a.push(new DirItem("BOPBNK - Bank Transactions and Portfolio Transactions Report Message"));
edifact_d99a.push(new DirItem("BOPCUS - Balance of Payment Customer Transaction Report Message"));
edifact_d99a.push(new DirItem("BOPDIR - Direct Balance of Payment Declaration Message"));
edifact_d99a.push(new DirItem("..."));

var edifact_d99b = new Array();
edifact_d99b.push(new DirItem("BOPBNK - Bank Transactions and Portfolio Transactions Report Message"));
edifact_d99b.push(new DirItem("BOPCUS - Balance of Payment Customer Transaction Report Message"));
edifact_d99b.push(new DirItem("BOPDIR - Direct Balance of Payment Declaration Message"));
edifact_d99b.push(new DirItem("BOPINF - Balance of Payment Information from Customer Message"));
edifact_d99b.push(new DirItem("BUSCRD - Business Credit Report Message"));
edifact_d99b.push(new DirItem("CALINF - Vessel Call Information Message"));
edifact_d99b.push(new DirItem("CASINT - Request for Legal Administration Action in Civil Proceedings Message"));
edifact_d99b.push(new DirItem("CASRES - Legal Administration Response in Civil Proceedings Message"));
edifact_d99b.push(new DirItem("CHACCO - Chart of Accounts Message"));
edifact_d99b.push(new DirItem("CLASET - Classification Information Set Message"));
edifact_d99b.push(new DirItem("CNTCND - Contractual Conditions Message"));
edifact_d99b.push(new DirItem("COACSU - Commercial Account Summary Message"));
edifact_d99b.push(new DirItem("..."));

function TemplateProject(aProjectName,aProjectTitle,aMessageArray,aLink)
{
this.project=aProjectName;
this.title=aProjectTitle;
this.messages=aMessageArray;
this.link=aLink;
}

var HIPAAProject=new TemplateProject("HIPAA","HIPAA Messages",hipaa,"templates/cx_templateFrm.asp?FRM=HIPAA");
var ANSI12_3030Project=new TemplateProject("ANSIIX12_3030","ANSI X.12 3030 Messages",ansix12_3030,"templates/cx_templateFrm.asp?FRM=ansix12_3030");
var ANSI12_4010Project=new TemplateProject("ANSIIX12_4010","ANSI X.12 4010 Messages",ansix12_4010,"templates/cx_templateFrm.asp?FRM=ansix12_4010");
var EDIFACT_d00Project=new TemplateProject("EDFACT_d00","EDIFACT d00a Messages",edfact_d00,"templates/cx_templateFrm.asp?FRM=edifact_d00");
var EDIFACT_d99aProject=new TemplateProject("EDFACT_d99a","EDIFACT d99a Messages",edifact_d99a,"templates/cx_templateFrm.asp?FRM=edifact_d99a");
var EDIFACT_d99bProject=new TemplateProject("EDFACT_d99b","EDIFACT d99b Messages",edifact_d99b,"templates/cx_templateFrm.asp?FRM=edifact_d99b");
var projectArray = new Array();
projectArray.push(HIPAAProject);
projectArray.push(EDIFACT_d00Project);
projectArray.push(EDIFACT_d99aProject);
projectArray.push(EDIFACT_d99bProject);
projectArray.push(ANSI12_3030Project);
projectArray.push(ANSI12_4010Project);

// GENERATE LIST OF FORMAT MESSAGES FOR EDIFACT d99a Project
function generateEDIFACT_d99aProject()
{
generateDirItemList(EDIFACT_d99aProject);
}

// GENERATE LIST OF FORMAT MESSAGES FOR EDIFACT d99b Project
function generateEDIFACT_d99bProject()
{
generateDirItemList(EDIFACT_d99bProject);
}

// GENERATE LIST OF FORMAT MESSAGES FOR EDIFACT d99a Project
function generateEDIFACT_d00Project()
{
generateDirItemList(EDIFACT_d00Project);
}

// GENERATE LIST OF FORMAT MESSAGES FOR ANSI12_3030 Project
function generateANSI12_3030Project()
{
generateDirItemList(ANSI12_3030Project);
}

// GENERATE LIST OF FORMAT MESSAGES FOR ANSI12_4010 Project
function generateANSI12_4010Project()
{
generateDirItemList(ANSI12_4010Project);
}

// GENERATE LIST OF FORMAT MESSAGES FOR HIP AA
function generateHipaa()
{
generateDirItemList(HIPAAProject);
}
var i=0;
// GENERATE LIST OF FORMAT MESSAGES 
function generateDirItemList(aTemplPrj)
{  
  document.writeln("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
  document.writeln("<tr><td height =\"2\" width=\"400\" background=\"images/divider_dot.gif\"><img border=\"0\" src=\"images/blank1x1.gif\" width=\"1\" height=\"1\"></td></tr>");
  document.writeln("<tr><td>");
  document.writeln("<a class=\"pageSectionHeader\" name=\""+aTemplPrj.project+"\">"+aTemplPrj.title+"</a>");
  document.writeln("<div class=\"pageContentItems\">");
  document.writeln("<menu>");
  var anArray = aTemplPrj.messages;
  for(anIndex=0;anIndex<anArray.length;anIndex++)
  {
     var aDirItem=anArray[anIndex];
     document.writeln("<li>"+aDirItem.item+"</li>" );
  }
  var aLink = aTemplPrj.link+"&TITLE="+aTemplPrj.title;

  document.writeln("<li class='aLinkMenu'><a href=\"#\" onclick=\"return window.openWin('"+aLink+"','aWin');\" class=\"pageContentLink2\" target=\"templates\">View complete list of "+aTemplPrj.title+"</a></li>");
  document.writeln("</menu>");  
  document.writeln("</div>");
  document.writeln("<div align=right>");
  i++;
  //buyLink(i);
  topLink(i);
  document.writeln("</div>");
  document.writeln("</td></tr>");
  document.writeln("</table>");
}

function generateFormatLinks()
{
  document.writeln("<ul>");
  for ( anIndex=0; anIndex<projectArray.length;anIndex++)
  {
     var aDir=projectArray[anIndex];
     document.writeln("<li><a class=\"pageContentLink2\" href=\"#"+aDir.project+"\">"+aDir.title+"</a></li>" );
  }
  document.writeln("</ul>");
}

