<!--
var xmlhttp;
var stt;
var stts;
var data;
var form1;

function check_user(form1, form2)
{
	var passed=check(form1, form2);
	if(passed==false)
		return false;
//	else
//		document.enrollmentform.submit();
	
	xmlhttp=null;
	
    var f=form1.owner_name.value;
	var l=form1.owner_lname.value;
/*
	var p1=form1.home_phone.value;
	var p2=form1.work_phone.value;
	var p3=form1.cell_phone.value;

	var f=document.enrollmentform.owner_name.value;
	var l=document.enrollmentform.owner_lname.value;
	var p1=document.enrollmentform.home_phone.value;
	var p2=document.enrollmentform.work_phone.value;
	var p3=document.enrollmentform.cell_phone.value;
*/
	var qstr="?f="+f+"&l="+l;
/*
    qstr=qstr+"&p1="+p1;
	if(p2 != "")
		qstr=qstr+"&p2="+p2;
	if(p3 != "")
		qstr=qstr+"&p3="+p3;
*/
//	var url="https://secure.thepawmankato.com/contact_us/functions/check_for_owner.php?"+qs;
//	var url="http://www.thepawmankato.com/contact_us/functions/check_for_owner.php"+qstr;
	var url="check_for_owner.php"+qstr;
	
	if (window.XMLHttpRequest)
	{// code for all new browsers
		xmlhttp=new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{// code for IE5 and IE6
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp!=null)
	{
		xmlhttp.onreadystatechange=state_Change;
		xmlhttp.open("GET", url, true);
		xmlhttp.send(null);
	}
	else
	{
		alert("Your browser does not support XMLHTTP.");
	}
}

function state_Change()
{
	var stt=xmlhttp.readyState;
	if(xmlhttp.readyState==4)
	{// 4 = "loaded"
		var stts=xmlhttp.status;
		if(xmlhttp.status==200)
		{// 200 = OK
			var data=xmlhttp.responseText.split(";\n");
			if(data[0] != "")
			{
//				var alrt=document.enrollmentform.owner_exists.value;
//				alert(alrt);
                var owner=data[0].split(",");
                var alrt="If you are "+owner[0];
                if(owner.length > 1)
                {
                    alrt=alrt+" with the pet(s):";
                    for(var i=1; i<owner.length; i++)
                        alrt=alrt+"\n- "+owner[i];
                }
                alrt=alrt+"\nWe already have you on record.";
                alrt=alrt+"\nContinue anyway?";
                var response=confirm(alrt);
                if(response==true)
                {
                    document.enrollmentform.submit();
                }
            }
			else
            {
				document.enrollmentform.submit();
            }
		}
		else
			alert("Problem retrieving data");
	}
}
-->
