function checkSelect(){
 
 
var optionCounter;
for (optionCounter = 0; optionCounter < window.document.contactForm.foundwebsite.length;optionCounter++)
{
   if(window.document.contactForm.Txtwebsite.options[optionCounter].selected){
	   if(window.document.contactForm.Txtwebsite.options[optionCounter].text == 'Other'){
			P7_swapClass(0,'other','showB','hideB','div');
			//alert(window.document.ContactForm.foundwebsite.options[optionCounter].text);
	   }else{
	   		//alert(window.document.ContactForm.foundwebsite.options[optionCounter].text);
	   		P7_swapClass(0,'other','hideB','showB','div');
	   }
   }
}
 
 
}


if (document.images)
{
  pic1= new Image(125,41); 
  pic1.src="images/menu-carservices&repairs-ov.jpg"; 

  pic2= new Image(125,41); 
  pic2.src="images/menu-contact&booking-ov.jpg"; 

  pic3= new Image(125,41); 
  pic3.src="images/menu-fleetservice-ov.jpg"; 
  
  pic4= new Image(125,41); 
  pic4.src="images/menu-pricing&payment-ov.jpg"; 
  
  pic5= new Image(125,41); 
  pic5.src="images/menu-staff&employment-ov.jpg"; 
}

function expandText(id){

child = document.getElementById(id)

if (child == null)

return;

else

{

if (child.className == 'hide')

{

child.className = 'show';

} else

{

child.className = 'hide';

}

}

}







function expandText1(id){

child = document.getElementById(id)

if (child == null)

return;

else

{

if (child.className == 'hide')

{

child.className = 'show';
document.getElementById("footer").style.top  = '1850px';


} else

{

child.className = 'hide';
document.getElementById("footer").style.top  = '1200px';

}

}

}







function verify() {

 Name = document.getElementById("Name");

 Check = document.getElementById("Check");

 TxtHome_or_Company_Address = document.getElementById("TxtHome_or_Company_Address");

 emailPattern = /^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$/		

 Email = document.getElementById("Email"); 

 TxtPhone_1 = document.getElementById("TxtPhone_1"); 
 
 Txtwebsite = document.getElementById("Txtwebsite"); 
 
//check if radio button selected
myOption = -1;
for (i=document.contactForm.type.length-1; i > -1; i--) {
if (document.contactForm.type[i].checked) {
myOption = i; i = -1;
}
}


/*if(Name.value != Check.value){

alert("Your Name Does not match: "+ Name.value);

 return false;

}
else*/ if(!Txtwebsite.value){
alert("Please fill in how you found our website");
return false;
}

else if (myOption == -1) {
alert("You must select an enquiry type - booking or quote");
return false;
}

else if(!Name.value){
alert("Please fill in your name");
return false;
}

else if(!TxtHome_or_Company_Address.value){
alert("Please fill in your Home or Company Address");
return false;
}

else if(!TxtPhone_1.value){
alert("Please fill in your phone number");
return false;
}

else if(!emailPattern.test(Email.value)){
alert("Please Kindly Enter A valid Email Address");
return false;
}

else {
return true;
}

}



function exists(inputValue) {

var aCharExists = false

// Step through the inputValue, using the charAt()

// method to detect non-space characters.

for (var i=0; i<=inputValue.length; i++) {

if (inputValue.charAt(i) != " " && inputValue.charAt(i) != "") {

aCharExists = true

break

}

}

return aCharExists

}
