function showcase(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	
		if(ajaxRequest.readyState == 4){
			
			document.getElementById("showcase").innerHTML = ajaxRequest.responseText;
			
			document.getElementById("1").style.display="none";
						document.getElementById("2").style.display="none";
									document.getElementById("3").style.display="none";
												document.getElementById("4").style.display="none";
														document.getElementById("5").style.display="none";
  



	//Effect.Appear('1',{duration:1.0});
//	Effect.Appear('2',{duration:2.0});
//	Effect.Appear('3',{duration:3.0});
//	Effect.Appear('4',{duration:4.0});
//	Effect.Appear('5',{duration:5.0});

//$("div:hidden").fadeIn("slow");
//$("div:hidden").show("slow");
//$("div:hidden").slideDown("slow");

$("#1").show("slow");
$("#2").show("slow");
$("#3").show("slow");
$("#4").show("slow");
$("#5").show("slow");


 




		}
	}





	var queryString =  "?(Math.random()*1000)";
  



	ajaxRequest.open("POST", "html/spotlight.php" + queryString , true);

	ajaxRequest.send(null); 

}
//-->
  
function changepic(picid,id){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	
		if(ajaxRequest.readyState == 4){
			document.getElementById("mainpic").style.display="none";
			document.getElementById("mainpic").style.border="solid 4px white";
			document.getElementById("mainpic").src = ajaxRequest.responseText;
			document.getElementById("mainpic").style.display="";
		

		}
	}
	//document.getElementById("mainpic").style.border="none";
	//document.getElementById('mainpic').src="images/ajax-loader.gif";
	
	var picid = picid;
	var id = id;

	var queryString = "?picid=" + picid + "&id=" + id; 
	

	//var queryString = "?pagenumber=" + pagenumber + "&loname=" + loname + "&lophone=" + lophone + "&loemail" + loemail;
  



	ajaxRequest.open("GET", "html/getmainpic.php" + queryString, true);

	ajaxRequest.send(null); 

}


function morphit(th1){
	$("th1").morph('height:110%; width:110%;', {duration:.3});

	
	}
//-->
  

////////////////////////////////////////////////////////////////////////////////////////////////


function gettestimonials(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	
		if(ajaxRequest.readyState == 4){
			var tes = document.getElementById("testimonials");
//			alert("here");
			tes.innerHTML = ajaxRequest.responseText;
			
//			tes.style.minHeight="200px";
//			tes.style.display="none";
						
	//Effect.Appear('testimonials',{duration:1.0});
	//$("div:hidden:first").fadeIn("slow");          Caused hidden div blocks to be dosplayed in IE


		}
	}
 
//alert("location.pathname = " + location.pathname);
    var root = (location.pathname.indexOf("html") != -1)? '' : 'html/';
	var call = root + "used-car-customer-testimonials.php";
	ajaxRequest.open("GET", call, true);

	ajaxRequest.send(null); 

}
//-->


//##############   MAIN PIC ARRAY ######################//



function mainpicarray(position,id){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	
		if(ajaxRequest.readyState == 4){
		document.getElementById("middlepic").innerHTML = ajaxRequest.responseText;
			//document.getElementById("middlepic").style.display="";
			
//var showthepic = "document.getElementById('middlepic').value=" +  ajaxRequest.responseText;		
			
			//document.getElementById("middlepic").innerHTML = ajaxRequest.responseText;
			//Effect.Appear('showpic',{duration:2.0});
	//		setTimeout(showthepic,2000);
			
			}
		}
	
//document.getElementById("middlepic").style.display="none";
 //document.getElementById("middlepic").style.display="none";
			//document.getElementById("middlepic").innerHTML="<img  style='margin-top:150px' src='images/ajax-loader.gif'>";
			
var position = position;

var id = id;

var queryString = "?position=" + position + "&id=" + id; 
	

	ajaxRequest.open("GET", "html/mainpicarray.php" + queryString , true);

	ajaxRequest.send(null);

}
//-->

function testme(testit){
var testit = testit;
alert(testit);
}

//##############  CHANGE MAIN PIC FROM THUMBS ######################//



function changemainpic(thumbpicid,id){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	
		if(ajaxRequest.readyState == 4){

			document.getElementById("showpic").src = ajaxRequest.responseText;
			//document.getElementById("middlepic").innerHTML = ajaxRequest.responseText;
			//Effect.Appear('showpic',{duration:2.0});
		//	Effect.Appear('showpic',{duration:1.0})
			//var showeffect = "Effect.Appear('showpic',{duration:1.0})";
			//setTimeout(showeffect,1000);
			
	
		}
		}
			
	//		document.getElementById("showpic").style.border="none";
	
// document.getElementById("showpic").src="images/ajax-loader.gif";

var thumbpicid = thumbpicid;

var id = id;

var queryString = "?thumbpicid=" + thumbpicid + "&id=" + id; 
	

	ajaxRequest.open("GET", "html/changethumbpic.php" + queryString , true);

	ajaxRequest.send(null);

}
//-->


//##############  CHANGE  THUMBS ######################//



function nextthumbs(eight,id){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	
		if(ajaxRequest.readyState == 4){
			//document.getElementById("thumbs").style.display="none";

			document.getElementById("thumbs").innerHTML = ajaxRequest.responseText;
			//document.getElementById("middlepic").innerHTML = ajaxRequest.responseText;
			//Effect.Appear('showpic',{duration:2.0});
			//Effect.Appear('thumbs',{duration:1.0})
			//var showeffect = "Effect.Appear('showpic',{duration:1.0})";
			//setTimeout(showeffect,1000);
			
	
		}
		}
		
 //document.getElementById("thumbs").style.display="none";
	//		document.getElementById("showpic").style.border="none";
	
// document.getElementById("showpic").src="images/ajax-loader.gif";

var eight = eight;
var id = id
var queryString = "?eight=" + eight + "&id=" + id; 
	

	ajaxRequest.open("GET", "html/nextthumbs.php" + queryString , true);

	ajaxRequest.send(null);

}
//-->





function OtherFunk() {

var othervalue = document.getElementById("hearofus").value;

if(othervalue == "Other"){
document.getElementById("otherinput").style.display="";
document.getElementById("otherinput").select();

}
else{
document.getElementById("otherinput").style.display="none";
}


}