var xmlHttp;

//Will attempt to crate XMLHttpRequest object if the browser supports it.
function verifyBrowser()
{  
	try
	{ 
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();    
	}
	catch (e)
	{    
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); 
			}
			catch (e)
			{        
				alert("Your browser does not support AJAX!");        
				return false;        
			}     
		}    
	} 
}

function sendAttachment()
{
	verifyBrowser();
	var validated = document.getElementById('validated').value;
	var email = document.getElementById('ea').value;
	var scriptPath = "sendattachment.php?validated="+validated + "&email=" + email;
	xmlHttp.open("GET",scriptPath,true);
    xmlHttp.send(null);
}