// Functions for Applied Thermal Control
// Date: 1-9-2004 - GB


<!--

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function clearBox(){
	document.email_form.Email.value = "";
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function fwLoadMenus() {
  if (window.fw_menu_0) return;
  window.fw_menu_0 = new Menu("root",112,17,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#666666","#000000");
  fw_menu_0.addMenuItem("Company Message","location='company.asp'");
  fw_menu_0.addMenuItem("Product Overview","location='product_overview.asp'");
  fw_menu_0.addMenuItem("Applications","location='applications.asp'");
   fw_menu_0.hideOnMouseOut=true;
  window.fw_menu_1 = new Menu("root",114,17,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#666666","#000000");
  fw_menu_1.addMenuItem("Product Selector","location='product_selector.asp'");
  fw_menu_1.addMenuItem("Full Product Range","location='product_range.asp'");
  fw_menu_1.addMenuItem("Troubleshooting","location='troubleshooting.asp'");  fw_menu_1.addMenuItem("Warranty Details","location='warranty.asp'");
  fw_menu_1.addMenuItem("Downloads","location='downloads.asp'");
   fw_menu_1.hideOnMouseOut=true;
  window.fw_menu_2 = new Menu("root",110,17,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#666666","#000000");
  fw_menu_2.addMenuItem("Contact ATC","location='contact.asp'");
  fw_menu_2.addMenuItem("Distributors","location='distributors.asp'");
   fw_menu_2.hideOnMouseOut=true;

  fw_menu_2.writeMenus();
} // fwLoadMenus()

function q1chosen() {
	document.form1.prodinfo.style.visibility = "hidden";
	document.form1.request.style.visibility = "hidden";
	document.form1.product.value = "";	
	document.form1.model.value = "";
	document.form1.q2ask.value = "";
	document.form1.q3ask.value = "";
	document.form1.q4ask.value = "";
	document.form1.q5ask.value = "";
	document.form1.q6ask.value = "";
	document.form1.q2answer.style.visibility = "visible";
	document.form1.q3answer.style.visibility = "hidden";
	document.form1.q4answer.style.visibility = "hidden";
	document.form1.q5answer.style.visibility = "hidden";
	document.form1.q6answer.style.visibility = "hidden";

	if (document.form1.q1answer.value == 500) {
		document.form1.q2ask.value = "What type of control do you need of your chiller temperature?";
		document.form1.q2answer.options.length = 0;
		document.form1.q2answer.options.length = 4;
		document.form1.q2answer.options[0] = new Option("Please choose...", "na");
		document.form1.q2answer.options[1] = new Option("-----------", "na");
		document.form1.q2answer.options[2] = new Option("User Set", "yes");
		document.form1.q2answer.options[3] = new Option("Factory Set", "no");
	}
	else {
		document.form1.q2ask.value = "What flow rate do you require?";
		document.form1.q2answer.options.length = 0;
		document.form1.q2answer.options.length = 5;
		document.form1.q2answer.options[0] = new Option("Please choose...", "na");
		document.form1.q2answer.options[1] = new Option("-----------", "na");
		document.form1.q2answer.options[2] = new Option("Up to 5L/min", "5");
		document.form1.q2answer.options[3] = new Option("Up to 10L/min", "10");
		document.form1.q2answer.options[4] = new Option("Up to 17L/min", "17");
	}
}

function q2chosen() {
	document.form1.prodinfo.style.visibility = "hidden";
	document.form1.request.style.visibility = "hidden";
	document.form1.product.value = "";	
	document.form1.model.value = "";
	document.form1.q3ask.value = "";
	document.form1.q4ask.value = "";
	document.form1.q5ask.value = "";
	document.form1.q6ask.value = "";
	document.form1.q3answer.style.visibility = "visible";
	document.form1.q4answer.style.visibility = "hidden";
	document.form1.q5answer.style.visibility = "hidden";
	document.form1.q6answer.style.visibility = "hidden";

	if (document.form1.q1answer.value == 500) {
		if (document.form1.q2answer.value == "no") {
			document.form1.q3ask.value = "Do you want a temperature display?";
			document.form1.q3answer.options.length = 0;
			document.form1.q3answer.options.length = 4;
			document.form1.q3answer.options[0] = new Option("Please choose...", "na");
			document.form1.q3answer.options[1] = new Option("-----------", "na");
			document.form1.q3answer.options[2] = new Option("Yes", "yes");
			document.form1.q3answer.options[3] = new Option("No", "no");
		}
		else {
			document.form1.product.value = "KTD";
			document.form1.q3ask.value = "What voltage(s) do you require?";
			document.form1.q3answer.options.length = 0;
			document.form1.q3answer.options.length = 5;
			document.form1.q3answer.options[0] = new Option("Please choose...", "na");
			document.form1.q3answer.options[1] = new Option("-----------", "na");
			document.form1.q3answer.options[2] = new Option("230V 50Hz", "230-50");
			document.form1.q3answer.options[3] = new Option("110V 60Hz", "110-60");
			document.form1.q3answer.options[4] = new Option("Switchable", "switch");
		}
	}
	else if (document.form1.q1answer.value < 6000){
		document.form1.q3ask.value = "What voltage(s) do you require?";
		document.form1.q3answer.options.length = 0;
		document.form1.q3answer.options.length = 4;
		document.form1.q3answer.options[0] = new Option("Please choose...", "na");
		document.form1.q3answer.options[1] = new Option("-----------", "na");
		document.form1.q3answer.options[2] = new Option("230V 50Hz", "230-50");
		document.form1.q3answer.options[3] = new Option("Switchable", "switch");
	}
	else if (document.form1.q1answer.value < 9000){
		document.form1.q3ask.value = "What voltage(s) do you require?";
		document.form1.q3answer.options.length = 0;
		document.form1.q3answer.options.length = 4;
		document.form1.q3answer.options[0] = new Option("Please choose...", "na");
		document.form1.q3answer.options[1] = new Option("-----------", "na");
		document.form1.q3answer.options[2] = new Option("230V 50/60Hz", "230-5060");
		document.form1.q3answer.options[3] = new Option("380-415V, 50/60Hz, 3 phase", "380-5060");
	}
	else {
		document.form1.q3ask.value = "What voltage(s) do you require?";
		document.form1.q3answer.options.length = 0;
		document.form1.q3answer.options.length = 3;
		document.form1.q3answer.options[0] = new Option("Please choose...", "na");
		document.form1.q3answer.options[1] = new Option("-----------", "na");
		document.form1.q3answer.options[2] = new Option("380-415V, 50/60Hz, 3 phase", "380-5060");
	}
}

function q3chosen() {
	document.form1.prodinfo.style.visibility = "hidden";
	document.form1.request.style.visibility = "hidden";
	document.form1.model.value = "";
	document.form1.q4ask.value = "";
	document.form1.q5ask.value = "";
	document.form1.q6ask.value = "";
	document.form1.q5answer.style.visibility = "hidden";
	document.form1.q6answer.style.visibility = "hidden";

	if (document.form1.q1answer.value == 500) {
		if (document.form1.q2answer.value == "no") {
			if (document.form1.q3answer.value == "yes") {
				document.form1.product.value = "KTC";
			} else {
				document.form1.product.value = "KTR";
			}
		}
		document.form1.q4answer.style.visibility = "visible";
		document.form1.q4ask.value = "What are your pressure requirements?";
		document.form1.q4answer.options.length = 0;
		document.form1.q4answer.options.length = 4;
		document.form1.q4answer.options[0] = new Option("Please choose...", "na");
		document.form1.q4answer.options[1] = new Option("-----------", "na");
		document.form1.q4answer.options[2] = new Option("High", "high");
		document.form1.q4answer.options[3] = new Option("Low", "low");
	}
	else {
		document.form1.prodinfo.style.visibility = "visible";
		document.form1.request.style.visibility = "visible";
		if (document.form1.q1answer.value == 1750) {
			if (document.form1.q2answer.value == 5) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K1";
					document.form1.model.value = "K105000";
				} else {
					document.form1.product.value = "K1";
					document.form1.model.value = "K105006";
				}
			} else if (document.form1.q2answer.value == 10) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K1";
					document.form1.model.value = "K110000";
				} else {
					document.form1.product.value = "K1";
					document.form1.model.value = "K110006";
				}
			} else if (document.form1.q2answer.value == 17) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K1";
					document.form1.model.value = "K117000";
				} else {
					document.form1.product.value = "K1";
					document.form1.model.value = "K117006";
				}
			}
		} else if (document.form1.q1answer.value == 1000) {
			if (document.form1.q2answer.value == 5) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "KT1";
					document.form1.model.value = "KT10500";
				} else {
					document.form1.product.value = "KT1";
					document.form1.model.value = "KT10506";
				}
			} else if (document.form1.q2answer.value == 10) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "KT1";
					document.form1.model.value = "KT11000";
				} else {
					document.form1.product.value = "KT1";
					document.form1.model.value = "KT11006";
				}
			} else if (document.form1.q2answer.value == 17) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "KT1";
					document.form1.model.value = "KT11700";
				} else {
					document.form1.product.value = "KT1";
					document.form1.model.value = "KT11706";
				}
			}
		} else if (document.form1.q1answer.value == 3200) {
			if (document.form1.q2answer.value == 5) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K3";
					document.form1.model.value = "K305000";
				} else {
					document.form1.product.value = "K3";
					document.form1.model.value = "K305006";
				}
			} else if (document.form1.q2answer.value == 10) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K3";
					document.form1.model.value = "K310000";
				} else {
					document.form1.product.value = "K3";
					document.form1.model.value = "K310006";
				}
			} else if (document.form1.q2answer.value == 17) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K3";
					document.form1.model.value = "K317000";
				} else {
					document.form1.product.value = "K3";
					document.form1.model.value = "K317006";
				}
			}
		} else if (document.form1.q1answer.value == 4500) {
			if (document.form1.q2answer.value == 5) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K4";
					document.form1.model.value = "K405000";
				} else {
					document.form1.product.value = "K4";
					document.form1.model.value = "K405006";
				}
			} else if (document.form1.q2answer.value == 10) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K4";
					document.form1.model.value = "K410000";
				} else {
					document.form1.product.value = "K4";
					document.form1.model.value = "K410006";
				}
			} else if (document.form1.q2answer.value == 17) {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.product.value = "K4";
					document.form1.model.value = "K417000";
				} else {
					document.form1.product.value = "K4";
					document.form1.model.value = "K417006";
				}
			}
		} else if (document.form1.q1answer.value == 6000) {
			if (document.form1.q2answer.value == 5) {
				if (document.form1.q3answer.value == "230-5060") {
					document.form1.product.value = "K6";
					document.form1.model.value = "K605000";
				} else {
					document.form1.product.value = "K6";
					document.form1.model.value = "K605003";
				}
			} else if (document.form1.q2answer.value == 10) {
				if (document.form1.q3answer.value == "230-5060") {
					document.form1.product.value = "K6";
					document.form1.model.value = "K610000";
				} else {
					document.form1.product.value = "K6";
					document.form1.model.value = "K610003";
				}
			} else if (document.form1.q2answer.value == 17) {
				if (document.form1.q3answer.value == "230-5060") {
					document.form1.product.value = "K6";
					document.form1.model.value = "K617000";
				} else {
					document.form1.product.value = "K6";
					document.form1.model.value = "K617003";
				}
			}
		} else if (document.form1.q1answer.value == 9000) {
			if (document.form1.q2answer.value == 5) {
				document.form1.product.value = "K9";
				document.form1.model.value = "K905003";
			} else if (document.form1.q2answer.value == 10) {
				document.form1.product.value = "K9";
				document.form1.model.value = "K910003";
			} else if (document.form1.q2answer.value == 17) {
				document.form1.product.value = "K9";
				document.form1.model.value = "K917003";
			}
		}
	}
}

function q4chosen() {
	document.form1.prodinfo.style.visibility = "hidden";
	document.form1.request.style.visibility = "hidden";
	document.form1.model.value = "";
	document.form1.q5ask.value = "";
	document.form1.q6ask.value = "";
	document.form1.q5answer.style.visibility = "hidden";
	document.form1.q6answer.style.visibility = "hidden";

	if (document.form1.q4answer.value == "high") {
		document.form1.q5answer.style.visibility = "visible";
		document.form1.q5ask.value = "What flow rate do you require?";
		document.form1.q5answer.options.length = 0;
		document.form1.q5answer.options.length = 4;
		document.form1.q5answer.options[0] = new Option("Please choose...", "na");
		document.form1.q5answer.options[1] = new Option("-----------", "na");
		document.form1.q5answer.options[2] = new Option("Up to 2L/min", "2");
		document.form1.q5answer.options[3] = new Option("Up to 4L/min", "3");
	} else {
		if (document.form1.q2answer.value == "yes") {
			document.form1.prodinfo.style.visibility = "visible";
			document.form1.request.style.visibility = "visible";
			if (document.form1.q3answer.value == "230-50") {
				document.form1.model.value = "KTD6000";
			} else if (document.form1.q3answer.value == "110-60") {
				document.form1.model.value = "KTD6001";
			} else {
				document.form1.model.value = "KTD6006";	
			}
		} else {
			document.form1.q5answer.style.visibility = "visible";
			document.form1.q5ask.value = "What voltage(s) do you require?";
			document.form1.q5answer.options.length = 0;
			document.form1.q5answer.options.length = 5;
			document.form1.q5answer.options[0] = new Option("Please choose...", "na");
			document.form1.q5answer.options[1] = new Option("-----------", "na");
			document.form1.q5answer.options[2] = new Option("230V 50Hz", "230-50");
			document.form1.q5answer.options[3] = new Option("110V 60Hz", "110-60");
			document.form1.q5answer.options[4] = new Option("Switchable", "switch");
		}
	}
}

function q5chosen() {
	document.form1.prodinfo.style.visibility = "hidden";
	document.form1.request.style.visibility = "hidden";
	document.form1.q6ask.value = "";
	if (document.form1.q4answer.value == "low") {
		document.form1.prodinfo.style.visibility = "visible";
		document.form1.request.style.visibility = "visible";
		if (document.form1.q5answer.value == "230-50") {
		 	if (document.form1.q3answer.value == "yes") {
				document.form1.model.value = "KTC6000";
			} else {
				document.form1.model.value = "KTR6000";
			}
		} else if (document.form1.q5answer.value == "110-60") {
			if (document.form1.q3answer.value == "yes") {
				document.form1.model.value = "KTC6001";
			} else {
				document.form1.model.value = "KTR6001";
			}
		} else {
			if (document.form1.q3answer.value == "yes") {
				document.form1.model.value = "KTC6006";
			} else {
				document.form1.model.value = "KTR6006";
			}
		}
	} else {
		if (document.form1.q2answer.value == "yes") {
			document.form1.prodinfo.style.visibility = "visible";
			document.form1.request.style.visibility = "visible";
			if (document.form1.q5answer.value == "2") {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.model.value = "KTD2000";
				} else if (document.form1.q3answer.value == "110-60") {
					document.form1.model.value = "KTD2001";
				} else {
					document.form1.model.value = "KTD2006";	
				}
			} else if (document.form1.q5answer.value == "3") {
				if (document.form1.q3answer.value == "230-50") {
					document.form1.model.value = "KTD3000";
				} else if (document.form1.q3answer.value == "110-60") {
					document.form1.model.value = "KTD3001";
				} else {
					document.form1.model.value = "KTD3006";	
				}
			}
		} else {
			document.form1.q6answer.style.visibility = "visible";
			document.form1.q6ask.value = "What voltage(s) do you require?";
			document.form1.q6answer.options.length = 0;
			document.form1.q6answer.options.length = 5;
			document.form1.q6answer.options[0] = new Option("Please choose...", "na");
			document.form1.q6answer.options[1] = new Option("-----------", "na");
			document.form1.q6answer.options[2] = new Option("230V 50Hz", "230-50");
			document.form1.q6answer.options[3] = new Option("110V 60Hz", "110-60");
			document.form1.q6answer.options[4] = new Option("Switchable", "switch");
		}
	}
}

function q6chosen() {
	document.form1.prodinfo.style.visibility = "visible";
	document.form1.request.style.visibility = "visible";
	if (document.form1.q3answer.value == "yes") {
		if (document.form1.q5answer.value == "2") {
			if (document.form1.q6answer.value == "230-50") {
				document.form1.model.value = "KTC2000";
			} else if (document.form1.q6answer.value == "110-60") {
				document.form1.model.value = "KTC2001";
			} else {
				document.form1.model.value = "KTC2006";
			}
		} else if (document.form1.q5answer.value == "3") {
			if (document.form1.q6answer.value == "230-50") {
				document.form1.model.value = "KTC3000";
			} else if (document.form1.q6answer.value == "110-60") {
				document.form1.model.value = "KTC3001";
			} else {
				document.form1.model.value = "KTC3006";
			}
		}
	} else if (document.form1.q3answer.value == "no") {
		if (document.form1.q5answer.value == "2") {
			if (document.form1.q6answer.value == "230-50") {
				document.form1.model.value = "KTR2000";
			} else if (document.form1.q6answer.value == "110-60") {
				document.form1.model.value = "KTR2001";
			} else {
				document.form1.model.value = "KTR2006";
			}
		} else if (document.form1.q5answer.value == "3") {
			if (document.form1.q6answer.value == "230-50") {
				document.form1.model.value = "KTR3000";
			} else if (document.form1.q6answer.value == "110-60") {
				document.form1.model.value = "KTR3001";
			} else {
				document.form1.model.value = "KTR3006";
			}
		}
	}
}

function gotoProduct() {
	var product = document.form1.product.value.toLowerCase();
	if (product == "ktr") {
		var page = "ktr-chiller.htm";
	}
	if (product == "ktc") {
		var page = "ktc-chiller.htm";
	}
	if (product == "ktd") {
		var page = "ktd-chiller.htm";
	}
	if (product == "kt1") {
		var page = "kt1-chiller.htm";
	}
	if (product == "k1") {
		var page = "k1-chiller.htm";
	}
	if (product == "k3") {
		var page = "k3-chiller.htm";
	}
	if (product == "k4") {
		var page = "k4-chiller.htm";
	}
	if (product == "k6") {
		var page = "k6-chiller.htm";
	}
	if (product == "k9") {
		var page = "k9-chiller.htm";
	}
	
	window.open(page);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//-->

