var ff="";
var low="";
var hi="";
var d=document;
var oldTD;
var oldFF;
var ns4 = (document.layers)? true:false;

var letters =  [ "A","B","C","D","E","F","G","H","I","J","K","L"];
var zoneColorId = [ "zf1","zf2","zf2","zf3","zf4","zf1","zf3","zf2","zf1","zf3","zf2","zf4"];

var usaFares =[ ["$169","$259","$369","$249","$279","$269","$269","$489","$1,009","$629"],  //A
                ["$259","$199","$409","$369","$309","$389","$239","$549","$1,119","$469"],  //B
                ["$369","$409","$169","$309","$309","$229","$389","$499","$629","$739"],  //C
                ["$249","$369","$309","$289","$269","$309","$359","$419","$969","$639"],  //D
                ["$279","$309","$309","$269","$229","$319","$309","$499","$959","$629"], 	//E
                ["$269","$389","$229","$309","$319","$169","$409","$379","$669","$939"],  //F
                ["$269","$239","$389","$359","$309","$409","$309","$619","$1029","$469"],  //G
                ["$489","$549","$499","$419","$499","$379","$619","N/A","$989","$1189"],  //H
                ["$1009","$1119","$629","$969","$959","$669","$1029","$989","N/A","$1169"], //I
                ["$629","$469","$739","$639","$629","$939","$469","$1189","$1169","N/A"],  //J			
                ["$405","$556","$319","$448","$502","$201","$480","$384","$749","$943"],  //K
                ["$298","$351","$502","$405","$502","$556","$330","$566","$1179","$480"] //L				
              ];

function buildChart() {
    for (var i=0;i<12;i++){
      row =letters[i];
document.write("<TR align='center'>");
document.write('<TD width=60 id="'+zoneColorId[i]+'">'+letters[i]+'</TD>');
 // update content of each TD in table
        for (j=0; j< 10; j++) {
        col=letters[j];
        fare=usaFares[i][j];
document.write('<TD id="'+letters[j]+letters[i]+'">'+fare+'</TD>');
//         document.getElementById(col+row).innerHTML = fare;
        } //end inner loop</TR>
document.write("<\/TR>");
    } //end of outer loop
} //end function




function getPrice(dep_index,arr_index) {
  if (!ns4  && oldTD) {
    document.getElementById(oldTD).style.backgroundColor = "";  
    document.getElementById(oldTD).innerHTML = oldFF; 
  }

  if (dep_index == 0 || arr_index == 0) {
    document.forms[0].fare.value="";
    return ("");}

  var dep = d.pc.dep[dep_index].value;
  var depLetter =letters[dep-1];
  var arr = d.pc.arr[arr_index].value;
  var arrLetter =letters[arr-1];

  ff = usaFares[arr-1][dep-1];
    document.forms[0].fare.value=ff;

  if (!ns4) { 
    oldTD = depLetter+arrLetter;
    oldFF = ff; 
    document.getElementById(depLetter+arrLetter).innerHTML = "<FONT color='white'><B>"+ff+"</B></FONT>";
    document.getElementById(depLetter+arrLetter).style.backgroundColor = "8597DE";  
  }
  return ff;
}

<!--
var popUpWin=0;
var bodyTag ="helpPopupContent_Frame.swp";
function popUpWindow(URLStr, left, top, width, height) {
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=auto,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
} //end of popupWindow function

function popUpWindowHelp(URLStr, left, top, width, height, anchor) {
  bodyTag = "helpPopupContent_Frame.swp";
  if (anchor) {
   bodyTag=bodyTag+"#"+anchor;
  }
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
  setTimeout('createFrameset()',1000);
} //end of popupWindow function

function createFrameset() {
  popUpWin.mainFrame.location.href = bodyTag;
}  // end of function createFrameset

  // -->

<!--

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		bttnHelp_over = newImage("/images/swp/global/bttnHelp-over.gif");
		preloadFlag = true;
	}
}
if (window != top) top.location = location;
    // -->
