function set_ajax_obj() {
	var xmlhttp;	
	if (window.XMLHttpRequest)
	  {
	  // code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else if (window.ActiveXObject)
	  {
	  // code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	else
	  {
	  alert("Your browser does not support XMLHTTP!");
	  }
	return xmlhttp;
}
/// Corporate pages Function
function Corporate_pages(action) {
	//alert(action);
	var url = "";
	if(action == 'About_A3Logics') {
		url = "about_us.php?action=about";
	}
	if(action == 'ourstarength') {
		url = "about_us.php?action=starength";
	}
	if(action == 'careers') {
		url = "about_us.php?action=careers";
	}
	if(action == 'people') {
		url = "about_us.php?action=people";
	}
	if(action == 'socialresponsbility') {
		url = "about_us.php?action=CSR";
	}
	if(action == 'contact_us') {
		url = "about_us.php?action=contact";
	}
	if(action == 'get_in_touch') {
		url = "about_us.php?action=getintouch";
	}
	/*if(action == 'getintouch') {
		url = "get_in_touch.php?action=contact";
	}*/
	xmlhttp = set_ajax_obj();
			
	xmlhttp.open("GET", url,true);
	xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) 
				{
				//alert(xmlhttp.responseText);
				document.getElementById('page_id').innerHTML= xmlhttp.responseText;
				}
	}
	xmlhttp.send(null);
}

/// Technology pages function

function Technology_pages(action) {
	alert(action);
	var url = "";
	if(action == 'Microsoft') {
		url = "microsoft_content.php?page=microsoft";
	}
	if(action == 'Java') {
		url = "microsoft_content.php?page=java";
	}
	if(action == 'Lamp') {
		url = "microsoft_content.php?page=lamp";
	}
	if(action == 'J2SE') {
		url = "microsoft_content.php?page=J2SE";
	}
	
	xmlhttp = set_ajax_obj();
	xmlhttp.open("GET", url,true);
	xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) 
				{
				//alert(xmlhttp.responseText);
				document.getElementById('tecnology').innerHTML= xmlhttp.responseText;
				}
	}
	xmlhttp.send(null);
}
/// Services pages functions goes here
function Sevices_page(action) {
	//alert(action);
	var url = "";
	if(action == 'application_development') {
		url = "services_content.php?page=appdevelopment";
	}
	if(action == 'application_maintenance') {
		url = "services_content.php?page=application_maintenance";
	}
	if(action == 'kpo') {
		url = "services_content.php?page=kpo";
	}
	if(action == 'e-governance') {
		url = "services_content.php?page=e-governance";
	}
	if(action == 'quality_assurance') {
		url = "services_content.php?page=quality_assurance";
	}
	if(action == 'data_center_management') {
		url = "services_content.php?page=data_center_management";
	}
	if(action == 'data_base_management') {
		url = "services_content.php?page=data_base_management";
	}
	if(action == 'integration_services') {
		url = "services_content.php?page=integration_services";
	}
	xmlhttp = set_ajax_obj();
			
	xmlhttp.open("GET", url,true);
	xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) 
				{
				//alert(xmlhttp.responseText);
				document.getElementById('services_id').innerHTML= xmlhttp.responseText;
				}
	}
	xmlhttp.send(null);
}

///// code for job details page

function job_details(action,id) {
	//alert(action);
	//alert(id);
	
	var url = "";
	if(action == 'jobsdesc') {
		url = "jobs_desc.php?id="+id;
	}
	xmlhttp = set_ajax_obj();
	xmlhttp.open("GET", url,true);
	xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) 
				{
				//alert(xmlhttp.responseText);
				document.getElementById('jobsid').innerHTML= xmlhttp.responseText;
				}
	}
	xmlhttp.send(null);
}

/// code for white papers details
function whitepapers_details(action,id) {
	//alert(action);
	//alert(id);
	
	var url = "";
	if(action == 'whitepaperdesc') {
		url = "whitepapers_desc.php?id="+id;
	}
	xmlhttp = set_ajax_obj();
	xmlhttp.open("GET", url,true);
	xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) 
				{
				//alert(xmlhttp.responseText);
				document.getElementById('whitepapers').innerHTML= xmlhttp.responseText;
				}
	}
	xmlhttp.send(null);
}

function paging_basic(type,pageno){
	
	xmlhttp=new XMLHttpRequest();
	var url = "jobs_ajax.php?type="+type+"&pageno="+pageno;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	//alert(url);
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200);
	    {
	    document.getElementById("jobsid").innerHTML=xmlhttp.responseText;
	    }
	  }
	
	 }
