var xmlHttp

function showUser(str)
{ 
xmlHttp=GetXmlHttpObject(str);
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }        
var url="checkTip.php";
url=url+"?Q1="+document.Tip.Q1.value
url=url+"&Q2="+document.Tip.Q2.value+"&Q3="+document.Tip.Q3.value
url=url+"&Q4="+document.Tip.Q4.value+"&Q5="+document.Tip.Q5.value+"&Q6="+document.Tip.Q6.value
url=url+"&Q7="+document.Tip.Q7.value+"&Q8="+document.Tip.Q8.value+"&Q9="+document.Tip.Q9.value
url=url+"&Q10="+document.Tip.Q10.value;
url=url+"&action=1&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);


}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
   { 
   document.getElementById("percError").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;
}