var xmlhttp

function sendMail()
{
//alert("test");

xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  
var fullName=document.getElementById('fullName').value;
var email=document.getElementById('email').value;
var inquiry=document.getElementById('inquiry').value;
var comments=document.getElementById('comments').value;
var security_code=document.getElementById('security_code').value;
if(fullName=="")
{
	document.getElementById('fullName1').style.color="red";
	document.getElementById('fullName').focus();
	return false;
}
if(email=="")
{
	document.getElementById('email1').style.color="red";
	document.getElementById('email').focus();
	return false;
}
if(inquiry=="")
{
	document.getElementById('inquiry1').style.color="red";
	document.getElementById('inquiry').focus();
	return false;
}
if(security_code=="")
{
	document.getElementById('security_code1').style.color="red";
	document.getElementById('security_code').focus();
	return false;
}

else
{
var url="sendMail.php";
url=url+"?fullName="+fullName+"&email="+email+"&inquiry="+inquiry+"&comments="+comments+"&security_code="+security_code;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

}




// start get quote page

function sendMailQuote()
{
//alert("test");

xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  
var firstName=document.getElementById('firstName').value;
var lastName=document.getElementById('lastName').value;
var email=document.getElementById('email').value;
var inquiry=document.getElementById('inquiry').value;
var phone=document.getElementById('phone').value;
var company=document.getElementById('company').value;
var security_code=document.getElementById('security_code').value;

var comments=document.getElementById('comments').value;
if(firstName=="")
{
	document.getElementById('firstName1').style.color="red";
	document.getElementById('firstName').focus();
	return false;
}
if(lastName=="")
{
	document.getElementById('lastName1').style.color="red";
	document.getElementById('lastName').focus();
	return false;
}
if(email=="")
{
	document.getElementById('email1').style.color="red";
	document.getElementById('email').focus();
	return false;
}
if(inquiry=="")
{
	document.getElementById('inquiry1').style.color="red";
	document.getElementById('inquiry').focus();
	return false;
}

if(phone=="")
{
	document.getElementById('phone1').style.color="red";
	document.getElementById('phone').focus();
	return false;
}
if(security_code=="")
{
	document.getElementById('security_code1').style.color="red";
	document.getElementById('security_code').focus();
	return false;
}
else
{
var url="sendMailQuote.php";
url=url+"?firstName="+firstName+"&lastName="+lastName+"&email="+email+"&inquiry="+inquiry+"&phone="+phone+"&company="+company+"&comments="+comments+"&security_code="+security_code;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

}

function valid_conact()
{
	var fName=document.getElementById('fName').value;
	var lName=document.getElementById('lName').value;
	var email=document.getElementById('email').value;
	var Address=document.getElementById('Address').value;
	var City=document.getElementById('City').value;
	var State=document.getElementById('State').value;
	var Zip=document.getElementById('Zip').value;
	var Country=document.getElementById('Country').value;
	var Phone=document.getElementById('Phone').value;
	var Availability=document.getElementById('Availability').value;
	var Skills=document.getElementById('Skills').value;
	var Position=document.getElementById('Position').value;
	var Desired=document.getElementById('Desired').value;
	var Experience=document.getElementById('Experience').value;
	var Upload=document.getElementById('Upload').value;
	
	var security_code=document.getElementById('security_code').value;
	
	if(fName=="")
	{
		//document.getElementById('fName1').style.color="red";
		alert("Enter First Name.");
		document.getElementById('fName').focus();
		return false;
	}
	if(lName=="")
	{
		//document.getElementById('lName1').style.color="red";
		alert("Enter Last Name.");
		document.getElementById('lName').focus();
		return false;
	}
	if(email=="")
	{
		//document.getElementById('email1').style.color="red";
		alert("Enter Email.");
		document.getElementById('email').focus();
		return false;
	}
	if(State=="")
	{
		//document.getElementById('State1').style.color="red";
		alert("Enter State.");
		document.getElementById('State').focus();
		return false;
	}
	if(Country=="")
	{
		//document.getElementById('Country1').style.color="red";
		alert("Enter Country.");
		document.getElementById('Country').focus();
		return false;
	}
	if(Phone=="")
	{
		//document.getElementById('Phone1').style.color="red";
		alert("Enter Phone Number.");
		document.getElementById('Phone').focus();
		return false;
	}
	if(Availability=="")
	{
		//document.getElementById('Availability1').style.color="red";
		alert("Enter Availability.");
		document.getElementById('Availability').focus();
		return false;
	}
	if(Skills=="")
	{
		//document.getElementById('Skills1').style.color="red";
		alert("Enter Skills.");
		document.getElementById('Skills').focus();
		return false;
	}
	if(Position=="")
	{
		//document.getElementById('Position1').style.color="red";
		alert("Enter Desired Position.");
		document.getElementById('Position').focus();
		return false;
	}
	if(Upload=="")
	{
		//document.getElementById('Upload1').style.color="red";
		alert("Upload Resume.");
		document.getElementById('Upload').focus();
		return false;
	}
	if(security_code=="")
	{
		//document.getElementById('security_code1').style.color="red";
		alert("Upload Resume.");
		document.getElementById('security_code').focus();
		return false;
	}
	
	else
	{
	document.getElementById('main_tab').style.display="none";	
	document.getElementById('main_tab_prv').style.display="block";
	
	document.getElementById('fName2').innerHTML=document.getElementById('fName').value;
	document.getElementById('lName2').innerHTML=document.getElementById('lName').value;
	document.getElementById('email2').innerHTML=document.getElementById('email').value;
	
	document.getElementById('Address2').innerHTML=document.getElementById('Address').value;
	document.getElementById('City2').innerHTML=document.getElementById('City').value;
	document.getElementById('State2').innerHTML=document.getElementById('State').value;
	
	document.getElementById('Zip2').innerHTML=document.getElementById('Zip').value;
	document.getElementById('Country2').innerHTML=document.getElementById('Country').value;
	document.getElementById('Phone2').innerHTML=document.getElementById('Phone').value;
	document.getElementById('Availability2').innerHTML=document.getElementById('Availability').value;
	
	document.getElementById('Skills2').innerHTML=document.getElementById('Skills').value;
	document.getElementById('Position2').innerHTML=document.getElementById('Position').value;
	document.getElementById('Desired2').innerHTML=document.getElementById('Desired').value;
	document.getElementById('Experience2').innerHTML=document.getElementById('Experience').value;

}

}

function show_conact()
{
	document.getElementById('main_tab').style.display="block";	
	document.getElementById('main_tab_prv').style.display="none";
	
}

// end carrier page

// for get quote form 


function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
  }
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
