<!--
	var lngPcmCount = 0;
	var lngLastPrdChecked = 0;
	function SelectProduct( lngPrdID, lngCatID )
	{
		var blnChecked = false;
		//update the count
		if ( document.getElementById( 'chkPrd' + lngPrdID ).checked == true )
		{
			blnChecked = true;
			lngPcmCount += 1;
		}
		else
		{
			//remove the column
			if ( objColumn = document.getElementById( 'prdCol' + lngPrdID ) )
			{
				document.getElementById( 'pcmContent' ).removeChild( objColumn );
			}
			lngPcmCount -= 1;
		}
		//make sure we only allow three to be selected at a time
		if ( lngPcmCount > 3 && blnChecked == true )
		{
			//remove the last column for the product checked before the current
			if ( objColumn = document.getElementById( 'prdCol' + lngLastPrdChecked ) )
			{
				document.getElementById( 'pcmContent' ).removeChild( objColumn );
			}
			if ( objChkLast = document.getElementById( 'chkPrd' + lngLastPrdChecked ) )
			{
				objChkLast.checked = false;
			}
			//update the count
			lngPcmCount -= 1;
		}
		lngLastPrdChecked = lngPrdID;
		var xmlHttp = AJAX_GetXMLHttp();
		if ( xmlHttp == null )
		{
			alert( "Error: Could not instantiate XmlHttp object." );
			return;
		}
		//get the xml
		if ( lngPcmCount > 0 && blnChecked == true )
		{
			xmlHttp.open( 'GET', 'xml/comparisonXml.asp?ID=' + lngPrdID, true );
			xmlHttp.send( 'ID=' + lngPrdID );
			xmlHttp.onreadystatechange = function()
			{
				if ( xmlHttp.readyState == 4 && xmlHttp.status == 200 )
				{
					//list the comparisons for the selected products
					ListComparison( xmlHttp.responseText, lngPrdID );
				}
			}
		}
	}
	function ListComparison( xmlString, lngPrdID )
	{
		var xmlDoc;
		var pcmDataset;
		var strCharacteristics = '';
		var strTechnology = '';
		var strTops = '';
		var strDoorsDrawers = '';
		var strStandardColors = '';
		var strDoorsDrawersColors = '';
		var strModestyPanels = '';
		var strLoadCapacity = '';
		var strUnassembledItems = '';
		var strGrommets = '';
		var strLocking = '';
		var strGeneralFeatures = '';
		var strVeneer = '';
		var strTopConstruction = '';
		var strChassis = '';
		var strDrawerSuspension = '';
		var lngCatID = 0;
		var strCatName = '';
		var strPrdName = '';
		var strHtm = '';
		var i;
		var x;
		
		if ( xmlString.length <= 0 )
		{
			return;
		}
		// Instantiate the xml parser
		xmlDoc = AJAX_GetXMLParser();
		if ( xmlDoc == null )
		{
			alert( "Error: Could not instantiate XML parser." );
			return;
		}
		// Load the XML string
		xmlDoc = AJAX_LoadXML( xmlDoc, xmlString );
		if ( xmlDoc == null )
		{
			alert( "Error: Could not parse XML data." );
			return;
		}
		//get the data
		pcmDataset = xmlDoc.getElementsByTagName( 'NOVAProduct' );
		if ( pcmDataset.length != 0 )
		{
			//create the div
			var objPcm = document.createElement( 'div' );
			//set the ID
			objPcm.setAttribute( 'id','prdCol' + lngPrdID );
			//set the class
			objPcm.className = 'pcmColumn';
			//add the column label
			lngCatID = parseInt( pcmDataset[0].childNodes[16].firstChild.nodeValue );
			strCatName = pcmDataset[0].childNodes[17].firstChild.nodeValue;
			strPrdName = pcmDataset[0].childNodes[18].firstChild.nodeValue;
			strHtm = '<div class=\"pcmLabel' + lngCatID + '\">' + strCatName + ': ' + strPrdName + '</div>';
			//loop through the data
			for ( var i=0; i < pcmDataset.length; i++ )
			{
				strCharacteristics = pcmDataset[i].childNodes[0].firstChild.nodeValue;
				strTechnology = pcmDataset[i].childNodes[1].firstChild.nodeValue;
				strTops = pcmDataset[i].childNodes[2].firstChild.nodeValue;
				strDoorsDrawers = pcmDataset[i].childNodes[3].firstChild.nodeValue;
				strStandardColors = pcmDataset[i].childNodes[4].firstChild.nodeValue;
				strDoorsDrawersColors = pcmDataset[i].childNodes[5].firstChild.nodeValue;
				strModestyPanels = pcmDataset[i].childNodes[6].firstChild.nodeValue;
				strLoadCapacity = pcmDataset[i].childNodes[7].firstChild.nodeValue;
				strUnassembledItems = pcmDataset[i].childNodes[8].firstChild.nodeValue;
				strGrommets = pcmDataset[i].childNodes[9].firstChild.nodeValue;
				strLocking = pcmDataset[i].childNodes[10].firstChild.nodeValue;
				strGeneralFeatures = pcmDataset[i].childNodes[11].firstChild.nodeValue;
				strVeneer = pcmDataset[i].childNodes[12].firstChild.nodeValue;
				strTopConstruction = pcmDataset[i].childNodes[13].firstChild.nodeValue;
				strChassis = pcmDataset[i].childNodes[14].firstChild.nodeValue;
				strDrawerSuspension = pcmDataset[i].childNodes[15].firstChild.nodeValue;
				//create a div for each
				strHtm += '<div>';
				if ( strCharacteristics != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Characteristics</div>'; }
				if ( strCharacteristics != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strCharacteristics + '</div>'; }
				if ( strTechnology != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Technology</div>'; }
				if ( strTechnology != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strTechnology + '</div>'; }
				if ( strTops != '-1' )
				{
					//check for the wood category
					if ( lngCatID != 2 ) { strHtm += '<div class=\"pcmItemLabel\">Tops (Thichness, Laminate, Thickness of PVC)</div>'; }
					if ( lngCatID == 2 ) { strHtm += '<div class=\"pcmItemLabel\">Tops (Thichness, Edge Profile)</div>'; }
				}
				if ( strTops != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strTops + '</div>'; }
				if ( strDoorsDrawers != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Doors &amp; Drawers</div>'; }
				if ( strDoorsDrawers != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strDoorsDrawers + '</div>'; }
				if ( strStandardColors != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Standard Colors</div>'; }
				if ( strStandardColors != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strStandardColors + '</div>'; }
				if ( strDoorsDrawersColors != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Door &amp; drawer pull colors</div>'; }
				if ( strDoorsDrawersColors != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strDoorsDrawersColors + '</div>'; }
				if ( strModestyPanels != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Modesty Panels</div>'; }
				if ( strModestyPanels != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strModestyPanels + '</div>'; }
				if ( strLoadCapacity != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Load Capacity</div>'; }
				if ( strLoadCapacity != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strLoadCapacity + '</div>'; }
				if ( strUnassembledItems != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Unassembled Items</div>'; }
				if ( strUnassembledItems != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strUnassembledItems + '</div>'; }
				if ( strGrommets != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Grommets</div>'; }
				if ( strGrommets != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strGrommets + '</div>'; }
				if ( strLocking != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Locking</div>'; }
				if ( strLocking != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strLocking + '</div>'; }
				if ( strGeneralFeatures != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">General Features</div>'; }
				if ( strGeneralFeatures != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strGeneralFeatures + '</div>'; }
				if ( strVeneer != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Veneer</div>'; }
				if ( strVeneer != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strVeneer + '</div>'; }
				if ( strTopConstruction != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Top Construction</div>'; }
				if ( strTopConstruction != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strTopConstruction + '</div>'; }
				if ( strChassis != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Chassis</div>'; }
				if ( strChassis != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strChassis + '</div>'; }
				if ( strDrawerSuspension != '-1' ) { strHtm += '<div class=\"pcmItemLabel\">Drawer Suspension</div>'; }
				if ( strDrawerSuspension != '-1' ) { strHtm += '<div class=\"pcmItem\">' + strDrawerSuspension + '</div>'; }
				//close up the div
				strHtm += '</div>';
			}
			//set the content
			objPcm.innerHTML = strHtm;
			//append the new column
			document.getElementById( 'pcmContent' ).appendChild( objPcm );
		}
	}
//-->