// JavaScript Document

var xmlHttp


function SubmitForm(theForm)
{
var why = "";



var name = theForm.name.value.replace(/[&]/g, 'and');
//alert("1");
var major = theForm.major.value.replace(/[&]/g, 'and');
var email1 = theForm.email1.value.replace(/[&]/g, 'and');
var phone = theForm.phone.value.replace(/[&]/g, 'and');
	
var address = theForm.address.value.replace(/[&]/g, 'and');
	//why += checkPhone(Time, "Time: ");
var city = theForm.city.value.replace(/[$]/g, 'and');
var state = theForm.state.value.replace(/[$]/g, 'and');
var zip = theForm.zip.value.replace(/[$]/g, 'and');
alert("Hello");
var country = theForm.country.value.replace(/[$]/g, 'and');

   if (why != "") {
       alert(why);
       return false;
    }
	
	else{
		
		//alert("hello");
		
		xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  		{
  alert ("Your browser does not support AJAX!");
  return;
  		} 
var url="submit_transfer.php";
//alert("1!");
url=url+"?name="+name;
//alert("2!");
url=url+"&major="+major;
//alert("3!");
url=url+"&email1="+email1;
//alert("5!");
url=url+"&phone="+phone;
//alert("6!");
url=url+"&address="+address;
//alert("8!");
url=url+"&city="+city;
//alert("9!");
url=url+"&state="+state;
//alert("9!");
url=url+"&zip="+zip;
//alert("9!");
url=url+"&country="+country;
//alert("9!");


url=url+"&sid="+Math.random();

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET", url ,true);
xmlHttp.send(null);
//alert("I got this far!");
	}

}


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

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}



