function ShowPagePrint(tId,tNum)
{
	var UrlStr = "./print_page.asp?id="+tId+"&num="+tNum;
	newWindow = window.open(UrlStr,"ShowPrint","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=340,height=150");
}
function ShowPrint(tId,tNum)
{
	var UrlStr = "./print_dialog.asp?id="+tId+"&num="+tNum;
	newWindow = window.open(UrlStr,"ShowPrint_"+tId,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=340,height=150");
}
function ShowPrintSpecial(tId)
{
	var UrlStr = "./print_dialog_special.asp?id="+tId;
	newWindow = window.open(UrlStr,"ShowPrintSpecial_"+tId,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=300");
}
function NextPage(newPage)
{
	document.getElementById("pr_page").value = newPage
	document.all.page_form.submit();
}
function increaseNum(tId)
{
	currentVal = document.getElementById("tId").innerHTML;
	alert(currentVal);
	document.getElementById("tId").innerHTML = currentVal++
}
function clearNum(tId)
{
	document.getElementById("tId").innerHTML = "1-1";
}
function CheckForm()
{
	var regExp;
	var theInput;
	var theResults;

	theInput 	= document.getElementById("name").value;
	if (!theInput) {
      		document.getElementById("name").focus();
		alert("Please provide your full name.");
      		return false;
	}

	theInput 	= document.getElementById("address").value;
	if (!theInput) {
      		document.getElementById("address").focus();
		alert("Please provide your mailing address.");
      		return false;
	}

	theInput 	= document.getElementById("city").value;
	if (!theInput) {
      		document.getElementById("city").focus();
		alert("Please provide your city.");
      		return false;
	}

	theInput 	= document.getElementById("state").value;
	if (!theInput) {
      		document.getElementById("state").focus();
		alert("Please provide your state.");
      		return false;
	}

	regExp 		= /^(\d{5}-\d{4})|(\d{5})$/;
	theInput 	= document.getElementById("zip").value;
	theResults	= regExp.exec(theInput);
	if (!theResults) {
      		document.getElementById("zip").focus();
		alert("Please provide your zip code.");
      		return false;
	}

	regExp 		= /^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
	theInput 	= document.getElementById("email").value;
	theResults	= regExp.exec(theInput);
	if (!theResults) {
      		document.getElementById("email").focus();
		alert("Please provide your valid email address.");
      		return false;
	}

	regExp 		= /^[0-9]{6}$/;
	theInput 	= document.getElementById("confirmationNum").value;
	theInput1 	= document.getElementById("confirmation").value;
	theResults	= regExp.exec(theInput);
	if (!theResults) {
      		document.getElementById("email").focus();
		alert("Please provide the confirmation number.");
      		return false;
	}
	if (theInput != theInput1) {
      		document.getElementById("email").focus();
		alert("The confirmation number does not match.  Please try again.");
      		return false;
	}

	return true;
}
function CheckIntForm()
{
	var regExp;
	var theInput;
	var theResults;

	theInput 	= document.getElementById("name").value;
	if (!theInput) {
      document.getElementById("name").focus();
		alert("Please provide your full name.");
      return false;
	}

	theInput 	= document.getElementById("address").value;
	if (!theInput) {
      document.getElementById("address").focus();
		alert("Please provide your mailing address.");
      return false;
	}

	theInput 	= document.getElementById("city").value;
	if (!theInput) {
      document.getElementById("city").focus();
		alert("Please provide your city.");
      return false;
	}

	theInput 	= document.getElementById("state").value;
	if (!theInput) {
      document.getElementById("state").focus();
		alert("Please provide your state.");
      return false;
	}

	theInput 	= document.getElementById("zip").value;
	if (!theInput) {
      document.getElementById("zip").focus();
		alert("Please provide your postal code.");
      return false;
	}

	theInput 	= document.getElementById("country").value;
	if (!theInput) {
      document.getElementById("country").focus();
		alert("Please provide your country.");
      return false;
	}

	regExp 		= /^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
	theInput 	= document.getElementById("email").value;
	theResults	= regExp.exec(theInput);
	if (!theResults) {
      document.getElementById("email").focus();
		alert("Please provide your valid email address.");
      return false;
	}
	return true;
}
function Trim(trimStr)
{
	trimStr = trimStr.replace( /^\s*/, "" )
	trimStr = trimStr.replace( /\s*$/, "" );
	return trimStr;
}
function ConfirmDelete(evt)
{
	var dialogText = "Are you sure you want to delete this order?\n\n";

	var yes=confirm(dialogText);
	if (yes) {
		return true;
	} else {
		return false;
	}
}
function LimitText(fieldObj,maxChars)
{
	var result = true;
	if (fieldObj.value.length >= maxChars) {
		alert( "You have reach the maximum characters allowed")
		result = false;
	}
	if (window.event) window.event.returnValue = result;
	return result;
}

<!--
if (document.images) {

  homeOn = new Image();
  homeOn.src = "/images/menu_home_hi.gif";
  homeOn.msg = "Driving home";
  homeOff = new Image();
  homeOff.src = "/images/menu_home.gif";

  newsOn = new Image();
  newsOn.src = "/images/menu_news_hi.gif";
  newsOn.msg = "News";
  newsOff = new Image();
  newsOff.src = "/images/menu_news.gif";

  aboutOn = new Image();
  aboutOn.src = "/images/menu_about_hi.gif";
  aboutOn.msg = "About Us";
  aboutOff = new Image();
  aboutOff.src = "/images/menu_about.gif";

  orderOn = new Image();
  orderOn.src = "/images/menu_order_hi.gif";
  orderOn.msg = "Order";
  orderOff = new Image();
  orderOff.src = "/images/menu_order.gif";

  donateOn = new Image();
  donateOn.src = "/images/menu_donate_hi.gif";
  donateOn.msg = "Donate";
  donateOff = new Image();
  donateOff.src = "/images/menu_donate.gif";

  shopOn = new Image();
  shopOn.src = "/images/menu_shop_hi.gif";
  shopOn.msg = "Shop";
  shopOff = new Image();
  shopOff.src = "/images/menu_shop.gif";

  galleryOn = new Image();
  galleryOn.src = "/images/menu_gallery_hi.gif";
  galleryOn.msg = "Gallery";
  galleryOff = new Image();
  galleryOff.src = "/images/menu_gallery.gif";

  tipsOn = new Image();
  tipsOn.src = "/images/menu_tips_hi.gif";
  tipsOn.msg = "Driving tips";
  tipsOff = new Image();
  tipsOff.src = "/images/menu_tips.gif";
}

function img_act(imgName) {
	if (document.images) {
		document [imgName].src = eval(imgName + "On.src");
		window.status = eval(imgName + "On.msg");
	}
}

function img_inact(imgName) {
	if (document.images) {
		document [imgName].src = eval(imgName + "Off.src");
		window.status = "";
	}
}
// -->
