function tireSizeCalculator()
{
  var sectionWidthOS = document.tsc.sectionWidthOS.value;
  var aspectRatioOS = document.tsc.aspectRatioOS.value;
  var rimDiameterOS = document.tsc.rimDiameterOS.value;
  var speedoErrorMPHOS = document.tsc.speedoErrorMPHOS.value;
  var sectionWidthCS = document.tsc.sectionWidthCS.value;
  var aspectRatioCS = document.tsc.aspectRatioCS.value;
  var rimDiameterCS = document.tsc.rimDiameterCS.value;
	var url = '/cf/tireSizeCalculator.cfm?sectionWidthOS=' + escape(sectionWidthOS) + '&aspectRatioOS=' + escape(aspectRatioOS) + '&rimDiameterOS=' + escape(rimDiameterOS) + '&speedoErrorMPHOS=' + escape(speedoErrorMPHOS) + '&sectionWidthCS=' + escape(sectionWidthCS) + '&aspectRatioCS=' + escape(aspectRatioCS) + '&rimDiameterCS=' + escape(rimDiameterCS);
	http.open("GET", url, true);
	http.onreadystatechange = handleHttpResponse;
	http.send(null);
}
function handleHttpResponse() {
	if (http.readyState == 4)
  { // Split the comma delimited response into an array
		results = http.responseText.split(",");
		document.tsc.overallDiameterOS.value = results[0];
		document.tsc.sectionWidth2OS.value = results[1];
		document.tsc.revPerMileOS.value = results[2];
		document.tsc.overallDiameterCS.value = results[3];
		document.tsc.sectionWidth2CS.value = results[4];
		document.tsc.revPerMileCS.value = results[5];
		document.tsc.speedoErrorMPHCS.value = results[6];
	}
}
function getHTTPObject() {
	var xmlhttp; /*@cc_on
	@if (@_jscript_version >= 5)
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}
	@else
	xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}
	return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object
function processVS() {
  var bSuccess = false;
  if(document.tsc.year && document.tsc.year.value != "") {
    if(document.tsc.make && document.tsc.make.value != "") {
      if(document.tsc.model && document.tsc.model.value != "") {
        bSuccess = true;
      }
    }
  }
  if(!bSuccess) {
    alert('Please make selections in all three fields in the Vehicle Matcher to get results.');
	}
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=320,height=256,left = 680,top = 397');");
}
