
function displayProductList()
{
	var modelnum, row, cell, img, lnk, txt, i, div;
	var tbl = document.getElementById('ProductListTable').tBodies[0];
	while (tbl.rows.length > 0) {
		tbl.deleteRow(0);
	}
	i = 0;
	for (modelnum in results) {
		row = document.createElement('tr');
			cell = document.createElement('td');
				cell.setAttribute('width', '65px');
				cell.style.borderBottom = '1px solid #CCCCCC';
				img = document.createElement('img');
				img.setAttribute('src', '../images/' + results[modelnum]['ThumbnailFileName']);
				img.setAttribute('alt', ' ');
				if(img.attachEvent)img.attachEvent('onerror', removeMe);
				cell.appendChild(img);
		row.appendChild(cell);
			cell = document.createElement('td');
				cell.setAttribute('width', '65px');
				cell.style.whiteSpace = 'nowrap';
				cell.setAttribute('nowrap', '65px');
				cell.style.borderBottom = '1px solid #CCCCCC';
				cell.style.padding = '5px';
				txt = document.createTextNode(modelnum);
				cell.appendChild(txt);
		row.appendChild(cell);
			cell = document.createElement('td');
				cell.style.borderBottom = '1px solid #CCCCCC';
				cell.style.borderRight = '1px solid #CCCCCC';
				lnk = document.createElement('a');
				txt = document.createTextNode('Download (.pdf)');
				lnk.appendChild(txt);
				lnk.setAttribute('href', '../pdf_catalog08/' + results[modelnum]['pdfFileName'] + '.pdf');
				lnk.setAttribute('target', '_blank');
				cell.appendChild(lnk);
		row.appendChild(cell);
		tbl.appendChild(row);
		i++;
	}
	div = document.getElementById('ProductWindow');
	div.style.height = '500px';
	div.style.border = '1px solid #cccccc';
	if (div.scrollHeight < div.clientHeight) div.style.height = div.scrollHeight;
	cell = document.getElementById('productCountTicker');
	cell.innerHTML = i + ' item(s) found';
}
/*  by ky
function compare()
{
	if (typeof(compareHeaders) == 'object') {
		var tmpDiv, scrollDiv, wrapTbl, wrapRow, headTbl, dataTbl, row, cell, lnk, txt, img, i;
		// Header table
		img = document.createElement('img');
		img.src = '/js/overlibmws/exit.gif';
		img.alt = 'Click to remove this model';
		img.title = 'Click to remove this model';
		img.align = 'right';
		img.style.border = '0px';
		img.style.cursor = 'pointer';
		// Header table
		headTbl = document.createElement('table');
		headTbl.cellPadding = '2px';
		headTbl.cellSpacing = '1px';
		headTbl.style.border = '0px';
		// Data Table
		dataTbl = headTbl.cloneNode(false);
		dataTbl.id = 'compareTable';
		for (index in compareHeaders) {
			row = document.createElement('tr');
			cell = document.createElement('td');
			cell.style.height = '16px';
			cell.className = 'BoldWhite';
			cell.style.backgroundColor = '#CC0000';
			txt = document.createTextNode(compareHeaders[index]);
			cell.appendChild(txt);
			row.appendChild(cell);
			headTbl.appendChild(row);
			// Data Cells
			row = document.createElement('tr');
			i = 0;
			for (modelnum in results) {
				cell = document.createElement('td');
				cell.style.height = '16px';
				cell.style.whiteSpace = 'nowrap';
				cell.nowrap = true; // force in IE
				if (index == 'ModelNumber') {
					cell.className = 'BoldWhite';
					cell.style.backgroundColor = '#3300CC';
					img = img.cloneNode(false);
					img.setAttribute('onclick','removeCompareColumn("'+modelnum+'");');
					cell.appendChild(img);
				} else {
					cell.className = 'SmallBlack';
					cell.style.backgroundColor = (Boolean(i%2) ? '#CCCCCC' : '#DDDDDD');
				}
				if (index == 'ApplicationNotes') {
					lnk = document.createElement('a');
					lnk.href = 'javascript:;';
					txt = '<img src="/images/' + results[modelnum].ThumbnailFileName + '" style="border:0px; float:left; margin:0px 4px 2px 0px;" />' + results[modelnum].ApplicationNotes;
					lnk.setAttribute('onclick', 'return overlib2(\'' + txt + '\', CAPTION, \'' + modelnum + '\', DRAGGABLE, HAUTO, FGCOLOR, \'#e9e9e9\');');
					txt = document.createTextNode('Application Notes');
					lnk.appendChild(txt);
					cell.appendChild(lnk);
				} else {
					if (results[modelnum][index]) { txt = document.createTextNode(results[modelnum][index]); }
					else { txt = document.createTextNode(' '); }
					cell.appendChild(txt);
				}
				cell.id = modelnum;
				row.appendChild(cell);
				i++;
			}
			dataTbl.appendChild(row);
		}
		scrollDiv = document.createElement('div');
		scrollDiv.id = 'compareScroller';
		scrollDiv.className = 'MEDblack';
		scrollDiv.style.border = '0px';
		scrollDiv.style.width = '565px';
		scrollDiv.style.overflow = 'auto';
		scrollDiv.style.overflowX = 'scroll';
		scrollDiv.style.overflowY = 'visible';
		scrollDiv.appendChild(dataTbl);
		// Format control table
		wrapTbl = document.createElement('tbl');
		wrapTbl.style.border = '0px';
		wrapTbl.cellpadding = '0px';
		wrapTbl.cellspacing = '0px';
		wrapRow = document.createElement('tr');
		// Add headTbl to wrapper table
		cell = document.createElement('td');
		cell.style.verticalAlign = 'top';
		cell.style.border = '1px solid #CCCCCC';
		cell.appendChild(headTbl);
		wrapRow.appendChild(cell);
		// Add scrollDiv to wrapper table
		cell = cell.cloneNode(false);
		cell.appendChild(scrollDiv);
		wrapRow.appendChild(cell);
		wrapTbl.appendChild(wrapRow);
		// Temp div to grab innerHTML from
		tmpDiv = document.createElement('div');
		tmpDiv.appendChild(wrapTbl);
		return overlib(tmpDiv.innerHTML, CAPTION, 'Honeywell Sensotec Product Comparison', RELX, 1, RELY, 43, SCROLL, EXCLUSIVE, WRAP);
	} else {
		return false;
	}
}

function removeCompareColumn(modelnum)
{
	var i, j;
	var tbl = document.getElementById('compareTable');
	for (i=0; i<tbl.rows.length; i++) {
		for (j=0; j<tbl.rows[i].cells.length; j++) {
			if (tbl.rows[i].cells[j].id == modelnum) {
				tbl.rows[i].deleteCell(j);
				break;
			}
		}
	}
}
*/
function removeMe() { event.srcElement.parentNode.removeChild(event.srcElement); }

/*
function showHelp(helpFor)
{
	if (typeof(help_texts) != 'undefined') {
		return overlib(help_texts[helpFor]['text'], CAPTION, help_texts[helpFor]['caption'], help_texts[helpFor]['hpos'], OFFSETY, 0, DRAGGABLE);
	}
	return false;
}
*/
var css = document.createElement('link');
css.setAttribute('rel', 'stylesheet');
css.setAttribute('type', 'text/css');
css.setAttribute('href', './style.css');
document.getElementsByTagName('head')[0].appendChild(css);
/*
OLpageDefaults(
			STICKY,
			NOFOLLOW,
			CLOSETEXT, '<img src="../js/overlibmws/close.gif" alt="Click to close" style="border:0px;">',
			CLOSECLICK,
			HIDESELECTBOXES
			);
*/
var results = new Array();
