//
function miniCart(){
var prdCount = 0, prdString = "", subTotal = (xmlConfig.cartSubTotal > 0)?xmlConfig.cartSubTotal:0;
	if(xmlOHeader.childNodes.length==0) subTotal = 0;
	for(var i=0;i<xmlOHeader.childNodes.length;i++){
		prdCount = prdCount+(parseInt(xmlOHeader.childNodes[i].QuantityAmount));
		};
	prdString += "Amount of Products:<strong>&nbsp;" + prdCount + "</strong><br>";
	prdString += "Subtotal:<strong>&nbsp;" + TFormatCurrency(subTotal, objPriCurrency) + "</strong><br><br>";
	prdString += "<a class=\"WAGRUNAV\" href=\"orderform." + xmlConfig.fileExtension + "\">";
	prdString += "<strong>" + '<img src="assets/images/bullet.gif" width="13" height="14" alt="Bullet.gif" border="0" align="absmiddle" hspace="0" vspace="0" class="catnav">' + "Go to the Orderform</strong></a>";
	return(prdString);
	};
//
var TNavDropDownIndent = ".."
//
function NavLinkedDropDownList(){
	return(TNavDropDownList(true));
	};
//
function NavDropDownList(){
	return(TNavDropDownList(false));
	};
//
function storeSearchParameters(optionValueArray){
var xmlSearchEngine = xmlConfig.getFirstItem("SearchEngine");
	if(optionValueArray[0]!="null"&&optionValueArray[0]!="nada"){
		xmlSearchEngine.categoryIndex = optionValueArray[0];
		xmlSearchEngine.categoryId = optionValueArray[2];
		xmlSearchEngine.ByCategory = "1";
		}
	else{
		xmlSearchEngine.categoryIndex = "null";
		xmlSearchEngine.categoryId = "null";
		xmlSearchEngine.ByCategory = "0";
		};
	};
//
function TNavDropDownList(asLink){
var rString = "";
var myNavIndex = "";
	if(asLink) myNavIndex = xmlConfig.navIndex;
	else myNavIndex = xmlConfig.getFirstItem("SearchEngine").categoryIndex;
	if(!(myNavIndex=="null"||myNavIndex=="")){ navigation[parseInt(myNavIndex)].active = true; };
	if(asLink) rString += "<select name=\"navselect\" onChange=\"changeLoc(this[this.selectedIndex].value.split(';;')[0],this[this.selectedIndex].value.split(';;')[1])\">"
	else rString += "<select name=\"navselect\" onChange=\"storeSearchParameters(this[this.selectedIndex].value.split(';;'))\">";
	rString += "<option value=\"nada;;start.htm;;null\">Equipment Catalog</option>";
	for(var i=0; i<navigation.length; i++){
		if(navigation[i].parentId==null){
			rString += TNavDropDownItem(navigation[i], "");
			};
		};
	rString += "</select>";
	return(rString);
	};
//
function TNavDropDownItem(navItem, cptPreFix){
var rString = "";
	rString += "<option value=\"" + navItem.id + ";;" + navItem.linkUrl + ";;" + navItem.categoryId + "\"";
	if(navItem.active) rString += " selected";
	rString += ">" + cptPreFix + navItem.caption + "</option>";
	for(var i=0; i<navigation.length;i++) if(navigation[i].parentId==navItem.id) rString += TNavDropDownItem(navigation[i], cptPreFix + TNavDropDownIndent);
	return(rString);	
	};
//
	function openItem(itemId){
	var objActiveItem = null;
		if(itemId!=null){
			objActiveItem = navigation[itemId];
			if(objActiveItem!=null){
				objActiveItem.open = true;
				openItem(objActiveItem.parentId);
				};
			};
		};
		
	function activateItem(itemId){
	var objActiveItem = null;
		if(itemId!=null){
			objActiveItem = navigation[itemId];
			if(objActiveItem!=null){
				objActiveItem.active = true;
				openItem(objActiveItem.parentId);
				};
			};
		};
		
	function itemHasSubelems(itemId){
		for(var i=0; i<navigation.length;i++) if(navigation[i].parentId==itemId) return(true);
		return(false);
		};
	
	function TNavLinkList(){
	var strHTML = "";
		for(var i=0; i<navigation.length; i++) if(navigation[i].parentId==null) strHTML += printItem(navigation[i], 0);
		return(strHTML);
		};	
		
	function printItem(navItem, depth){
	var strHTML = "";
	var elemWidth = 1;
		strHTML += '<table width="100%" class="CATLINKS1STPARENT" border="0" cellpadding="1" cellspacing="1" >';
		strHTML += "<tr>"
		for(var i=0; i<depth; i++){
			strHTML += "<td";
			if(navItem.active) strHTML += " class=\"ACTIVECATEGORY\""
			else strHTML += " class=\"CATLINKS1STBULLET\"";
			strHTML += ' width="1%"><img src="assets/images/spacer.gif" width="13" height="1" height="1" alt="" border="0"></td>';
			};
		if(navItem.active) strHTML += '<td width="1%" class="ACTIVECATEGORY"><img src="assets/images/bulletcatact.gif" width="13" height="14" alt="BulletCatAct.gif" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		else if(navItem.open&&itemHasSubelems(navItem.id)) strHTML += '<td width="1%" class="CATLINKS1STBULLET"><img src="assets/images/bulletcat1stcls.gif" width="13" height="14" alt="BulletCat1stCls.gif" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		else strHTML += '<td width=\"1%\"><img src="assets/images/bulletcat1st.gif" width="13" height="14" alt="BulletCat1st.gif" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		strHTML += "<td";
		if(navItem.active) strHTML += " class=\"ACTIVECATEGORY\""
		else strHTML += " class=\"CATLINKS1STBULLET\"";
		strHTML += "width=\"" + ( 100 - ( depth + 1 ) ) + "%\">"
			+ "<a href=\"" + navItem.linkUrl + "?categoryId=" + escape(navItem.id) + "\" class=\"WAGRUNAV\">"
			+ navItem.caption
			+ "</a>"
			+ "</td>";
		strHTML += "</tr>"
		strHTML += "</table>"
		depth++;
		if(navItem.active||navItem.open){
			for(var i=0; i<navigation.length;i++) if(navigation[i].parentId==navItem.id) strHTML += printItem(navigation[i], depth);
			};
		return(strHTML);
		};


//

// navElem
	function navElem(id,caption,linkUrl,parentId,categoryId){
		this.id = id;
		this.caption = caption;
		this.linkUrl = linkUrl;
		this.parentId = parentId;
		this.active = false;
		this.open = false;
		this.categoryId = categoryId;
		};
// navigation
var navigation = new Array();
//
navigation[0] = new navElem(0,"All Liquidations","pi1154922748.htm",null,"All Liq");
navigation[1] = new navElem(1,"Ductile Iron Foundry","pi250001290.htm",0,"Duct Iron ");
navigation[2] = new navElem(2,"All Parts","pi1089235898.htm",null,"Parts");
navigation[3] = new navElem(3,"Gear Reducers","pi2098562105.htm",2,"gear reduc");
navigation[4] = new navElem(4,"Muller Parts","pi-1197488643.htm",2,"mull part");
navigation[5] = new navElem(5,"Vibratory Conveyor Parts","pi1128364346.htm",2,"vib con ");
navigation[6] = new navElem(6,"Ball Mill","pi-1398757044.htm",null,"Ball Mill");
navigation[7] = new navElem(7,"Blast Equipment","pi1039298388.htm",null,"Blast");
navigation[8] = new navElem(8,"Blast Cleaning","pi-1478198450.htm",7,"Blast Con");
navigation[9] = new navElem(9,"Unloading Conveyors","pi190742414.htm",7,"Unload Con");
navigation[10] = new navElem(10,"Compressors/ Dryers","pi-871560006.htm",null,"Air Comp");
navigation[11] = new navElem(11,"Conveyors/ Elevators","pi-1544130198.htm",null,"Conv");
navigation[12] = new navElem(12,"Aerators","pi1154920086.htm",11,"Aera");
navigation[13] = new navElem(13,"Belt","pi-2127098765.htm",11,"Conv BF");
navigation[14] = new navElem(14,"Bucket Elevators","pi1404577778.htm",11,"Conv BE");
navigation[15] = new navElem(15,"Hunter Feed","pi1131163474.htm",11,"Hnt Feed");
navigation[16] = new navElem(16,"Magnetic","pi-1053613376.htm",11,"Conv Mag");
navigation[17] = new navElem(17,"Overhead Chain","pi1056054847.htm",11,"Chain");
navigation[18] = new navElem(18,"Roller Gravity","pi640057775.htm",11,"Conv RG");
navigation[19] = new navElem(19,"Roller Powered","pi-1912076860.htm",11,"Conv RP");
navigation[20] = new navElem(20,"Systems","pi202375245.htm",11,"Conv Sys");
navigation[21] = new navElem(21,"Transfer Car","pi862059328.htm",11,"Tran Car");
navigation[22] = new navElem(22,"Transporters","pi-1853670896.htm",11,"Conv Pnue");
navigation[23] = new navElem(23,"Turn Table","pi-1611355583.htm",11,"Tur Tbl");
navigation[24] = new navElem(24,"Vibratory Conveyors","pi58799065.htm",11,"Conv O");
navigation[25] = new navElem(25,"Vibratory Conveyor Parts","pi1374448435.htm",24,"vib conv");
navigation[26] = new navElem(26,"Core Equipment","pi79113123.htm",null,"Cor");
navigation[27] = new navElem(27,"Auto Sand Delivery","pi-1252740646.htm",26,"Cor SD");
navigation[28] = new navElem(28,"Batch Mixers","pi-1406329005.htm",26,"Cor BM");
navigation[29] = new navElem(29,"Cold Box","pi124579518.htm",26,"Cor CB");
navigation[30] = new navElem(30,"Gassing/ Scrubber","pi1026599708.htm",26,"Cor CB G");
navigation[31] = new navElem(31,"Packed Tower Scrubbers","pi1184088585.htm",26,"core proce");
navigation[32] = new navElem(32,"Shell/ Hot Box","pi-1507546265.htm",26,"Cor S");
navigation[33] = new navElem(33,"Wire Straightener","pi1211900651.htm",26,"WS");
navigation[34] = new navElem(34,"Cranes and Hoists","pi1596399016.htm",null,"Crane");
navigation[35] = new navElem(35,"Bridge Cranes","pi916789541.htm",34,"Bridge");
navigation[36] = new navElem(36,"Casting Handler","pi1108003256.htm",34,"cast han");
navigation[37] = new navElem(37,"Hoists","pi-795568165.htm",34,"Hoist");
navigation[38] = new navElem(38,"Jib Cranes","pi1071425922.htm",34,"Jib");
navigation[39] = new navElem(39,"Dryer","pi1194806638.htm",null,"drykln");
navigation[40] = new navElem(40,"Dust Collectors","pi1470356640.htm",null,"Dust Col");
navigation[41] = new navElem(41,"Blowers","pi-1351125793.htm",40,"Dust B");
navigation[42] = new navElem(42,"Cartridge","pi-1476032479.htm",40,"Dust C");
navigation[43] = new navElem(43,"Pulse Jet","pi-1534684210.htm",40,"Dust P");
navigation[44] = new navElem(44,"Shaker/ Rev Air","pi1106448183.htm",40,"Dust S");
navigation[45] = new navElem(45,"Wet Scrubbers","pi853770518.htm",40,"Dust W");
navigation[46] = new navElem(46,"Finishing Equipment","pi1833360406.htm",null,"Grind");
navigation[47] = new navElem(47,"Abrasive Cut Off Saws","pi1321595383.htm",46,"abrs ct of");
navigation[48] = new navElem(48,"Band Saws","pi-1695583636.htm",46,"Band");
navigation[49] = new navElem(49,"Saws","pi-1815643762.htm",46,"Saws");
navigation[50] = new navElem(50,"Stand Grinder","pi-360550341.htm",46,"Stand ");
navigation[51] = new navElem(51,"Swing Frame ","pi-1853703072.htm",46,"Swng Frme");
navigation[52] = new navElem(52,"Forklifts/Material Handling","pi-1283687280.htm",null,"Fork");
navigation[53] = new navElem(53,"Dumpsters","pi1091456858.htm",52,"dumpsters");
navigation[54] = new navElem(54,"Fork Lifts","pi-432624090.htm",52,"fork lfts");
navigation[55] = new navElem(55,"Gear Reducers","pi-301770323.htm",null,"gear redcr");
navigation[56] = new navElem(56,"Generators/Turbines","pi965845789.htm",null,"gen trb");
navigation[57] = new navElem(57,"Heat Treat","pi441283456.htm",null,"Heat Treat");
navigation[58] = new navElem(58,"Inspection Equipment","pi547082.htm",null,"Insp");
navigation[59] = new navElem(59,"Hardness Tester","pi1055782329.htm",58,"Hard");
navigation[60] = new navElem(60,"Layout Machines","pi-531247544.htm",58,"Insp LO");
navigation[61] = new navElem(61,"Magnaflux Machines","pi301376195.htm",58,"Insp Mag");
navigation[62] = new navElem(62,"Measuring Equipment","pi-1335233879.htm",58,"Insp Met");
navigation[63] = new navElem(63,"Ultrasonic Testers","pi1340308918.htm",58,"Insp UL");
navigation[64] = new navElem(64,"Xray","pi170875921.htm",58,"Xray");
navigation[65] = new navElem(65,"Kiln","pi-1274556070.htm",null,"Kiln");
navigation[66] = new navElem(66,"Laboratory Equipment","pi364686201.htm",null,"Lab");
navigation[67] = new navElem(67,"Chemical Analysis","pi-728347371.htm",66,"Lab Met");
navigation[68] = new navElem(68,"Metalographic/ Sample Prep","pi-1787241914.htm",66,"Lab M");
navigation[69] = new navElem(69,"Physical Testing","pi1770234340.htm",66,"Lab Phys");
navigation[70] = new navElem(70,"Sand Testing","pi-1915141553.htm",66,"Lab San");
navigation[71] = new navElem(71,"Scales and Balances","pi1303496091.htm",66,"Scales");
navigation[72] = new navElem(72,"Ladle Heater","pi1650642024.htm",null,"Lad Heat");
navigation[73] = new navElem(73,"Ladles","pi-890589877.htm",null,"Lad");
navigation[74] = new navElem(74,"Automatic Pouring","pi1100973237.htm",73,"autopour");
navigation[75] = new navElem(75,"Bottom Pour","pi-1106523109.htm",73,"Lad BPV");
navigation[76] = new navElem(76,"Cylindrical Ladles","pi-1714182936.htm",73,"Lad HVB");
navigation[77] = new navElem(77,"Ductile Iron","pi-650398378.htm",73,"Lad Duc");
navigation[78] = new navElem(78,"Ladle Heater","pi1353079506.htm",73,"Ladle Heat");
navigation[79] = new navElem(79,"Lip Pour","pi-252283222.htm",73,"Lad LPVB");
navigation[80] = new navElem(80,"Tea Pot","pi-1133558939.htm",73,"Lad TPV");
navigation[81] = new navElem(81,"Magnet","pi-254912529.htm",null,"Mag");
navigation[82] = new navElem(82,"Melting and Transformers","pi8726153.htm",null,"Fur");
navigation[83] = new navElem(83,"Arc","pi1053813084.htm",82,"Arc F");
navigation[84] = new navElem(84,"Arc Transformer","pi1630842157.htm",82,"Arc T");
navigation[85] = new navElem(85,"Cooling Tower","pi1168073389.htm",82,"Fur TwrC");
navigation[86] = new navElem(86,"Heat Exchanger","pi1246384522.htm",82,"H EX");
navigation[87] = new navElem(87,"Induction","pi-697508980.htm",82,"Induc");
navigation[88] = new navElem(88,"Non Ferrous","pi-961141997.htm",82,"Non F E");
navigation[89] = new navElem(89,"Preheater","pi968319312.htm",82,"Preheat");
navigation[90] = new navElem(90,"Pumps","pi1261771939.htm",82,"Fur RP");
navigation[91] = new navElem(91,"Scrap Magnets","pi1706058972.htm",82,"Fur M");
navigation[92] = new navElem(92,"Stand By Generators","pi1253041989.htm",82,"Fur Gen");
navigation[93] = new navElem(93,"Vibrators","pi1113022284.htm",82,"Vib");
navigation[94] = new navElem(94,"Molding Equipment","pi-1632511952.htm",null,"Mold");
navigation[95] = new navElem(95,"Automatic","pi-914481039.htm",94,"Mold A");
navigation[96] = new navElem(96,"Conventional","pi1670461918.htm",94,"Mold C");
navigation[97] = new navElem(97,"Conveyor Lines","pi-2109393125.htm",94,"Conv Line");
navigation[98] = new navElem(98,"Permanent","pi-1380538616.htm",94,"Perm");
navigation[99] = new navElem(99,"Powder Feeder","pi1130808768.htm",94,"Pwdr Feed");
navigation[100] = new navElem(100,"Rollover","pi1110418625.htm",94,"rollover");
navigation[101] = new navElem(101,"Shell","pi1202415173.htm",94,"mold shell");
navigation[102] = new navElem(102,"Motors","pi1039368830.htm",null,"Mot");
navigation[103] = new navElem(103,"Mullers/ Gearboxes","pi-1677418489.htm",null,"Mul");
navigation[104] = new navElem(104,"Gearboxes","pi-846675571.htm",103,"Gear");
navigation[105] = new navElem(105,"Muller Parts","pi-1021229396.htm",103,"mull parts");
navigation[106] = new navElem(106,"Mullers","pi-1286182084.htm",103,"Muller");
navigation[107] = new navElem(107,"No Bake","pi-1958930813.htm",null,"No B");
navigation[108] = new navElem(108,"Batch Mixer","pi-1799164816.htm",107,"NB Batch");
navigation[109] = new navElem(109,"Compaction Tables","pi-684352575.htm",107,"No B CT");
navigation[110] = new navElem(110,"Continuous Mixers","pi-617016867.htm",107,"No B Mix");
navigation[111] = new navElem(111,"Drying Ovens","pi-375666962.htm",107,"No B DO");
navigation[112] = new navElem(112,"Heaters/ Coolers","pi945455759.htm",107,"No B SC");
navigation[113] = new navElem(113,"Loops and Turntables","pi-1701065769.htm",107,"No B L");
navigation[114] = new navElem(114,"Magnetic Separators","pi2100463445.htm",107,"No B MS");
navigation[115] = new navElem(115,"Mold Coating/ Mixing","pi1137906584.htm",107,"No B Coat");
navigation[116] = new navElem(116,"Mold Handlers","pi2109014457.htm",107,"No B MH");
navigation[117] = new navElem(117,"Powder Feeder","pi-1546977808.htm",107,"Pdr Feed");
navigation[118] = new navElem(118,"Reclaim","pi1235059590.htm",107,"No B R Sys");
navigation[119] = new navElem(119,"Pattern Shop","pi-848388865.htm",null,"Pat");
navigation[120] = new navElem(120,"Powder Coat and Paint","pi1096068166.htm",null,"powd-pnt");
navigation[121] = new navElem(121,"Process Equipment","pi-232450388.htm",null,"Pro");
navigation[122] = new navElem(122,"Agitators","pi-525482367.htm",121,"Pro Ag");
navigation[123] = new navElem(123,"Belt Filter","pi1032663446.htm",121,"blt filt");
navigation[124] = new navElem(124,"Evaporation","pi-1545700513.htm",121,"evap");
navigation[125] = new navElem(125,"Filter Press","pi-307033676.htm",121,"filt pres");
navigation[126] = new navElem(126,"Packed Tower Scrubbers","pi-1613542633.htm",121,"pk twr scr");
navigation[127] = new navElem(127,"Pug Mill","pi1169947090.htm",121,"Pug Mill");
navigation[128] = new navElem(128,"Pumps","pi719043249.htm",121,"Pump");
navigation[129] = new navElem(129,"Carbon Steel","pi-553860025.htm",128,"C Pumps");
navigation[130] = new navElem(130,"Packaged w/ Controls","pi965102204.htm",128,"Pkg Pump");
navigation[131] = new navElem(131,"Stainless","pi-375728354.htm",128,"SS Pump");
navigation[132] = new navElem(132,"Spray Dryer","pi353754368.htm",121,"spry dry");
navigation[133] = new navElem(133,"Tanks","pi682991234.htm",121,"Pro SST");
navigation[134] = new navElem(134,"Alloy Tanks","pi-1721378559.htm",133,"alloy tnk");
navigation[135] = new navElem(135,"Carbon Steel Tanks","pi1931348782.htm",133,"carb tnk");
navigation[136] = new navElem(136,"Rollovers","pi-1808071562.htm",null,"Rol");
navigation[137] = new navElem(137,"Sand Cooler","pi1128016020.htm",null,"Sandcool");
navigation[138] = new navElem(138,"Shakeouts/ Screens","pi1028069346.htm",null,"Sha");
navigation[139] = new navElem(139,"Silos and Bins","pi-1284227397.htm",null,"Silo");
navigation[140] = new navElem(140,"Sand Tank","pi879534508.htm",139,"Snd Tnk");
navigation[141] = new navElem(141,"Vibra Bin Bottoms","pi1875084237.htm",139,"Silo Vib");
navigation[142] = new navElem(142,"Transporter","pi1054501567.htm",null,"P Trans");
navigation[143] = new navElem(143,"Vacuums","pi1133185248.htm",null,"Vac");
navigation[144] = new navElem(144,"Welders","pi1074700356.htm",null,"Weld");

// getNavElementByCatID
function getNavElementByCatID(categoryId){
	for(var i=0; i<navigation.length; i++){
		if(navigation[i].categoryId==categoryId){
			return(navigation[i]);
			break;
			};
		};
		return(null);
	};
// changeLoc
function changeLoc(id,linkUrl){
	if(id!="nada"){
		xmlConfig.navIndex = id.toString();
		if(xmlConfig.getFirstItem("SearchEngine").ByCategory == "1"){
			if(id=="null") xmlConfig.getFirstItem("SearchEngine").categoryId = "null"
			else xmlConfig.getFirstItem("SearchEngine").categoryId = navigation[id].categoryId;
			xmlConfig.getFirstItem("SearchEngine").categoryIndex = id;
			}
		else{
			xmlConfig.getFirstItem("SearchEngine").categoryId = "null";
			xmlConfig.getFirstItem("SearchEngine").categoryIndex = "null";
			};
		safeData();
		location.href = linkUrl + "?categoryId=" + id.toString();
		};
	};
// searchOnEnterNavi
function searchOnEnterNavi(){
	if(window.event.keyCode==13){
		xmlConfig.getFirstItem('SearchEngine').term=document.searchEngine.searchTerm.value;
		location.href = "search.htm";
		};
	};
// activates entries for categories
activateItem(getParameterFromURL("categoryId"));


