	function getApplications(sCode){
		if (bw.ns4) {
			clearcombo(document.layers['divText'].document.frm_Search.applications);
		} else {
			if (bw.ie) {
				clearcombo(document.frm_Search.applications);
			} else {
				if (bw.ns6) {
					clearcombo(document.frm_Search.applications);
				}
			}
		}
	  if (sCode == 'NONE' || sCode == ''){
	    // if they click on an empty area in the imagemap
	    addopt(0, 'Click on an industry to view applications');
	  } else {
	    // a non-empty area
	    window.open("../include/popfetchapplication.asp?industryid=" + 
	       sCode, "gofetch", 
	      "toolbar=no,menubar=no,location=no,directories=no," +
	      "resizeable=no,width=100,height=100,left=0,top=0");
	    window.focus();
	  }
	}
	function getServices(sCode){
		if (bw.ns4) {
			clearcombo(document.layers['divText'].document.frm_Search.selService);
		} else {
			if (bw.ie) {
				clearcombo(document.frm_Search.selService);
			} else {
				if (bw.ns6) {
					clearcombo(document.frm_Search.selService);
				}
			}
		}
	  if (sCode == 'NONE' || sCode == ''){
	    // if they click on an empty area in the imagemap
	    addopt(0, 'Click on an application to view services');
	  } else {
	    // a non-empty area
	    window.open("../include/popfetchservices.asp?applicationid=" + 
	       sCode, "gofetch", 
	      "toolbar=no,menubar=no,location=no,directories=no," +
	      "resizeable=no,width=100,height=100,left=0,top=0");
	    window.focus();
	  }
	}
	function addopt(nValue, sText){
	  // this routine adds a new item to our listbox
		if (bw.ns4) {
			document.layers['divText'].document.frm_Search.applications.options[document.layers['divText'].document.frm_Search.applications.options.length] = new Option(sText, nValue);
		} else {
			if (bw.ie) {
				document.frm_Search.applications.options[document.frm_Search.applications.options.length] = new Option(sText, nValue);
			} else {
				if (bw.ns6) {
					document.frm_Search.applications.options[document.frm_Search.applications.options.length] = new Option(sText, nValue);
				}
			}
		}
	}
	function addoptservice(nValue, sText){
	  // this routine adds a new item to our listbox
		if (bw.ns4) {
			document.layers['divText'].document.frm_Search.selService.options[document.layers['divText'].document.frm_Search.selService.options.length] = new Option(sText, nValue);
		} else {
			if (bw.ie) {
				document.frm_Search.selService.options[document.frm_Search.selService.options.length] = new Option(sText, nValue);
			} else {
				if (bw.ns6) {
					document.frm_Search.selService.options[document.frm_Search.selService.options.length] = new Option(sText, nValue);
				}
			}
		}
	}
	function clearcombo(el){
	  // this routine clears out a listbox or combo box
	  for (var i = el.options.length; i >= 0; i--){
	    el.options[i] = null;
	  }
	  el.selectedIndex = -1;
	}
	function submitIndustry(){
		if (bw.ns4) {
			layer = document.layers['divText']
			indID = layer.document.frm_Search.selIndustry.options[layer.document.frm_Search.selIndustry.selectedIndex].value
		} else {
			if (bw.ie) {
				indID = document.all['divText'].document.frm_Search.selIndustry.value
			} else {
				if (bw.ns6) {
					indID = document.frm_Search.selIndustry.value
				}
			}
		}
		getApplications(indID);
	}
	function submitApplication(){
		if (bw.ns4) {
			layer = document.layers['divText']
			appID = layer.document.frm_Search.applications.options[layer.document.frm_Search.applications.selectedIndex].value
		} else {
			if (bw.ie) {
				appID = document.all['divText'].document.frm_Search.applications.value
			} else {
				if (bw.ns6) {
					appID = document.frm_Search.applications.value
				}
			}
		}
		getServices(appID);
	}
	function submitSearch(searchtype){
		if (bw.ns4) {
			layer = document.layers['divFindProduct'];
			searchbox = layer + '.document.frm_Search.searchStep.value=';
			submitAction = layer + '.document.frm_Search.submit()';
		} else {
			if (bw.ie) {
				searchbox = 'document.all[\'divFindProduct\'].document.frm_Search.searchStep.value=';
				submitAction = 'document.all[\'divFindProduct\'].document.frm_Search.submit()';
			} else {
				if (bw.ns6) {
					searchbox = 'document.frm_Search.searchStep.value=';
					submitAction = 'document.frm_Search.submit()';
				}
			}
		}
		searchbox = searchbox + '"' + searchtype + '"';
		eval(searchbox);
		eval(submitAction);
	}

	function submitform(submittype, searchstep, alertmsg) {
			nogo = 1
			if (submittype == 'compete') {
				if (bw.ns4) {
					if (document.layers['divFindProduct'].document.frm_FindProd.competitor.value.length < 3) nogo=0
				} else {
					if (bw.ie) {
						if (document.all['divFindProduct'].document.frm_FindProd.competitor.value.length < 3) nogo=0
					} else {
						if (bw.ns6) {
							if (document.frm_FindProd.competitor.value.length < 3) nogo=0
						}
					}
				}
			}
			if (nogo == 1) {
				if ( (submittype == 'fastdoc') ) actionurl = 'ec_msds.asp'
				else actionurl = 'ec_carbselect.asp'
		
				if (bw.ns4) {
					document.layers['divFindProduct'].document.frm_FindProd.searchType.value = submittype
					document.layers['divFindProduct'].document.frm_FindProd.searchStep.value = searchstep
					document.layers['divFindProduct'].document.frm_FindProd.action = actionurl
					document.layers['divFindProduct'].document.frm_FindProd.submit()
				} else {
					if (bw.ie) {
						document.all['divFindProduct'].document.frm_FindProd.searchType.value = submittype
						document.all['divFindProduct'].document.frm_FindProd.searchStep.value = searchstep
						document.all['divFindProduct'].document.frm_FindProd.action = actionurl
						document.all['divFindProduct'].document.frm_FindProd.submit()
					} else {
						if (bw.ns6) {
							document.frm_FindProd.searchType.value = submittype
							document.frm_FindProd.searchStep.value = searchstep
							document.frm_FindProd.action = actionurl
							document.frm_FindProd.submit()
						}
					}
				}
			} else {
				alert(alertmsg);
			}
	}

	function viewDisclaimer(submittype, searchstep, alertmsg) {
		strOpen = 'disclaimer.asp?submittype=' + submittype + '&searchstep=' + searchstep + '&alertmsg=' + alertmsg
		w=473;
		h=400;
		Xwin=w;
		Ywin=h;
		if (parseInt(navigator.appVersion) >= 4) {
			Xwin = (screen.availWidth - w)*.5;
			Ywin = (screen.availHeight - h)*.5;
		}

		popupWin = 
		window.open(strOpen,'disclaimer','resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,width=' + w + 
		',height=' + h + ',top=' + Ywin + ',left=' + Xwin);
	}

	function popWindow(url, w, h) {
		strOpen = url
		Xwin=w;
		Ywin=h;
		if (parseInt(navigator.appVersion) >= 4) {
			Xwin = (screen.availWidth - w)*.5;
			Ywin = (screen.availHeight - h)*.5;
		}

		popupWin = 
		window.open(strOpen,'popwindow','resizable=no,scrollbars=yes,menubar=no,toolbar=no,status=no,width=' + w + 
		',height=' + h + ',top=' + Ywin + ',left=' + Xwin);
	}
