// JavaScript Document
		/* Create a new XMLHttpRequest object to talk to the Web server */
		var xmlHttp = false;
		
		/*@cc_on @*/
		/*@if (@_jscript_version >= 5)
		try {
		  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		  try {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (e2) {
			xmlHttp = false;
		  }
		}
		@end @*/
		
		if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
		  xmlHttp = new XMLHttpRequest();
		}

		function callServer(content) {
			
		if(content == 'home')
		{
			  var url = "include/content/home.php";
		}
		else if(content == 'aboutus')
		{
			  var url = "include/content/aboutus.php";
		}
		else if(content == 'price|contact')
		{
			  var url = "include/content/price.php";
		}
		else if(content == 'gallery')
		{
			 var url = "include/content/gallery.php";
			//  var url = "gallery.php";
		}
			if(content != null || content != "" )
			{
				  // Open a connection to the server
				  xmlHttp.open("GET", url, true);
				
				  // Setup a function for the server to run when it's done
				  xmlHttp.onreadystatechange = updatePage;
				
				  // Send the request
				  xmlHttp.send(null);
			  }
		}
		
		
		
		function updatePage() {
			  if (xmlHttp.readyState == 1) {// loadding the content
				document.getElementById('wait').style.display = 'block';	
			  }
			  if (xmlHttp.readyState == 4) {
				var response = xmlHttp.responseText;
				document.getElementById('wait').style.display = 'none';	
				document.getElementById("content_box").innerHTML = response;
			  }
		}



function preloadImages(){
preload_image_object = new Image();
      // set image url
      image_url = new Array();
      image_url[0] = "http://theplowshare.com/images/content/aboutus.jpg";
      image_url[1] = "http://theplowshare.com/images/content/home.jpg";
      image_url[2] = "http://theplowshare.com/images/content/price.jpg";
}
