function disp_text()
   {
   var w = document.myform.mylist.selectedIndex;
   var selected_text = document.myform.mylist.options[w].value;
  location.href= "index.php?page=cars#" + selected_text;
   }
function openCars(pth) {
           newWin = window.open(pth, "newWindow", "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=650,height=510")
           newWin.focus();
		   }
function openCarssmall(pth) {
           newWin = window.open(pth, "newWindow", "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=308,height=255")
           newWin.focus();
		   }
function isEmpty(form)
{
	
	if (trim(form.name.value) == "") {
	  alert("You must fill in Name!");
	  return false;
	} 
	
	if (trim(form.email.value) == "") {
	  alert("You must fill in Email!");
	  return false;
	}
	var x = trim(form.email.value);
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x)) {
		alert("Invalid Email!");
		return false;
	}
	if (trim(form.phone.value) == "") {
	  alert("You must fill in Phone!");
	  return false;
	} 
	if (trim(form.address.value) == "") {
	  alert("You must fill in Address!");
	  return false;
	} 
	if (trim(form.city.value) == "") {
		alert("You must fill in City!");
		return false;
	}
	if (trim(form.country.value) == "") {
		alert("You must fill in Country!");
		return false;
	}
	if (form.car.value == "0") {
		alert("Pick Up A Car!");
		return false;
	}
	if (form.hour.value == "0") {
		alert("You must fill in Time!");
		return false;
	}
	if (trim(form.period.value) == "" || trim(form.period.value) == "Days") {
		alert("You must fill in Period!");
		return false;
	}
	return true;
}
function trim(str)
{
   return str.replace(/^\s+|\s+$/g,'');
}