//***********************************************************//
//This function is passed an ID of an object and returns the object
//***********************************************************//
function getObj(id){
	if(document.all)
		return document.all[id];
	else
		return document.getElementById(id);
}
//***********************************************************//
//This function changes the images on mouseover in the top main menu
//The images are named in acertain way for this to work
//***********************************************************//
function changeImage(img, action){
	if(!img.src){img = getObj(img);}
	if(action == "over"){
		var str = img.src.substring(0, img.src.length - 4)
		var ext = img.src.substring(img.src.length-4, img.src.length)
		img.src = str + "over" + ext
	}else if(action == "normal"){
		var str = img.src.substring(0, img.src.length - 8)
		var ext = img.src.substring(img.src.length-8, img.src.length)
		ext = ext.substring(4, 8)
		img.src = str + ext
	}
}



function vQuote(frm){
	if(frm.txtFullName.value == ""){alert("Please enter your full name.");frm.txtFullName.focus();return false;}
	if(frm.txtContactNumber.value == ""){alert("Please enter your contact number.");frm.txtContactNumber.focus();return false;}
	if(frm.txtEmailAddress.value == ""){alert("Please enter your email addres, this must be a valid email.");frm.txtEmailAddress.focus();return false;}
	if(frm.txtFrom.value == ""){alert("Please tell us where the pick up is from.");frm.txtFrom.focus();return false;}
	if(frm.txtTo.value == ""){alert("Please tell us where you are going to.");frm.txtTo.focus();return false;}
}
function vBooking(frm){
	if(frm.txtFullName.value == ""){alert("Please enter your full name.");frm.txtFullName.focus();return false;}
	if(frm.txtContactNumber.value == ""){alert("Please enter your contact number.");frm.txtContactNumber.focus();return false;}
	if(frm.txtEmailAddress.value == ""){alert("Please enter your email addres, this must be a valid email.");frm.txtEmailAddress.focus();return false;}
	if(frm.txtFrom.value == ""){alert("Please tell us where the pick up is from.");frm.txtFrom.focus();return false;}
	if(frm.txtTo.value == ""){alert("Please tell us where you are going to.");frm.txtTo.focus();return false;}
}