
var componentsC = -1;
var components = new Array();
var CC = color0[3];
var sep1 = "!";

for( var J0=0;J0 < comp.length ; J0++ ) {
//
// display a description bar in the component items
//
	var T0 = comp[J0];
	var T1 = parseInt(T0.length, 10)-4;
	var T2 = parseInt(T0.length, 10);

		if(T0.substring(T1, T2) == ".htm" || T0.substring(0,2) == "h:" ) {
			componentsC++;
			components[componentsC] = new Array();
			T00 = -1;

		}
		T00++;
		components[componentsC][T00] = T0;
//	}
}
// Print a Header for component Items.


function cellstart( width, height, valign, colspan, bgcolor ) {
	if( width != '' ) {
		var width = 'width="'+widthi+'"';
	}
	if( height != '' ) {
		var height = 'height="'+height+'"';
	}
	if( valign != '' ) {
		var valign = 'valign="'+valign+'"';
	}
	if( colspan != '' ) {
		var colspan = 'colspan="'+colspan+'"';
	}
	if( bgcolor != '' ) {
		var bgcolor = 'bgcolor="'+bgcolor+'"';
	}

	dw('<td '+width+' '+height+' '+valign+' '+colspan+' '+bgcolor+'>'); 
}

function comphead2 ( string ) {
	dw('tr');
//	dw('<td width="'+cel0CTS[1]+'" height="'+cel0CTS[0]+'">');
//	dw('</td>');
//	dw('<td width="'+cel0CTS[2]+'" height="'+cel0CTS[0]+'">');
//	dw('</td>');
	dw('<td width="555" height="32" valign="bottom" colspan="3" bgcolor="'+color0[0]+'">');
	dw('<p align="center">');
	fontstart(2,2);
	dw(string);
	fontend();
	dw('</td>');
	dw('<td width="'+cel0CTS[6]+'" height="'+cel0CTS[0]+'">');
	dw('</td>');
	dw('<td width="'+cel0CTS[7]+'" height="'+cel0CTS[0]+'">');
	dw('</td>');
	dw('<td width="'+cel0CTS[8]+'" height="'+cel0CTS[0]+'">');
	dw('</td>');
	dw('</tr>');
	CC = color0[1];
}



// Print a Header for component Items.

function comphead ( string ) {
	dw('<tr>');
//	dw('<td width="'+cel0CTS[1]+'" height="'+cel0CTS[0]+'">');
//	dw('</td>');
//	dw('<td width="'+cel0CTS[2]+'" height="'+cel0CTS[0]+'">');
//	dw('</td>');

// rh 06/21/06
//	dw('<td width="'+(cel0CTS[3]+cel0CTS[4]+cel0CTS[5]+cel0CTS[6])+'" height="'+(cel0CTS[0]*2)+'" valign="bottom" colspan="4" bgcolor="'+color0[0]+'">');
	dw('<td width="'+(cel0CTS[3]+cel0CTS[4]+cel0CTS[5]+cel0CTS[6])+'" height="'+(cel0CTS[0]*2)+'" valign="bottom" colspan="4" bgcolor="#FFFFFF">');

	dw('<p align="center">');
       // rh 06/21/06
	//fontstart( 3,2);
	fontstart( 3,4);
	dw('<b>');
	dw(string);
	dw('</b>');
	fontend();
	dw('</td>');
	dw('<td width="'+cel0CTS[7]+'" height="'+cel0CTS[0]+'"></td>');
	dw('<td width="'+cel0CTS[8]+'" height="'+cel0CTS[0]+'"></td>');
	dw('<td width="'+cel0CTS[9]+'" height="'+cel0CTS[0]+'"></td></tr>');

// rh 06/21/06
//	CC = color0[1];

//	if( CC == color0[3] ) 
//		CC = color0[0];
//	else
//		CC = color0[3];

}

function compprod( PA ) {

	
	var PRC = PA.length -1;
	var PRCD = "";

	if(PA[PRC] == "PY" || PA[PRC] == "PN") {
		PRCD = "";		
	} else {
		PRCD = "$"+PA[6];
	}
	dw('<tr>');


//	dw('<td width="'+cel0CTS[1]+'" height="'+cel0CTS[0]+'"></td>');
//	dw('<td width="'+cel0CTS[2]+'" height="'+cel0CTS[0]+'">');
//	dw('</td>');
	dw('<td width="'+cel0CTS[3]+'" height="'+cel0CTS[0]+'" valign=\"middle\" bgcolor="'+CC+'">');
	fontstart(4,1);
	dw(PA[1]);
	fontend();
	dw('</td>');
	dw('<td width="'+cel0CTS[4]+'" height="'+cel0CTS[0]+'" valign=\"middle\" align="center" bgcolor="'+CC+'">');
	fontstart(4,1);
//	dw("<a href=\""+PA[0]+"\" onclick=\"Javascript:addtocart\(\'"+PA.join("!")+"\');\">");
	dw(PRCD);
//	dw('</a>');
	fontend();
	dw('</td>');
	dw('<td width="'+cel0CTS[5]+'" height="'+cel0CTS[0]+'" bgcolor="'+CC+'">');
	fontstart(4,1);
	dw(PA[2]);
	dw('</font>');
	dw('</td>');
	dw('<td width="'+cel0CTS[6]+'" height="'+cel0CTS[0]+'" align="right" bgcolor="'+CC+'">');
	fontstart(2,1);
	if(PA[PRC] == "PY" || PA[PRC] == "PN") {
		dw("<p>&nbsp;</p>");
	} else {
              dw("<INPUT TYPE=\"button\" VALUE=\"Buy\" onClick=\"Javascript:addtocart\(\'"+PA.join("!")+"\');\">");
//		dw("<a href=\""+PA[0]+"\" onclick=\"Javascript:addtocart\(\'"+PA.join("!")+"\');\">");
//		dw("Add to Cart");
//		dw('</a>');
	}
	fontend();

	dw('</td>');
	dw('<td width="'+cel0CTS[7]+'" height="'+cel0CTS[0]+'">');
	dw('</td>');
	dw('<td width="'+cel0CTS[8]+'" height="'+cel0CTS[0]+'">');
	dw('</td>');
	dw('<td width="'+cel0CTS[9]+'" height="'+cel0CTS[0]+'">');
	dw('</td>');
	dw('</tr>');
	if( CC == color0[3] ) 
		CC = color0[0];
	else
		CC = color0[3];
}


dw( sts );

// Print Component header bar

// dw('<tr>');
// dw('<td width="'+cel0CTS[1]+'" height="'+cel0CTS[0]+'">');
// dw('</td>');
// dw('<td width="'+cel0CTS[2]+'" height="'+cel0CTS[0]+'">');
// dw('</td>');
dw('<td width="'+cel0CTS[3]+'" height="'+cel0CTS[0]+'">');
dw('<b>');
fontstart(4,1);
dw('Product<br>No.');
fontend();
dw('</b>');
dw('</td>');
dw('<td width="'+cel0CTS[4]+'" height="'+cel0CTS[0]+'">');
dw('<p align="center">');
dw('<b>');
fontstart(4,1);
dw('Price');
fontend();
dw('</b>');
dw('</td>');
dw('<td width="'+cel0CTS[5]+'" height="'+cel0CTS[0]+'">');
dw('<b>');
fontstart(4,1);
dw('Description');
fontend();
dw('</b>');
dw('</td>');
dw('<td width="'+cel0CTS[6]+'" height="'+cel0CTS[0]+'">');
dw('</td>');
dw('<td width="'+cel0CTS[7]+'" height="'+cel0CTS[0]+'">');
dw('</td>');
dw('<td width="'+cel0CTS[8]+'" height="'+cel0CTS[0]+'">');
dw('</td>');
dw('<td width="'+cel0CTS[9]+'" height="'+cel0CTS[0]+'">');
dw('</td>');
dw('</tr>');


for( var J = 0 ; J < components.length ; J++ ) {
	if( components[J].length == 1 ) {
		T0 = components[J][0];
		if(T0.substring(0,2) == "h:" ) {
			comphead("<br>"+T0.substring(2,parseInt(T0.length)));
		}
	} else {
		compprod( components[J] );
	}
}

dw('</table>');
