function getList(type){
 if(type == "O"){
   type = "ol";
 }else{
   type = "ul";
 }
 listCode = "<" + type + ">"
 for (i = 1; i < getList.arguments.length; i++){
   listCode += "<li>" + getList.arguments[i] + "</li>";
 }
 listCode += "</" + type + ">";
 return listCode;
}

function getRightText(text){
  return "<div style=\"width:100%;text-align:right\">" + text + "</div>";
}

function getLink(link,text,target){
  if(!link || link == ""){
    link = "javascript:void(0)";
  }
  if(!target || target == ""){
    target = "";
  }else{
    target = "target=\"" + target + "\"";
  }
  return "<a href=\"" + link + "\" " + target + ">" + text + "</a>"
}

function getTable(cols,width,cellspacing,borderWidth,borderColor){
  if(!width || width == ""){
    width = "100%";
  }
  if(!borderWidth || borderWidth == ""){
    borderWidth = 0;
  }
  if(!borderColor || borderColor == ""){
    borderColor = "#000000";
  }
  tableBorderWidth = borderWidth;
  tableBorderColor = borderColor;
  if(!cellspacing || cellspacing == ""){
    cellspacing = 0;
  }
  if(cellspacing > 0){
    borderTable = "border:" + tableBorderWidth + "px solid " + tableBorderColor + ";";
    borderCells = "border:" + tableBorderWidth + "px solid " + tableBorderColor + ";";
  }else{
    borderTable = "border:" + tableBorderWidth + "px solid " + tableBorderColor + ";border-style: none solid solid none";
    borderCells = "border:" + tableBorderWidth + "px solid " + tableBorderColor + ";border-style: solid none none solid";
  }
  tableCode = "<table width=\"" + width + "\" cellspacing = \"" + cellspacing + "\" border = \"0\" style=\"" + borderTable + "\">"
  tableColumns = cols;
  return tableCode;
}

function getTableRow(){
 tableCode = "<tr>"
 for (i = 0; i < tableColumns; i++){
   if(getTableRow.arguments[i]){
     tableCode += "<td style=\"text-align:left;vertical-align:top;padding:3px;" + borderCells + "\" class=\"textn\">" + getTableRow.arguments[i] + "</td>";
   }else{
     tableCode += "<td style=\"text-align:left;vertical-align:top;padding:3px;" + borderCells + "\" class=\"textn\">&nbsp;</td>";
   }
 }
 tableCode += "</tr>";
 return tableCode;
}

function closeTable(){
  tableCode = "</table>";
  return tableCode;
}