<!-- Begin

var blnAdvancedQuery = false;
var arrGroups = new Array();
var intTotalFilterCount = 27;

for (var i=1; i<=6; i++)
	arrGroups[i] = false;

var strHead1ClassLeft	= 'qf_title1_left';
var strHead1ClassMiddle	= 'qf_title1_middle';
var strHead1ClassRight	= 'qf_title1_right';
var strHead2ClassLeft	= 'qf_title2_left';
var strHead2ClassMiddle	= 'qf_title2_middle';
var strHead2ClassRight	= 'qf_title2_right';
var strBodyClassLeft	= 'qf_item_left';
var strBodyClassMiddle	= 'qf_item_middle';
var strBodyClassRight	= 'qf_item_right';
var strFooterClass		= 'qf_footer';
	

function setValue(intX, intY, intValue)
{
	if (intValue == '')
		arrFilters[intX][intY] = null;
	else
		arrFilters[intX][intY] = intValue;
	
}

function setFilterClasses(intFilterType)
{
	if (intFilterType == 1) // Scorecard
	{
		strHead1ClassLeft	= 'sc_title1_left';
		strHead1ClassMiddle	= 'sc_title1_middle';
		strHead1ClassRight	= 'sc_title1_right';
		strHead2ClassLeft	= 'sc_title2_left';
		strHead2ClassMiddle	= 'sc_title2_middle';
		strHead2ClassRight	= 'sc_title2_right';
		strBodyClassLeft	= 'sc_item1_left';
		strBodyClassMiddle	= 'sc_item1_middle';
		strBodyClassRight	= 'sc_item1_right';
		strFooterClass		= 'sc_footer';
	}
	else // Query default
	{
		strHead1ClassLeft	= 'qf_title1_left';
		strHead1ClassMiddle	= 'qf_title1_middle';
		strHead1ClassRight	= 'qf_title1_right';
		strHead2ClassLeft	= 'qf_title2_left';
		strHead2ClassMiddle	= 'qf_title2_middle';
		strHead2ClassRight	= 'qf_title2_right';
		strBodyClassLeft	= 'qf_item_left';
		strBodyClassMiddle	= 'qf_item_middle';
		strBodyClassRight	= 'qf_item_right';
		strFooterClass		= 'qf_footer';
	}
		
}
function showFilters()
{
	//change the filter link
	var lnkFilter = document.getElementById('FilterLink')
	if (lnkFilter)
	{
		lnkFilter.innerHTML = 'Hide Filters';
		lnkFilter.href = 'javascript:hideFilters()';
	}
	
	blnAdvancedQuery = true;

	var filterTable = document.getElementById('FilterTableBody');
	if (!filterTable)
	{
		filterTable = document.getElementById('FilterTable');
		var tbody = document.createElement('tbody');
		tbody.id = 'FilterTableBody';
		filterTable.appendChild(tbody);
		filterTable = document.getElementById('FilterTableBody');
	}
	
	//header row
	var tr = document.createElement('tr');
	
	//left cell
	var td = document.createElement('td');
	td.className = strHead1ClassLeft;
	td.style.width = '8px';
	tr.appendChild(td);
	
	//Middle cell
	td = document.createElement('td');
	td.className = strHead1ClassMiddle;
	td.colSpan = 4;
	td.style.width = '713px';
	
		var tbl = document.createElement('table');
		tbl.style.borderCollapse = 'collapse';
		tbl.style.height = '100%';
		tbl.cellPadding = 0;
		tbl.cellSpacing = 0;
		var tbdy = document.createElement('tbody');
		var trow = document.createElement('tr');

		// -- blank cell
		var tcell = document.createElement('td');
		tcell.style.width = '410px';
		trow.appendChild(tcell);
		
		// -- value cell
		tcell = document.createElement('td');
		tcell.style.fontSize = '10pt';
		tcell.style.width = '300px';
		tcell.style.color = 'White';
		tcell.style.fontWeight = 'bold';
		tcell.style.verticalAlign = 'bottom';
		tcell.innerHTML = 'Must be equal to or';
		trow.appendChild(tcell);
		tbdy.appendChild(trow);
		tbl.appendChild(tbdy);
		td.appendChild(tbl);
	
	tr.appendChild(td);
	
	//Right cell
	td = document.createElement('td');
	td.className = strHead1ClassRight;
	td.style.width = '9px';
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	//header 2 row
	var tr = document.createElement('tr');
	
	//left cell
	var td = document.createElement('td');
	td.className = strHead2ClassLeft;
	td.style.width = '8px';
	tr.appendChild(td);
	
	//Middle cell
	td = document.createElement('td');
	td.className = strHead2ClassMiddle;
	td.colSpan = 4;
	td.style.width = '713px';
	
		var tbl = document.createElement('table');
		tbl.style.borderCollapse = 'collapse';
		tbl.style.height = '100%';
		tbl.cellPadding = 0;
		tbl.cellSpacing = 0;
		var tbdy = document.createElement('tbody');
		var trow = document.createElement('tr');

		// -- Check cell
		var tcell = document.createElement('td');
		tcell.width = '20px';
		trow.appendChild(tcell);
		
		// -- filter cell
		tcell = document.createElement('td');
		tcell.style.fontSize = '10pt';
		tcell.style.width = '200px';
		tcell.style.color = 'White';
		tcell.style.verticalAlign = 'top';
		tcell.style.textDecoration = 'underline';
		tcell.style.fontWeight = 'bold';
		tcell.innerHTML = 'Filters';
		trow.appendChild(tcell);
	
		// -- eval cell
		tcell = document.createElement('td');
		tcell.style.fontSize = '10pt';
		tcell.style.width = '190px';
		tcell.style.color = 'White';
		tcell.style.verticalAlign = 'top';
		tcell.style.textDecoration = 'underline';
		tcell.style.fontWeight = 'bold';
		tcell.innerHTML = 'Evaluation Factor';
		trow.appendChild(tcell);
		
		// -- value cell
		tcell = document.createElement('td');
		tcell.style.fontSize = '10pt';
		tcell.style.width = '300px';
		tcell.style.color = 'White';
		tcell.style.verticalAlign = 'top';
		tcell.style.textDecoration = 'underline';
		tcell.style.fontWeight = 'bold';
		tcell.innerHTML = 'greater than this value';
		trow.appendChild(tcell);
		tbdy.appendChild(trow);
		tbl.appendChild(tbdy);
		td.appendChild(tbl);
	
	tr.appendChild(td);
	
	//Right cell
	td = document.createElement('td');
	td.className = strHead2ClassRight;
	td.style.width = '9px';
	tr.appendChild(td);
	filterTable.appendChild(tr);
		
	//Blank row
	tr = document.createElement('tr');
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	td.style.width = '8px';
	td.style.height = '1px';
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.style.width = '20px';
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.style.width = '200px';
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.style.width = '190px';
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.style.width = '303px';
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassRight;
	td.style.width = '9px';
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	
	//Company - Row1
	tr = document.createElement('tr');
	tr.id = 'Row1';
	
	//Left cell
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	// Check cell
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	
	var img = document.createElement('img');
	img.src = '/Survey/Images/closed-menu.gif';
	img.id = 'ImgRow1';
	img.alt = 'Expand Section';
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onclick',('javascript:void(enableRow(this,1));'));
	else
		img.onclick = Function('enableRow(this,1)');
	
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onmouseover',('javascript:void(this.style.cursor="pointer");'));
	else
		img.onmouseover = Function('enableRow(this.style.cursor="pointer")');
	td.appendChild(img);
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.colSpan = 3;
	td.style.textDecoration = 'underline';
	td.style.fontWeight = 'bold';
	td.innerHTML = 'Company';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	//Blank row
	tr = document.createElement('tr');
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.colSpan = 4;
	td.className = strBodyClassMiddle;
	td.style.height = '10px';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	// Sales channel - Row 2
	tr = document.createElement('tr');
	tr.id = 'Row2';
	
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	
	var img = document.createElement('img');
	img.src = '/Survey/Images/closed-menu.gif';
	img.id = 'ImgRow2';
	img.alt = 'Expand Section';
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onclick',('javascript:void(enableRow(this,2));'));
	else
		img.onclick = Function('enableRow(this,2)');
	
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onmouseover',('javascript:void(this.style.cursor="pointer");'));
	else
		img.onmouseover = Function('enableRow(this.style.cursor="pointer")');
	td.appendChild(img);
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.colSpan = 3;
	td.style.textDecoration = 'underline';
	td.style.fontWeight = 'bold';
	td.innerHTML = 'Sales channel';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	//Blank row
	tr = document.createElement('tr');
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.colSpan = 4;
	td.className = strBodyClassMiddle;
	td.style.height = '10px';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	// Sales channel - Row 3
	tr = document.createElement('tr');
	tr.id = 'Row3';
	
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	
	var img = document.createElement('img');
	img.src = '/Survey/Images/closed-menu.gif';
	img.id = 'ImgRow3';
	img.alt = 'Expand Section';
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onclick',('javascript:void(enableRow(this,3));'));
	else
		img.onclick = Function('enableRow(this,3)');
	
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onmouseover',('javascript:void(this.style.cursor="pointer");'));
	else
		img.onmouseover = Function('enableRow(this.style.cursor="pointer")');
	td.appendChild(img);
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.colSpan = 3;
	td.style.textDecoration = 'underline';
	td.style.fontWeight = 'bold';
	td.innerHTML = 'Supply chain spend';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	//Blank row
	tr = document.createElement('tr');
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.colSpan = 4;
	td.className = strBodyClassMiddle;
	td.style.height = '10px';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	// Supply chain network - Row 4
	tr = document.createElement('tr');
	tr.id = 'Row4';
	
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	
	var img = document.createElement('img');
	img.src = '/Survey/Images/closed-menu.gif';
	img.id = 'ImgRow4';
	img.alt = 'Expand Section';
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onclick',('javascript:void(enableRow(this,4));'));
	else
		img.onclick = Function('enableRow(this,4)');
	
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onmouseover',('javascript:void(this.style.cursor="pointer");'));
	else
		img.onmouseover = Function('enableRow(this.style.cursor="pointer")');
	td.appendChild(img);
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.colSpan = 3;
	td.style.textDecoration = 'underline';
	td.style.fontWeight = 'bold';
	td.innerHTML = 'Supply chain network';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	//Blank row
	tr = document.createElement('tr');
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.colSpan = 4;
	td.className = strBodyClassMiddle;
	td.style.height = '10px';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	// Product Characteristics - Row 5
	tr = document.createElement('tr');
	tr.id = 'Row5';
	
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	
	var img = document.createElement('img');
	img.src = '/Survey/Images/closed-menu.gif';
	img.id = 'ImgRow5';
	img.alt = 'Expand Section';
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onclick',('javascript:void(enableRow(this,5));'));
	else
		img.onclick = Function('enableRow(this,5)');
	
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onmouseover',('javascript:void(this.style.cursor="pointer");'));
	else
		img.onmouseover = Function('enableRow(this.style.cursor="pointer")');
	td.appendChild(img);
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.colSpan = 3;
	td.style.textDecoration = 'underline';
	td.style.fontWeight = 'bold';
	td.innerHTML = 'Product characteristics';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	//Blank row
	tr = document.createElement('tr');
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.colSpan = 4;
	td.className = strBodyClassMiddle;
	td.style.height = '10px';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	// Raw Material - Row 6
	tr = document.createElement('tr');
	tr.id = 'Row6';
	
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	
	var img = document.createElement('img');
	img.src = '/Survey/Images/closed-menu.gif';
	img.id = 'ImgRow6';
	img.alt = 'Expand Section';
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onclick',('javascript:void(enableRow(this,6));'));
	else
		img.onclick = Function('enableRow(this,6)');
	
	if (navigator.appName.indexOf('Netscape') != -1)
		img.setAttribute('onmouseover',('javascript:void(this.style.cursor="pointer");'));
	else
		img.onmouseover = Function('enableRow(this.style.cursor="pointer")');
	td.appendChild(img);
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.className = strBodyClassMiddle;
	td.colSpan = 3;
	td.style.textDecoration = 'underline';
	td.style.fontWeight = 'bold';
	td.innerHTML = 'Raw material and component characteristics';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	
	//blank row
	tr = document.createElement('tr');
	td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);

	td = document.createElement('td');
	td.colSpan = 4;
	td.className = strBodyClassMiddle;
	td.style.height = '10px';
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	filterTable.appendChild(tr);

	filterTable.appendChild(createButtonRow());
	
	//last blank row
	tr = document.createElement('tr');
	tr.id = 'LastFilterRow';
	td = document.createElement('td');
	td.colSpan = 6;
	td.className = strFooterClass;
	tr.appendChild(td);
	filterTable.appendChild(tr);
	blnAdvancedQuery = true;
}

function createButtonRow()
{
	//button row
	var tr = document.createElement('tr');
	tr.id = 'ButtonRow';
	
	var td = document.createElement('td');
	td.className = strBodyClassLeft;
	tr.appendChild(td);
	
	td = document.createElement('td');
	td.colSpan = 4;
	td.style.textAlign = 'center';
	td.className = strBodyClassMiddle;
	
	//Restore Scenario
	var button = document.createElement('input');
	button.type = 'button';
	button.id = 'btnRestore';
	button.value = 'Restore Scenario';
	button.style.fontSize = '8pt';
	button.style.padding = '2px';
	if (navigator.appName.indexOf('Netscape') != -1)
		button.setAttribute('onclick',('javascript:void(checkFilterGroup(););'));
	else
		button.onclick = Function('checkFilterGroup();');
	td.appendChild(button);
	
	var label = document.createElement('label');
	label.innerHTML = '&nbsp;&nbsp;';
	td.appendChild(label);
	
	//Save Scenario
	button = document.createElement('input');
	button.type = 'button';
	button.id = 'btnSave';
	button.value = 'Save Scenario';
	button.style.fontSize = '8pt';
	button.style.padding = '2px';
	if (navigator.appName.indexOf('Netscape') != -1)
		button.setAttribute('onclick',('javascript:void(saveFilters("Save"));'));
	else
		button.onclick = Function('saveFilters("Save");');
	td.appendChild(button);
	
	// Save as New Scenario
	var ddl = document.getElementById('ddlFilterGroup');
	var chk = document.getElementById('DeleteGroup');
	if ((ddl && ddl.options[ddl.selectedIndex].value != -1) && (chk && !chk.checked))
	{
		label = document.createElement('label');
		label.innerHTML = '&nbsp;&nbsp;';
		td.appendChild(label);
		
		button = document.createElement('input');
		button.type = 'button';
		button.id = 'btnSaveNew';
		button.value = 'Save as New Scenario';
		button.style.fontSize = '8pt';
		button.style.padding = '2px';
		if (navigator.appName.indexOf('Netscape') != -1)
			button.setAttribute('onclick',('javascript:void(saveFilters("SaveAs"););'));
		else
			button.onclick = Function('saveFilters("SaveAs");');
		td.appendChild(button);
	}
	
	label = document.createElement('label');
	label.innerHTML = '&nbsp;&nbsp;';
	td.appendChild(label);
	
	// Query
	button = document.createElement('input');
	button.type = 'button';
	button.id = 'btnQuery';
	button.value = 'Query';
	button.style.fontSize = '8pt';
	button.style.padding = '2px';
	button.style.paddingLeft = '4px';
	button.style.paddingRight = '4px';
	if (navigator.appName.indexOf('Netscape') != -1)
		button.setAttribute('onclick',('javascript:void(reQuery());'));
	else
		button.onclick = Function('reQuery();');
	td.appendChild(button);
	tr.appendChild(td);

	td = document.createElement('td');
	td.className = strBodyClassRight;
	tr.appendChild(td);
	
	return tr;
}

function addButtonRow()
{
	var tr = document.getElementById('LastFilterRow');
	var table = document.getElementById('FilterTable');
	
	if (navigator.appName.indexOf('Netscape') != -1)
	{
		if (table.firstChild.nextSibling)
			table.firstChild.nextSibling.insertBefore(createButtonRow(),tr);
		else
			table.firstChild.insertBefore(createButtonRow(),tr);
	}
	else
	{
		tr.previousSibling.insertBefore(createButtonRow());
	}
}

function removeButtonRow()
{
	var tr = document.getElementById('ButtonRow');
	var table = document.getElementById('FilterTable');
	
	if (navigator.appName.indexOf('Netscape') != -1)
	{
		if (table.firstChild.nextSibling)
			table.firstChild.nextSibling.removeChild(tr);
		else
			table.firstChild.removeChild(tr);
	}
	else
	{
		for (var i=table.rows.length; i>=0; i--)
		{
			if (table.rows[i] && table.rows[i].id && table.rows[i].id == 'ButtonRow')
			{
				table.deleteRow(i);
				break;
			}
		}
	}
}

function hideFilters()
{
	//change the filter link
	var lnkFilter = document.getElementById('FilterLink')
	lnkFilter.innerHTML = 'Modify Filters';
	lnkFilter.href = 'javascript:showFilters()';
	
	blnAdvancedQuery = false;
	
	
	var filterTable = document.getElementById('FilterTable');

	if (navigator.appName.indexOf('Netscape') != -1)
	{
		while(filterTable.firstChild)
			filterTable.removeChild(filterTable.firstChild);
	}
	else
	{
		for (var i=filterTable.rows.length-1; i>=0; i--)
			filterTable.deleteRow(i);
	}
}

function enableRow(img,intRowNumber)
{
	//replace the expand/collapse image
	if (arrGroups[intRowNumber])
	{
		img.src = '/Survey/Images/closed-menu.gif';
		img.alt = 'Expand Section';
		arrGroups[intRowNumber] = false;
	}
	else
	{
		img.src = '/Survey/Images/open-menu.gif';
		img.alt = 'Collapse Section';
		arrGroups[intRowNumber] = true;
	}
		
	switch (intRowNumber)
	{
		case 1:
			if (document.getElementById('Row1_1'))
				deleteGroup(1,5);
			else
				addGroup1();
			break;
		case 2:
			if (document.getElementById('Row2_1'))
				deleteGroup(2,2);
			else
				addGroup2();
			break;
		case 3:
			if (document.getElementById('Row3_1'))
				deleteGroup(3,3);
			else
				addGroup3();
			break;
		case 4:
			if (document.getElementById('Row4_1'))
				deleteGroup(4,5);
			else
				addGroup4();
			break;
		case 5:
			if (document.getElementById('Row5_1'))
				deleteGroup(5,6);
			else
				addGroup5();
			break;
		case 6:
			if (document.getElementById('Row6_1'))
				deleteGroup(6,6);
			else
				addGroup6();
			break;
		default:
			break;
	}
}

function addGroup1()
{
	
	if (!document.getElementById('Row1_1'))
	{
		var row = document.getElementById('Row1');
		var tbody = row.parentNode;
		
		//Row 1_1 Company Group (added 11.19.2008)
		var tr = document.createElement('tr');
		tr.id = 'Row1_1';
		
		//Left Cell
		var td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk26';
		chk.id = 'chk26';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableCompanyGroup(this,"CompanyGroup"));'));
		else
			chk.onclick = Function('enableCompanyGroup(this,"CompanyGroup")');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Company Group';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Match to group in list';
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var ddl = document.createElement('select');
		ddl.name = 'CompanyGroup';
		ddl.id = 'CompanyGroup';
		ddl.style.fontSize = '8pt';
		
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('javascript:void(setValue(26,1,this.value));'));
		else
			ddl.onchange = Function('setValue(26,1,this.value);');
			
		ddl.options[0] = new Option('Please Select','');
		
		var blnPrivate = false;
		var blnPublic = false;
		var intIndex = 0;
		for (var i=0; i<intCompanyGroupCount; i++)
		{
			if (arrCompanyGroups[i][2] && !blnPrivate)
			{
				ddl.options[ddl.length] = new Option(' ','');
				ddl.options[ddl.length] = new Option('--- Private Groups ---','');
				blnPrivate = true;
				intIndex += 2;
			}

			if (!arrCompanyGroups[i][2] && !blnPublic)
			{
				ddl.options[ddl.length] = new Option(' ','');
				ddl.options[ddl.length] = new Option('--- Public Groups ---','');
				blnPublic = true;
				intIndex += 2;
			}

			ddl.options[ddl.length] = new Option(arrCompanyGroups[i][1],arrCompanyGroups[i][0]);
			intIndex++;
			
			if (arrCompanyGroups[i][0] == arrFilters[26][1])
				ddl.selectedIndex = intIndex;
		}
		td.appendChild(ddl);
		tr.appendChild(td);

		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			document.getElementById('Row1').insertBefore(tr);
		
		//Row 1_2
		var tr = document.createElement('tr');
		tr.id = 'Row1_2';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk1';
		chk.id = 'chk1';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableCompanySize(this,"CompanySize"));'));
		else
			chk.onclick = Function('enableCompanySize(this,"CompanySize")');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Company Size';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Annual revenue in dollars';
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'CompanySize';
		txt.id = 'CompanySize';
		txt.size = 13;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('javascript:void(this.value=convertToCommaInt(this.value); setValue(1,1,this.value););'));
		else
			txt.onchange = Function('this.value=convertToCommaInt(this.value); setValue(1,1,this.value);');
		//set the value
		if (arrFilters[1][1])
			txt.value = convertToCommaInt('' + arrFilters[1][1]);
		td.appendChild(txt);
		
		var img = document.createElement('img');
		img.src = '/Survey/Images/info16.gif';
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseover',('javascript:void(showToolTip(1));'));
		else
			img.onmouseover = Function('showToolTip(1)');
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseout',('javascript:void(hideToolTip(1));'));
		else
			img.onmouseout = Function('hideToolTip(1)');
		if (navigator.appName.indexOf('Netscape') == -1)
			img.onmousemove = Function('javascript:void(setMouse());');
		td.appendChild(img);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From $0 to $100B)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			document.getElementById('Row1').insertBefore(tr);
		
		//Row1_3
		tr = document.createElement('tr');
		tr.id = 'Row1_3';
		
		//Left cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk2';
		chk.id = 'chk2';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableIndustrySegment(this,"industry"));'));
		else
			chk.onclick = Function('enableIndustrySegment(this,"industry")');
		td.appendChild(chk);
		tr.appendChild(td);						
		
		//Filter cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Industry';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Match to industry in list';
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var ddl = document.createElement('select');
		ddl.name = 'industry';
		ddl.id = 'industry';
		ddl.style.fontSize = '8pt';
		
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('javascript:void(setValue(2,1,this.value));'));
		else
			ddl.onchange = Function('setValue(2,1,this.value);');
			
		ddl.options[0] = new Option('Please Select','');
		for (var i=0; i<intIndustryCount; i++)
		{
			ddl.options[ddl.length] = new Option(arrIndustries[i][1],arrIndustries[i][0]);
			if (arrIndustries[i][0] == arrFilters[2][1])
				ddl.selectedIndex = i+1;
		}
		td.appendChild(ddl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling.nextSibling);
		else
			document.getElementById('Row1').insertBefore(tr);
		
		//Row 1_4
		tr = document.createElement('tr');
		tr.id = 'Row1_4';
		
		//Left cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk3';
		chk.id = 'chk3';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableIndustrySegment(this,"segment"));'));
		else
			chk.onclick = Function('enableIndustrySegment(this,"segment")');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Segment';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Match to industry in list';
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'segment';
		ddl.id = 'segment';
		ddl.style.fontSize = '8pt';

		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(3,1,this.value);'));
		else
			ddl.onchange = Function('setValue(3,1,this.value);');
			
		ddl.options[0] = new Option('Please Select','');
		for (var i=0; i<intSegmentCount; i++)
		{
			ddl.options[ddl.length] = new Option(arrSegments[i][2],arrSegments[i][0]);
			if (arrSegments[i][0] == arrFilters[3][1])
				ddl.selectedIndex = i+1;
		}

		td.appendChild(ddl);					
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling.nextSibling.nextSibling);
		else
			document.getElementById('Row1').insertBefore(tr);
		
		//Row 1_5
		tr = document.createElement('tr');
		tr.id = 'Row1_5';
		
		//Left cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.verticalAlign = 'top';
		chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk27';
		chk.id = 'chk27';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableConsortia(this));'));
		else
			chk.onclick = Function('enableConsortia(this)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Consortia';
		td.style.verticalAlign = 'top';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Match to consortia in list';
		td.style.verticalAlign = 'top';
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		
		var tbl1 = document.createElement('table');
		var tby1 = document.createElement('tbody');
		
		for (var i=0; i<intConsortiaCount; i++)
		{
			var tr1 = document.createElement('tr');
			var td1 = document.createElement('td');
			var chk1 = document.createElement('input');
			var lbl1 = document.createElement('label');
			
			chk1.type = 'checkbox';
			chk1.name = 'consortia';
			chk1.id = 'consortia_' + i;
			chk1.value = arrConsortia[i][0];

			if (navigator.appName.indexOf('Netscape') != -1)
				chk1.setAttribute('onclick',('javascript:void(updateConsortia());'));
			else
				chk1.onclick = Function('updateConsortia();');
				
				
			lbl1.htmlFor = 'consortia_' + i;
			lbl1.innerHTML = '&nbsp;' + arrConsortia[i][1];
			
			td1.appendChild(chk1);
			td1.appendChild(lbl1);
			tr1.appendChild(td1);
			tby1.appendChild(tr1);
		}
		tbl1.appendChild(tby1);
		td.appendChild(tbl1);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling.nextSibling.nextSibling);
		else
			document.getElementById('Row1').insertBefore(tr);
		
		setCompanySize(document.getElementById('chk1'),'CompanySize');
		setCompanyGroup(document.getElementById('chk26'),'CompanyGroup');
		setIndustrySegment(document.getElementById('chk2'),'industry');
		setIndustrySegment(document.getElementById('chk3'),'segment');
		setConsortia(document.getElementById('chk27'));
	}
}

function addGroup2()
{
	
	if (!document.getElementById('Row2_1'))
	{
		var row = document.getElementById('Row2');
		var tbody = row.parentNode;
		
		//Row 2_1
		var tr = document.createElement('tr');
		tr.id = 'Row2_1';
		
		//Left Cell
		var td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk4';
		chk.id = 'chk4';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl4","txt4",4));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl4","txt4",4)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Commercial Sales';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl4';
		ddl.id = 'ddl4';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Direct','1');
		ddl.options[2] = new Option('Catalog','2');
		ddl.options[3] = new Option('Internet','3');
		//set the value
		if (arrFilters[4][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[4][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(4,0,this.value);'));
		else
			ddl.onchange = Function('setValue(4,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt4';
		txt.id = 'txt4';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(4,1,this.value);'));
		else
			txt.onchange = Function('setValue(4,1,this.value);');
		//set the value
		if (arrFilters[4][1])
			txt.value = convertToCommaInt('' + arrFilters[4][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of total sales from 0% to 100%)';
		td.appendChild(lbl);
		
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);

		//Row 2_2
		var tr = document.createElement('tr');
		tr.id = 'Row2_2';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk5';
		chk.id = 'chk5';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl5","txt5",5));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl5","txt5",5)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Consumer Sales';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl5';
		ddl.id = 'ddl5';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Retail stores','1');
		ddl.options[2] = new Option('Catalog','2');
		ddl.options[3] = new Option('Internet','3');
		//set the value
		if (arrFilters[5][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[5][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(5,0,this.value);'));
		else
			ddl.onchange = Function('setValue(5,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt5';
		txt.id = 'txt5';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(5,1,this.value);'));
		else
			txt.onchange = Function('setValue(5,1,this.value);');
		//set the value
		if (arrFilters[5][1])
			txt.value = convertToCommaInt('' + arrFilters[5][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of total sales from 0% to 100%)';
		td.appendChild(lbl);
		
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);

		setFilter(document.getElementById('chk4'),'ddl4','txt4',4);
		setFilter(document.getElementById('chk5'),'ddl5','txt5',5);
	}
}

function addGroup3()
{
	
	if (!document.getElementById('Row3_1'))
	{
		var row = document.getElementById('Row3');
		var tbody = row.parentNode;
		
		//Row 3_1
		var tr = document.createElement('tr');
		tr.id = 'Row3_1';
		
		//Left Cell
		var td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk6';
		chk.id = 'chk6';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl6","txt6",6));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl6","txt6",6)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Transportation';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl6';
		ddl.id = 'ddl6';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Truckload freight','1');
		ddl.options[2] = new Option('Less than truckload freight','2');
		ddl.options[3] = new Option('Dedicated fleets','3');
		ddl.options[4] = new Option('Ocean freight','4');
		ddl.options[5] = new Option('Rail intermodal','5');
		ddl.options[6] = new Option('Rail (other than intermodal)','6');
		ddl.options[7] = new Option('Air freight','7');
		ddl.options[8] = new Option('Parcel freight','8');
		ddl.options[9] = new Option('Expedited freight','9');
		ddl.options[10] = new Option('Total transportation','10');
		//set the value
		if (arrFilters[6][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[6][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(6,0,this.value);'));
		else
			ddl.onchange = Function('setValue(6,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt6';
		txt.id = 'txt6';
		txt.size = 13;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('javascript:void(this.value=convertToCommaInt(this.value)); setValue(6,1,this.value);'));
		else
			txt.onchange = Function('this.value=convertToCommaInt(this.value); setValue(6,1,this.value);');
		//set the value
		if (arrFilters[6][1])
			txt.value = convertToCommaInt('' + arrFilters[6][1]);
		td.appendChild(txt);
		
		var img = document.createElement('img');
		img.src = '/Survey/Images/info16.gif';
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseover',('javascript:void(showToolTip(1));'));
		else
			img.onmouseover = Function('showToolTip(1)');
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseout',('javascript:void(hideToolTip(1));'));
		else
			img.onmouseout = Function('hideToolTip(1)');
		if (navigator.appName.indexOf('Netscape') == -1)
			img.onmousemove = Function('javascript:void(setMouse());');
		td.appendChild(img);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From $0 to $100B)';

		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 3_2
		var tr = document.createElement('tr');
		tr.id = 'Row3_2';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk7';
		chk.id = 'chk7';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl7","txt7",7));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl7","txt7",7)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Distribution operations';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl7';
		ddl.id = 'ddl7';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Distribution center operations','1');
		ddl.options[2] = new Option('Inbound consolidation','2');
		ddl.options[3] = new Option('Outbound pool distribution','3');
		ddl.options[4] = new Option('Total distribution','4');
		//set the value
		if (arrFilters[7][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[7][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(7,0,this.value);'));
		else
			ddl.onchange = Function('setValue(7,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt7';
		txt.id = 'txt7';
		txt.size = 13;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('javascript:void(this.value=convertToCommaInt(this.value)); setValue(7,1,this.value);'));
		else
			txt.onchange = Function('this.value=convertToCommaInt(this.value); setValue(7,1,this.value);');
		//set the value
		if (arrFilters[7][1])
			txt.value = convertToCommaInt('' + arrFilters[7][1]);
		td.appendChild(txt);
		
		var img = document.createElement('img');
		img.src = '/Survey/Images/info16.gif';
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseover',('javascript:void(showToolTip(1));'));
		else
			img.onmouseover = Function('showToolTip(1)');
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseout',('javascript:void(hideToolTip(1));'));
		else
			img.onmouseout = Function('hideToolTip(1)');
		if (navigator.appName.indexOf('Netscape') == -1)
			img.onmousemove = Function('javascript:void(setMouse());');
		td.appendChild(img);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From $0 to $100B)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);

		//Row 3_3
		var tr = document.createElement('tr');
		tr.id = 'Row3_3';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk8';
		chk.id = 'chk8';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl8","txt8",8));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl8","txt8",8)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Overhead and other';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl8';
		ddl.id = 'ddl8';
		ddl.style.width = '185px';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Third party logistics management fees','1');
		ddl.options[2] = new Option('Freight audit services','2');
		ddl.options[3] = new Option('Supply chain staff','3');
		ddl.options[4] = new Option('Other supply chain expenses','4');
		ddl.options[5] = new Option('Total overhead','5');
		//set the value
		if (arrFilters[8][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[8][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(8,0,this.value);'));
		else
			ddl.onchange = Function('setValue(8,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt8';
		txt.id = 'txt8';
		txt.size = 13;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('javascript:void(this.value=convertToCommaInt(this.value)); setValue(8,1,this.value);'));
		else
			txt.onchange = Function('this.value=convertToCommaInt(this.value); setValue(8,1,this.value);');
		//set the value
		if (arrFilters[8][1])
			txt.value = convertToCommaInt('' + arrFilters[8][1]);
		td.appendChild(txt);
		
		var img = document.createElement('img');
		img.src = '/Survey/Images/info16.gif';
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseover',('javascript:void(showToolTip(1));'));
		else
			img.onmouseover = Function('showToolTip(1)');
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseout',('javascript:void(hideToolTip(1));'));
		else
			img.onmouseout = Function('hideToolTip(1)');
		if (navigator.appName.indexOf('Netscape') == -1)
			img.onmousemove = Function('javascript:void(setMouse());');
		td.appendChild(img);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From $0 to $100B)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);

		setFilter(document.getElementById('chk6'),'ddl6','txt6',6);
		setFilter(document.getElementById('chk7'),'ddl7','txt7',7);
		setFilter(document.getElementById('chk8'),'ddl8','txt8',8);
	}
}

function addGroup4()
{
	if (!document.getElementById('Row4_1'))
	{
		var row = document.getElementById('Row4');
		var tbody = row.parentNode;
		
		//Row 4_1
		var tr = document.createElement('tr');
		tr.id = 'Row4_1';
		
		//Left Cell
		var td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk9';
		chk.id = 'chk9';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl9","txt9",9));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl9","txt9",9)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Distribution centers';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl9';
		ddl.id = 'ddl9';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Master distribution centers','1');
		ddl.options[2] = new Option('Regional distribution centers','2');
		ddl.options[3] = new Option('Total distribution centers','3');
		//set the value
		if (arrFilters[9][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[9][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(9,0,this.value);'));
		else
			ddl.onchange = Function('setValue(9,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt9';
		txt.id = 'txt9';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(9,1,this.value);'));
		else
			txt.onchange = Function('setValue(9,1,this.value);');
		//set the value
		if (arrFilters[9][1])
			txt.value = convertToCommaInt('' + arrFilters[9][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From 1 to 1,000)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 4_2
		var tr = document.createElement('tr');
		tr.id = 'Row4_2';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk10';
		chk.id = 'chk10';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl10","txt10",10));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl10","txt10",10)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Manufacturing plants';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl10';
		ddl.id = 'ddl10';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Product manufacturing plants','1');
		ddl.options[2] = new Option('Component manufacturing plants','2');
		ddl.options[3] = new Option('Total manufacturing plants','3');
		//set the value
		if (arrFilters[10][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[10][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(10,0,this.value);'));
		else
			ddl.onchange = Function('setValue(10,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt10';
		txt.id = 'txt10';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(10,1,this.value);'));
		else
			txt.onchange = Function('setValue(10,1,this.value);');
		//set the value
		if (arrFilters[10][1])
			txt.value = convertToCommaInt('' + arrFilters[10][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From 1 to 1,000)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 4_3
		var tr = document.createElement('tr');
		tr.id = 'Row4_3';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk11';
		chk.id = 'chk11';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl11","txt11",11));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl11","txt11",11)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Purchases from';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl11';
		ddl.id = 'ddl11';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('North America','1');
		ddl.options[2] = new Option('North America (non-US)','2');
		ddl.options[3] = new Option('China/Hong Kong','3');
		ddl.options[4] = new Option('Pacific Rim (other)','4');
		ddl.options[5] = new Option('Western Europe','5');
		ddl.options[6] = new Option('Eastern Europe','6');
		ddl.options[7] = new Option('South/Central America','7');
		ddl.options[8] = new Option('Other (Middle East, Africa, etc.)','8');
		//set the value
		if (arrFilters[11][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[11][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(11,0,this.value);'));
		else
			ddl.onchange = Function('setValue(11,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt11';
		txt.id = 'txt11';
		txt.size = 13;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('this.value=convertToCommaInt(this.value); setValue(11,1,this.value);'));
		else
			txt.onchange = Function('this.value=convertToCommaInt(this.value); setValue(11,1,this.value);');
		//set the value
		if (arrFilters[11][1])
			txt.value = convertToCommaInt('' + arrFilters[11][1]);
		td.appendChild(txt);
		
		var img = document.createElement('img');
		img.src = '/Survey/Images/info16.gif';
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseover',('javascript:void(showToolTip(1));'));
		else
			img.onmouseover = Function('showToolTip(1)');
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseout',('javascript:void(hideToolTip(1));'));
		else
			img.onmouseout = Function('hideToolTip(1)');
		if (navigator.appName.indexOf('Netscape') == -1)
			img.onmousemove = Function('javascript:void(setMouse());');
		td.appendChild(img);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From $0 to $100B)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 4_4
		var tr = document.createElement('tr');
		tr.id = 'Row4_4';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk12';
		chk.id = 'chk12';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl12","txt12",12));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl12","txt12",12)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Sales to';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl12';
		ddl.id = 'ddl12';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('North America','1');
		ddl.options[2] = new Option('North America (non-US)','2');
		ddl.options[3] = new Option('China/Hong Kong','3');
		ddl.options[4] = new Option('Pacific Rim (other)','4');
		ddl.options[5] = new Option('Western Europe','5');
		ddl.options[6] = new Option('Eastern Europe','6');
		ddl.options[7] = new Option('South/Central America','7');
		ddl.options[8] = new Option('Other (Middle East, Africa, etc.)','8');
		//set the value
		if (arrFilters[12][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[12][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(12,0,this.value);'));
		else
			ddl.onchange = Function('setValue(12,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt12';
		txt.id = 'txt12';
		txt.size = 13;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('this.value=convertToCommaInt(this.value); setValue(12,1,this.value);'));
		else
			txt.onchange = Function('this.value=convertToCommaInt(this.value); setValue(12,1,this.value);');
		//set the value
		if (arrFilters[12][1])
			txt.value = convertToCommaInt('' + arrFilters[12][1]);
		td.appendChild(txt);
		
		var img = document.createElement('img');
		img.src = '/Survey/Images/info16.gif';
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseover',('javascript:void(showToolTip(1));'));
		else
			img.onmouseover = Function('showToolTip(1)');
		if (navigator.appName.indexOf('Netscape') != -1)
			img.setAttribute('onmouseout',('javascript:void(hideToolTip(1));'));
		else
			img.onmouseout = Function('hideToolTip(1)');
		if (navigator.appName.indexOf('Netscape') == -1)
			img.onmousemove = Function('javascript:void(setMouse());');
		td.appendChild(img);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(From $0 to $100B)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 4_5
		var tr = document.createElement('tr');
		tr.id = 'Row4_5';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk13';
		chk.id = 'chk13';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl13","txt13",13));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl13","txt13",13)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Product manufacturing';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl13';
		ddl.id = 'ddl13';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Manufactured internally','1');
		ddl.options[2] = new Option('Manufactured under contract','2');
		ddl.options[3] = new Option('Manufactured by others','3');
		//set the value
		if (arrFilters[13][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[13][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(13,0,this.value);'));
		else
			ddl.onchange = Function('setValue(13,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt13';
		txt.id = 'txt13';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(13,1,this.value);'));
		else
			txt.onchange = Function('setValue(13,1,this.value);');
		//set the value
		if (arrFilters[13][1])
			txt.value = convertToCommaInt('' + arrFilters[13][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of total sales from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		setFilter(document.getElementById('chk9'),'ddl9','txt9',9);
		setFilter(document.getElementById('chk10'),'ddl10','txt10',10);
		setFilter(document.getElementById('chk11'),'ddl11','txt11',11);
		setFilter(document.getElementById('chk12'),'ddl12','txt12',12);
		setFilter(document.getElementById('chk13'),'ddl13','txt13',13);
	}
}

function addGroup5()
{
	if (!document.getElementById('Row5_1'))
	{
		var row = document.getElementById('Row5');
		var tbody = row.parentNode;
		
		//Row 5_1
		var tr = document.createElement('tr');
		tr.id = 'Row5_1';
		
		//Left Cell
		var td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk14';
		chk.id = 'chk14';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl14","txt14",14));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl14","txt14",14)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Value';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl14';
		ddl.id = 'ddl14';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('High value','1');
		ddl.options[2] = new Option('Medium value','2');
		ddl.options[3] = new Option('Low value','3');
		//set the value
		if (arrFilters[14][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[14][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(14,0,this.value);'));
		else
			ddl.onchange = Function('setValue(14,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt14';
		txt.id = 'txt14';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(14,1,this.value);'));
		else
			txt.onchange = Function('setValue(14,1,this.value);');
		//set the value
		if (arrFilters[14][1])
			txt.value = convertToCommaInt('' + arrFilters[14][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of outbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 5_2
		var tr = document.createElement('tr');
		tr.id = 'Row5_2';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk15';
		chk.id = 'chk15';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl15","txt15",15));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl15","txt15",15)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Weight';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl15';
		ddl.id = 'ddl15';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Heavy/dense','1');
		ddl.options[2] = new Option('Medium dense','2');
		ddl.options[3] = new Option('Light/not dense','3');
		//set the value
		if (arrFilters[15][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[15][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(15,0,this.value);'));
		else
			ddl.onchange = Function('setValue(15,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt15';
		txt.id = 'txt15';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(15,1,this.value);'));
		else
			txt.onchange = Function('setValue(15,1,this.value);');
		//set the value
		if (arrFilters[15][1])
			txt.value = convertToCommaInt('' + arrFilters[15][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of outbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 5_3
		var tr = document.createElement('tr');
		tr.id = 'Row5_3';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk16';
		chk.id = 'chk16';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl16","txt16",16));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl16","txt16",16)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Size';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl16';
		ddl.id = 'ddl16';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Large boxes or pieces','1');
		ddl.options[2] = new Option('Medium boxes or pieces','2');
		ddl.options[3] = new Option('Small boxes or pieces','3');
		//set the value
		if (arrFilters[16][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[16][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(16,0,this.value);'));
		else
			ddl.onchange = Function('setValue(16,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt16';
		txt.id = 'txt16';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(16,1,this.value);'));
		else
			txt.onchange = Function('setValue(16,1,this.value);');
		//set the value
		if (arrFilters[16][1])
			txt.value = convertToCommaInt('' + arrFilters[16][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of outbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 5_4
		var tr = document.createElement('tr');
		tr.id = 'Row5_4';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk17';
		chk.id = 'chk17';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl17","txt17",17));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl17","txt17",17)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Physical characteristics';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl17';
		ddl.id = 'ddl17';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Cartons or cases','1');
		ddl.options[2] = new Option('Loose pieces/irregular shapes','2');
		ddl.options[3] = new Option('Bulk - fluid','3');
		ddl.options[4] = new Option('Bulk - dry','4');
		ddl.options[5] = new Option('Garment on hanger (GOH)','5');
		ddl.options[6] = new Option('Flat sheets','6');
		ddl.options[7] = new Option('Rolls','7');
		//set the value
		if (arrFilters[17][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[17][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(17,0,this.value);'));
		else
			ddl.onchange = Function('setValue(17,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt17';
		txt.id = 'txt17';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(17,1,this.value);'));
		else
			txt.onchange = Function('setValue(17,1,this.value);');
		//set the value
		if (arrFilters[17][1])
			txt.value = convertToCommaInt('' + arrFilters[17][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of outbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 5_5
		var tr = document.createElement('tr');
		tr.id = 'Row5_5';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk18';
		chk.id = 'chk18';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl18","txt18",18));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl18","txt18",18)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.noWrap = true;
		td.innerHTML = 'Temperature requirements';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl18';
		ddl.id = 'ddl18';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Frozen','1');
		ddl.options[2] = new Option('Refrigerated','2');
		ddl.options[3] = new Option('Not temperature controlled','3');
		//set the value
		if (arrFilters[18][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[18][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(18,0,this.value);'));
		else
			ddl.onchange = Function('setValue(18,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt18';
		txt.id = 'txt18';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(18,1,this.value);'));
		else
			txt.onchange = Function('setValue(18,1,this.value);');
		//set the value
		if (arrFilters[18][1])
			txt.value = convertToCommaInt('' + arrFilters[18][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of outbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 5_6
		var tr = document.createElement('tr');
		tr.id = 'Row5_6';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk19';
		chk.id = 'chk19';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl19","txt19",19));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl19","txt19",19)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Special handling';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl19';
		ddl.id = 'ddl19';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Fragile','1');
		ddl.options[2] = new Option('Perishable - short shelf life','2');
		ddl.options[3] = new Option('Perishable - long shelf life','3');
		ddl.options[4] = new Option('Lot control','4');
		//set the value
		if (arrFilters[19][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[19][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(19,0,this.value);'));
		else
			ddl.onchange = Function('setValue(19,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.noWrap = true;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt19';
		txt.id = 'txt19';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(19,1,this.value);'));
		else
			txt.onchange = Function('setValue(19,1,this.value);');
		//set the value
		if (arrFilters[19][1])
			txt.value = convertToCommaInt('' + arrFilters[19][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of outbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		setFilter(document.getElementById('chk14'),'ddl14','txt14',14);
		setFilter(document.getElementById('chk15'),'ddl15','txt15',15);
		setFilter(document.getElementById('chk16'),'ddl16','txt16',16);
		setFilter(document.getElementById('chk17'),'ddl17','txt17',17);
		setFilter(document.getElementById('chk18'),'ddl18','txt18',18);
		setFilter(document.getElementById('chk19'),'ddl19','txt19',19);
	}
}

function addGroup6()
{
	if (!document.getElementById('Row6_1'))
	{
		var row = document.getElementById('Row6');
		var tbody = row.parentNode;
		
		//Row 6_1
		var tr = document.createElement('tr');
		tr.id = 'Row6_1';
		
		//Left Cell
		var td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk20';
		chk.id = 'chk20';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl20","txt20",20));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl20","txt20",20)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Value';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl20';
		ddl.id = 'ddl20';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('High value','1');
		ddl.options[2] = new Option('Medium value','2');
		ddl.options[3] = new Option('Low value','3');
		//set the value
		if (arrFilters[20][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[20][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(20,0,this.value);'));
		else
			ddl.onchange = Function('setValue(20,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt20';
		txt.id = 'txt20';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(20,1,this.value);'));
		else
			txt.onchange = Function('setValue(20,1,this.value);');
		//set the value
		if (arrFilters[20][1])
			txt.value = convertToCommaInt('' + arrFilters[20][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of inbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 6_2
		var tr = document.createElement('tr');
		tr.id = 'Row6_2';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk21';
		chk.id = 'chk21';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl21","txt21",21));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl21","txt21",21)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Weight';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl21';
		ddl.id = 'ddl21';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Heavy/dense','1');
		ddl.options[2] = new Option('Medium dense','2');
		ddl.options[3] = new Option('Light/not dense','3');
		//set the value
		if (arrFilters[21][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[21][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(21,0,this.value);'));
		else
			ddl.onchange = Function('setValue(21,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt21';
		txt.id = 'txt21';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(21,1,this.value);'));
		else
			txt.onchange = Function('setValue(21,1,this.value);');
		//set the value
		if (arrFilters[21][1])
			txt.value = convertToCommaInt('' + arrFilters[21][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of inbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 6_3
		var tr = document.createElement('tr');
		tr.id = 'Row6_3';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk22';
		chk.id = 'chk22';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl22","txt22",22));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl22","txt22",22)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Size';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl22';
		ddl.id = 'ddl22';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Large boxes or pieces','1');
		ddl.options[2] = new Option('Medium boxes or pieces','2');
		ddl.options[3] = new Option('Small boxes or pieces','3');
		//set the value
		if (arrFilters[22][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[22][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(22,0,this.value);'));
		else
			ddl.onchange = Function('setValue(22,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt22';
		txt.id = 'txt22';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(22,1,this.value);'));
		else
			txt.onchange = Function('setValue(22,1,this.value);');
		//set the value
		if (arrFilters[22][1])
			txt.value = convertToCommaInt('' + arrFilters[22][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of inbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 6_4
		var tr = document.createElement('tr');
		tr.id = 'Row6_4';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk23';
		chk.id = 'chk23';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl23","txt23",23));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl23","txt23",23)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Physical characteristics';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl23';
		ddl.id = 'ddl23';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Cartons or cases','1');
		ddl.options[2] = new Option('Loose pieces/irregular shapes','2');
		ddl.options[3] = new Option('Bulk - fluid','3');
		ddl.options[4] = new Option('Bulk - dry','4');
		ddl.options[5] = new Option('Garment on hanger (GOH)','5');
		ddl.options[6] = new Option('Flat sheets','6');
		ddl.options[7] = new Option('Rolls','7');
		//set the value
		if (arrFilters[23][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[23][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(23,0,this.value);'));
		else
			ddl.onchange = Function('setValue(23,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt23';
		txt.id = 'txt23';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(23,1,this.value);'));
		else
			txt.onchange = Function('setValue(23,1,this.value);');
		//set the value
		if (arrFilters[23][1])
			txt.value = convertToCommaInt('' + arrFilters[23][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of inbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 6_5
		var tr = document.createElement('tr');
		tr.id = 'Row6_5';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk24';
		chk.id = 'chk24';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl24","txt24",24));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl24","txt24",24)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.noWrap = true;
		td.innerHTML = 'Temperature requirements';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl24';
		ddl.id = 'ddl24';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Frozen','1');
		ddl.options[2] = new Option('Refrigerated','2');
		ddl.options[3] = new Option('Not temperature controlled','3');
		//set the value
		if (arrFilters[24][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[24][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(24,0,this.value);'));
		else
			ddl.onchange = Function('setValue(24,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt24';
		txt.id = 'txt24';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(24,1,this.value);'));
		else
			txt.onchange = Function('setValue(24,1,this.value);');
		//set the value
		if (arrFilters[24][1])
			txt.value = convertToCommaInt('' + arrFilters[24][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of inbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		//Row 6_6
		var tr = document.createElement('tr');
		tr.id = 'Row6_6';
		
		//Left Cell
		td = document.createElement('td');
		td.className = strBodyClassLeft;
		tr.appendChild(td);

		//Check cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		var chk = document.createElement('input');
		chk.type = 'checkbox';
		chk.name = 'chk25';
		chk.id = 'chk25';
		chk.value = 'ON';
		if (navigator.appName.indexOf('Netscape') != -1)
			chk.setAttribute('onclick',('javascript:void(enableFilter(this,"ddl25","txt25",25));'));
		else
			chk.onclick = Function('enableFilter(this,"ddl25","txt25",25)');
		td.appendChild(chk);
		tr.appendChild(td);
		
		//Filter name cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.innerHTML = 'Special handling';
		tr.appendChild(td);
		
		//Evaluation factor cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		ddl = document.createElement('select');
		ddl.name = 'ddl25';
		ddl.id = 'ddl25';
		ddl.style.fontSize = '8pt';
		ddl.options[0] = new Option('Please Select','');
		ddl.options[1] = new Option('Fragile','1');
		ddl.options[2] = new Option('Perishable - short shelf life','2');
		ddl.options[3] = new Option('Perishable - long shelf life','3');
		ddl.options[4] = new Option('Lot control','4');
		//set the value
		if (arrFilters[25][0])
		{
			for (var i=0; i<ddl.length; i++)
			{
				if (ddl.options[i].value == arrFilters[25][0])
				{
					ddl.selectedIndex = i;
					break;
				}
			}
		}
		if (navigator.appName.indexOf('Netscape') != -1)
			ddl.setAttribute('onchange',('setValue(25,0,this.value);'));
		else
			ddl.onchange = Function('setValue(25,0,this.value);');
		td.appendChild(ddl);					
		tr.appendChild(td);
		
		//Value cell
		td = document.createElement('td');
		td.className = strBodyClassMiddle;
		td.noWrap = true;
		td.style.fontSize = '8pt';
		var txt = document.createElement('input');
		txt.type = 'text';
		txt.name = 'txt25';
		txt.id = 'txt25';
		txt.size = 4;
		txt.style.textAlign = 'right';
		if (navigator.appName.indexOf('Netscape') != -1)
			txt.setAttribute('onchange',('setValue(25,1,this.value);'));
		else
			txt.onchange = Function('setValue(25,1,this.value);');
		//set the value
		if (arrFilters[25][1])
			txt.value = convertToCommaInt('' + arrFilters[25][1]);
		td.appendChild(txt);
		
		var lbl = document.createElement('label');
		lbl.style.fontSize = '8pt';
		lbl.innerHTML = '&nbsp;(% of inbound shipments from 0% to 100%)';
		td.appendChild(lbl);
		tr.appendChild(td);
		
		// Right cell		
		td = document.createElement('td');
		td.className = strBodyClassRight;
		tr.appendChild(td);

		// add the row to the table
		if (navigator.appName.indexOf('Netscape') != -1)
			tbody.insertBefore(tr, row.nextSibling);
		else
			row.insertBefore(tr);
		
		setFilter(document.getElementById('chk20'),'ddl20','txt20',20);
		setFilter(document.getElementById('chk21'),'ddl21','txt21',21);
		setFilter(document.getElementById('chk22'),'ddl22','txt22',22);
		setFilter(document.getElementById('chk23'),'ddl23','txt23',23);
		setFilter(document.getElementById('chk24'),'ddl24','txt24',24);
		setFilter(document.getElementById('chk25'),'ddl25','txt25',25);
	}
}

function deleteGroup(intGroup,intRowCount)
{
	var row = document.getElementById('Row' + intGroup + '_1');
	
	if (row)
	{
		row = document.getElementById('Row' + intGroup);
		var tbody = row.parentNode;
		var table = tbody.parentNode;
		
		//remove the other row
		if (navigator.appName.indexOf('Netscape') != -1)
		{
			for (var i=0; i<intRowCount; i++)
				tbody.removeChild(row.nextSibling);
		}
		else
		{
			
			for (var i=table.rows.length-1; i>0; i--)
			{
				for (var j=1; j<=intRowCount; j++)
					if (table.rows[i].id == 'Row' + intGroup + '_' + j)
						table.deleteRow(i);
				//if (table.rows[i].id == 'Row' + intGroup + '_1' || table.rows[i].id == 'Row' + intGroup + '_2' || table.rows[i].id == 'Row' + intGroup + '_3')
				//	table.deleteRow(i);
			}
		}
	}
}

function multiDimensionalArray(name_str, n0, n1, n2, n3)
{
	var numDimens = multiDimensionalArray.arguments.length - 1;
	var code = name_str + " = new Array();";
	eval (code);

	for (var i = 0; i < n0; i++) // first index is 0
	{
		var newName = name_str + "[" + i + "]";      
		if (numDimens > 1)
		{
			code = "multiDimensionalArray ('" + newName + "'";
			for (var j = 2; j <= numDimens; j++)
			code += ", " + multiDimensionalArray.arguments[j];
			code += ");";
			eval (code);
		}
	}  
}

function populateSegments()
{
	var ddlIndustry = document.getElementById('industry');
	var ddlSegment = document.getElementById('segment');
	
	//Get the selected industry id
	var intSelectedIndustry = ddlIndustry.options[ddlIndustry.selectedIndex].value;
	
	emptyList(ddlSegment);
	
	for(var i=0; i<intSegmentCount; i++)
	{
		if (arrSegments[i][1] == intSelectedIndustry)
			ddlSegment.options[ddlSegment.length] = new Option(arrSegments[i][2], arrSegments[i][0]);
	}
}

function emptyList( box )
{
	// Set each option to null thus removing it
	while (box.options.length)
		box.options[0] = null;

	box.options[box.length] = new Option("Please Select", -1);
}

function setCompanySize(chk,txtID)
{
	var txt = document.getElementById(txtID);
	
	if (isText(txt))
		chk.checked = true;
	else
		chk.checked = false;
	
	enableCompanySize(chk,txtID);
}

function enableCompanySize(chk,txtID)
{
	var txt = document.getElementById(txtID);
	
	if (!chk.checked)
	{
		disableTextBox(txt);
		arrFilters[1][1] = null;
	}
	else
		enableTextBox(txt);
}

function setCompanyGroup(chk,txtID)
{
	var ddl = document.getElementById(txtID);

	if (parseInt(ddl.value) > 0)
		chk.checked = true;
	else
		chk.checked = false;
	
	enableCompanyGroup(chk,txtID);
}

function enableCompanyGroup(chk,txtID)
{
	var ddl = document.getElementById(txtID);
	
	if (!chk.checked)
	{
		disableDropDown(ddl);
		arrFilters[26][1] = null;
	}
	else
		enableDropDown(ddl);
}

function enableFilter(chk,ddlID,txtID,intFilterID)
{
	var ddl = document.getElementById(ddlID);
	var txt = document.getElementById(txtID);
	
	if (!chk.checked)
	{
		disableDropDown(ddl);
		disableTextBox(txt);
		arrFilters[intFilterID][0] = null;
		arrFilters[intFilterID][1] = null;
	}
	else
	{
		enableDropDown(ddl);
		enableTextBox(txt);
	}
}

function setFilter(chk,ddlID,txtID,intFilterID)
{
	var ddl = document.getElementById(ddlID);
	var txt = document.getElementById(txtID);
	
	if (ddl.selectedIndex != 0 || isText(txt))
		chk.checked = true;
	else
		chk.checked = false;
		
	enableFilter(chk,ddlID,txtID,intFilterID);
}

function validFilter(chk,ddl,txt,strDescription)
{
	if (chk.checked)
	{
		if (ddl.selectedIndex == 0)
		{
			location.href = "#Question2";
			ddl.focus();
			alert('You must select an evaluation factor for ' + strDescription + '.');
			return false;
		}
		
		if (!isText(txt))
		{
			location.href = "#Question2";
			txt.focus();
			alert('You must enter a value for ' + strDescription + '.');
			return false;
		}
		
		if (!isNumeric(txt))
		{
			location.href = "#Question2";
			txt.select();
			alert('You must enter a numeric value for ' + strDescription + '.');
			return false;
		}
	}
	return true;
}

function clearFilters()
{
	for (var i=1; i<=intTotalFilterCount; i++)
	{
		arrFilters[i][0] = null;
		arrFilters[i][1] = null;
	}
	
	if (document.getElementById('Row1_1'))
		enableRow(document.getElementById('ImgRow1'),1);
		
	if (document.getElementById('Row2_1'))
		enableRow(document.getElementById('ImgRow2'),2);
		
	if (document.getElementById('Row3_1'))
		enableRow(document.getElementById('ImgRow3'),3);
		
	if (document.getElementById('Row4_1'))
		enableRow(document.getElementById('ImgRow4'),4);
		
	if (document.getElementById('Row5_1'))
		enableRow(document.getElementById('ImgRow5'),5);
		
	if (document.getElementById('Row6_1'))
		enableRow(document.getElementById('ImgRow6'),6);
}

function saveFilters(strSaveType)
{
	var ddlFilterGroup = document.getElementById('ddlFilterGroup');
	var chkDeleteGroup = document.getElementById('DeleteGroup');
	
	if (chkDeleteGroup && chkDeleteGroup.checked && !confirm('Are you sure that you want to delete this filter scenario?'))
		return false;
	
	for (var i=1; i<=intTotalFilterCount; i++)
	{
		if (arrFilters[i][0] != null)
			document.getElementById('Filter' + i + '_0').value = arrFilters[i][0];
		
		if (arrFilters[i][1] != null)
			document.getElementById('Filter' + i + '_1').value = arrFilters[i][1];
		
	}
	if (ddlFilterGroup && ddlFilterGroup.value == -1)
	{
		ddlFilterGroup.value = null;
		document.getElementById('SaveAs').value = 'True';
	}
	else
		document.getElementById(strSaveType).value = 'True';
	document.getElementById('form1').action = location.href;
	if (checkQueryFilterForm())
		document.getElementById('form1').submit();
}

function reQuery()
{
	var ddlFilterGroup = document.getElementById('ddlFilterGroup');
	var chkDeleteGroup = document.getElementById('DeleteGroup');
	
	if (chkDeleteGroup.checked && !confirm('Are you sure that you want to delete this filter scenario?'))
		return false;
	
	for (var i=1; i<=intTotalFilterCount; i++)
	{
		if (arrFilters[i][0] != null)
			document.getElementById('Filter' + i + '_0').value = arrFilters[i][0];
		
		if (arrFilters[i][1] != null)
			document.getElementById('Filter' + i + '_1').value = arrFilters[i][1];
		
	}
	document.getElementById('Query').value = 'True';
	document.getElementById('form1').action = location.href;
	if (checkQueryFilterForm())
		document.getElementById('form1').submit();
}

function deleteCheck(chkDelete)
{
	if (!document.getElementById('Row1'))
		showFilters();
	removeButtonRow();
	addButtonRow();
	if (chkDelete.checked)
		document.getElementById('btnSave').value = 'Delete Scenario';
	else
		document.getElementById('btnSave').value = 'Save Scenario';
}

function checkQueryFilterForm()
{
	var ddlFilterGroup = document.getElementById('ddlFilterGroup');
	var txtFilterGroup = document.getElementById('txtFilterGroup');
	var chkDeleteGroup = document.getElementById('DeleteGroup');

	//Filter Group
	if (!isText(txtFilterGroup))
	{
		location.href = "#Question1";
		alert('You must provide a name for this filter group.');
		txtFilterGroup.focus();
		return false;
	}
	
	//Delete Filter Group
	//if (chkDeleteGroup && chkDeleteGroup.checked)
	//{
	//	if (!confirm('Are you sure that you want to delete this filter scenario?'))
	//		return false;
	//}
	
	//Company Size
	if (arrFilters[1][1] != null)
	{
		if (!isIntegerString('' + arrFilters[1][1]))
		{
			if (!document.getElementById('Row1_1'))
				enableRow(document.getElementById('ImgRow1'),1);
			location.href = "#Question2";
			document.getElementById('CompanySize').focus();
			alert('You must provide an integer value for the annual revenue for company size.');
			return false;
		}
	}
	
	if (!validQueryFilter(4,2,'Commercial sales',2)) return false;
	if (!validQueryFilter(5,2,'Consumer sales',2)) return false;
	if (!validQueryFilter(6,3,'Transportation',1)) return false;
	if (!validQueryFilter(7,3,'Distribution operations',1)) return false;
	if (!validQueryFilter(8,3,'Overhead and other',1)) return false;
	if (!validQueryFilter(9,4,'Distribution centers',1)) return false;
	if (!validQueryFilter(10,4,'Manufacturing plants',1)) return false;
	if (!validQueryFilter(11,4,'Purchases from',1)) return false;
	if (!validQueryFilter(12,4,'Sales to',1)) return false;
	if (!validQueryFilter(13,4,'Product manufacturing',2)) return false;
	if (!validQueryFilter(14,5,'Product characteristics - Value',2)) return false;
	if (!validQueryFilter(15,5,'Product characteristics - Weight',2)) return false;
	if (!validQueryFilter(16,5,'Product characteristics - Size',2)) return false;
	if (!validQueryFilter(17,5,'Product characteristics - Physical characteristics',2)) return false;
	if (!validQueryFilter(18,5,'Product characteristics - Temperature requirements',2)) return false;
	if (!validQueryFilter(19,5,'Product characteristics - Special handling',2)) return false;
	if (!validQueryFilter(20,6,'Raw material and component characteristics - Value',2)) return false;
	if (!validQueryFilter(21,6,'Raw material and component characteristics - Weight',2)) return false;
	if (!validQueryFilter(22,6,'Raw material and component characteristics - Size',2)) return false;
	if (!validQueryFilter(23,6,'Raw material and component characteristics - Physical characteristics',2)) return false;
	if (!validQueryFilter(24,6,'Raw material and component characteristics - Temperature requirements',2)) return false;
	if (!validQueryFilter(25,6,'Raw material and component characteristics - Special handling',2)) return false;

	return true;
}

function validQueryFilter(intFilterID,intGroupID,strDescription,intType)
{
	if (arrFilters[intFilterID][0] != null || arrFilters[intFilterID][1] != null)
	{
		if (arrFilters[intFilterID][1] != null)
		{
			if (arrFilters[intFilterID][0] == null)
			{
				if (!document.getElementById('Row' + intGroupID + '_1'))
					enableRow(document.getElementById('ImgRow' + intGroupID),intGroupID);
				document.getElementById('ddl' + intFilterID).focus();
				alert('You must select an evaluation factor for ' + strDescription + '.');
				return false;
			}
			
			if (intType == 1) //Integer
			{
				if (!isIntegerString('' + arrFilters[intFilterID][1]))
				{
					if (!document.getElementById('Row' + intGroupID + '_1'))
						enableRow(document.getElementById('ImgRow' + intGroupID),intGroupID);
					location.href = "#Question2";
					document.getElementById('txt' + intFilterID).select();
					alert('You must enter an integer value for ' + strDescription + '.');
					return false;
				}
			}
			else //Numeric
			{
				if (!isNumericString('' + arrFilters[intFilterID][1]))
				{
					if (!document.getElementById('Row' + intGroupID + '_1'))
						enableRow(document.getElementById('ImgRow' + intGroupID),intGroupID);
					location.href = "#Question2";
					document.getElementById('txt' + intFilterID).select();
					alert('You must enter a numeric value for ' + strDescription + '.');
					return false;
				}
			}
		}
	}
	return true;
}

function isNumericString(strString)
{
	if (strString == '')
		return true;

	var strValidChars = "0123456789.-(),";
	var strChar;
	var blnResult = true;
	var blnGotDecimal = false;
	
	if (strString.length == 0) return false;

	//  test strString consists of valid characters listed above
	for (i = 0; i < strString.length && blnResult == true; i++)
	{
		strChar = strString.charAt(i);
		if (strValidChars.indexOf(strChar) == -1)
			blnResult = false;
		
		if (strChar == "." && i == 0 && strString.length == 1)
			blnResult = false;
		
		if (strChar == "." && !blnGotDecimal)
			blnGotDecimal = true;
		else if (strChar == "." && blnGotDecimal)
			blnResult = false;
		
		if ((strChar == '-' && i != 0 && i != strString.length - 1) || (strChar == '(' && i != 0) || (strChar == ')' && i != strString.length -1))
			blnResult = false;
	}
	
	if (strString.charAt(0) == '(' && strString.charAt(strString.length - 1) != ')')
		blnResult = false;
	
	if (strString.charAt(strString.length -	1) == ')' && strString.charAt(0) != '(')
		blnResult = false;
	
	if (strString.charAt(0) == '-' && strString.charAt(strString.length - 1) == '-')
		blnResult = false;
	
	return blnResult;
}

function exportExcel()
{
	var frm = document.getElementById('exportExcel');
	var txtName = document.getElementById('name');
	var txtCon = document.getElementById('con');
	
	txtName.value = document.title;
	txtCon.value = getQueryHTML();
	frm.submit();
}

function getQueryHTML()
{
	var txtCon = document.getElementById('con');
	var strMatch1 = '<!-- Begin Display -->';
	var strMatch2 = '<!-- End Display -->';
	var strPage;
	var intStart, intEnd;
	
	txtCon.value = '';
	strPage = document.body.innerHTML;
	intStart = strPage.indexOf(strMatch1);
	intEnd = strPage.indexOf(strMatch2,intStart);
	
	return strPage.substring(intStart,intEnd);
}
//-->