	var xmlhttp=false;

	function initRequest() {
    	if(window.XMLHttpRequest) {
    	    try {
    	        xmlhttp = new XMLHttpRequest();
    	    } catch(e) {
    	        xmlhttp = false;
    	    }
    	} else if(window.ActiveXObject) {
    	    try {
    	        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    	    } catch(e) {
    	        try {
    	            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    	        } catch(e) {
    	            xmlhttp = false;
    	        }
    	    }
    	}
	}


	function saveUserData() {

    	initRequest();

    	xmlhttp.onreadystatechange=afterSaveUserData;
    	var url =   'saveuserdata.html?'
                    + 'email=' 			+ escape(df.email.value).replace(/\+/g,'%2B') 
                    //+ '&ch1=' 			+ ((df.cont1.checked)?'1':'0')
                    //+ '&ch2=' 			+ ((df.cont2.checked)?'1':'0')
                    //+ '&ch3=' 			+ ((df.cont3.checked)?'1':'0')
                    + '&title=' 		+ escape(df.ttl.value).replace(/\+/g,'%2B') 
                    + '&fname=' 		+ escape(df.fname.value).replace(/\+/g,'%2B') 
                    + '&lname=' 		+ escape(df.lname.value).replace(/\+/g,'%2B') 
                    + '&suffix=' 		+ escape(df.suffix.value).replace(/\+/g,'%2B') 
                    + '&job_title=' 	+ escape(df.job_title.value).replace(/\+/g,'%2B') 
                    + '&company=' 		+ escape(df.company.value).replace(/\+/g,'%2B') 
                    + '&street=' 		+ escape(df.street.value).replace(/\+/g,'%2B') 
                    + '&city=' 			+ escape(df.city.value).replace(/\+/g,'%2B') 
                    + '&county=' 		+ escape(df.county.value).replace(/\+/g,'%2B') 
                    + '&state=' 		+ df.state.options[df.state.selectedIndex].value
                    + '&zip=' 			+ escape(df.zip.value).replace(/\+/g,'%2B') 
                    + '&country=' 		+ df.country.options[df.country.selectedIndex].value
                    + '&telephone=' 	+ escape(df.telephone.value).replace(/\+/g,'%2B') 
                    + '&fax=' 			+ escape(df.fax.value).replace(/\+/g,'%2B') ;


    	xmlhttp.open("GET",url,true);
    	xmlhttp.send(null);
	
	}

	function loadUserData() {
    	df = document.dataForm;
    	initRequest();
    	xmlhttp.onreadystatechange=afterLoadUserData;
    	var url =   'getuserdata.html?email='+escape(df.email.value).replace(/\+/g,'%2B');
    	xmlhttp.open("GET",url,true);
    	xmlhttp.send(null);
    	return false;
	}

	function afterSaveUserData() {
		if (xmlhttp.readyState==4){	
			if (xmlhttp.status == 200) {
				//alert('come back');
			} else {
				alert("Error during saving your personal information...");
			}
		}
	}

	function afterLoadUserData() {
		if (xmlhttp.readyState==4){	
			if (xmlhttp.status == 200) {
				eval(xmlhttp.responseText);
			} else {
				alert("Error during retriving your personal information...");
			}
		}
	}
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=692,height=569,left = 53,top = -50');");
}

