
function goTo(frm, reqCode, action) {
	frm.reqCode.value = reqCode;
	frm.action = action;
	frm.submit();
}
function goToValidate(frm, reqCode, action) {
	var radioCheck = false;
	for (i = 0; i < frm.selectedTireApplication.length; i = i + 1) {
		if (frm.selectedTireApplication[i].checked) {
			radioCheck = true;
		}
	}
	if (!radioCheck) {
		alert("Please select and Application to Search for.");
		frm.reqCode.value = "show";
		frm.action = "dealerLocator.do";
		frm.submit();
	} else {
		if (frm.postalCode.value != "") {
			frm.reqCode.value = reqCode;
			frm.action = action;
			frm.submit();
		} else {
			alert("Please enter a Postal or Zip code for this search.");
			frm.reqCode.value = "show";
			frm.action = "dealerLocator.do";
			frm.submit();
		}
	}
}
function goToWithId(param, frm, reqCode, action) {
	frm.reqCode.value = reqCode;
	frm.id.value = param;
	frm.action = action;
	frm.submit();
}
function goToAction(reqCode, action) {
	document.forms[1].reqCode.value = reqCode;
	document.forms[1].action = action;
	document.forms[1].submit();
}
function onMouse(hlkID, url) {
	thisimage = document.getElementById(hlkID);
	thisimage.src = url;
}
function GP_AdvOpenWindow(theURL, winName, features, popWidth, popHeight, winAlign, ignorelink, alwaysOnTop, autoCloseTime, borderless) { //v2.0
	var leftPos = 0, topPos = 0, autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;
	if (popWidth > 0) {
		features += (features.length > 0 ? "," : "") + "width=" + popWidth;
	}
	if (popHeight > 0) {
		features += (features.length > 0 ? "," : "") + "height=" + popHeight;
	}
	if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
		if (document.all || document.layers || document.getElementById) {
			w = screen.availWidth;
			h = screen.availHeight;
		}
		if (winAlign.indexOf("center") != -1) {
			topPos = (h - popHeight) / 2;
			leftPos = (w - popWidth) / 2;
		}
		if (winAlign.indexOf("bottom") != -1) {
			topPos = h - popHeight;
		}
		if (winAlign.indexOf("right") != -1) {
			leftPos = w - popWidth;
		}
		if (winAlign.indexOf("left") != -1) {
			leftPos = 0;
		}
		if (winAlign.indexOf("top") != -1) {
			topPos = 0;
		}
		features += (features.length > 0 ? "," : "") + "top=" + topPos + ",left=" + leftPos;
	}
	if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) {
		features += ",fullscreen=1";
	}
	if (window["popupWindow"] == null) {
		window["popupWindow"] = new Array();
	}
	var wp = popupWindow.length;
	popupWindow[wp] = window.open(theURL, winName, features);
	if (popupWindow[wp].opener == null) {
		popupWindow[wp].opener = self;
	}
	if (document.all || document.layers || document.getElementById) {
		if (borderless && borderless != "") {
			popupWindow[wp].resizeTo(popWidth, popHeight);
			popupWindow[wp].moveTo(leftPos, topPos);
		}
		if (alwaysOnTop && alwaysOnTop != "") {
			ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
			popupWindow[wp].document.body.onload = function () {
				window.setInterval("window.focus();", 50);
			};
		}
		if (autoCloseTime && autoCloseTime > 0) {
			popupWindow[wp].document.body.onbeforeunload = function () {
				if (autoCloseTimeoutHandle) {
					window.clearInterval(autoCloseTimeoutHandle);
				}
				window.onbeforeunload = null;
			};
			autoCloseTimeoutHandle = window.setTimeout("popupWindow[" + wp + "].close()", autoCloseTime * 1000);
		}
		window.onbeforeunload = function () {
			for (var i = 0; i < popupWindow.length; i++) {
				popupWindow[i].close();
			}
		};
	}
	document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}
function refreshParent(name, param) {
	var item = window.opener.document.getElementById(param);
	var wereHouseName = window.opener.document.getElementById("wareHouseName");
	wereHouseName.value = name;
	item.value = "0";
	window.opener.document.forms[0].submit();
	window.opener.document.forms[0].wareHouseName.value = wareHouseName;
	self.close();
}
function closeit() {
	window.opener.window.location = "quoteTireSearch.do?reqCode=showTireSearch&freshStart=newSession";
	window.self.close();
}
function tabbedPanels() {
	var TabbedPanels1 = new Spry.Widget.TabbedPanels("CASE");
}
function closeWindow() {
	window.close();
}
function sendquote_click(url) {
	if (_ctl1_lblTotalWeight.innerHTML == 0) {
		alert("There are no tires in your quote. Please add tires to the quote before sending. Thank you.");
	} else {
		GP_AdvOpenWindow(url, "sendQuote", "fullscreen=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no", 720, 500, "center", "ignoreLink", "", 0, "");
		return document.MM_returnValue;
	}
}
function setHeight() {
	var h1 = document.getElementById("c1").offsetHeight;
	document.getElementById("c2").style.height = document.getElementById("c1").offsetHeight;
}


