// JavaScript Document
function GetXmlHttpObject(handler)
{
   var objXMLHttp=null
   if (window.XMLHttpRequest)
   {
       objXMLHttp=new XMLHttpRequest()
   }
   else if (window.ActiveXObject)
   {
       objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
   }
   return objXMLHttp
}

// Will populate data based on input
function getResintype(url,qStr)
{
   if (url.length==0)
   {
       document.getElementById('txtResult').innerHTML="";
       return;
   }
   xmlHttp=GetXmlHttpObject()
   if (xmlHttp==null)
   {
       alert ("Browser does not support HTTP Request");
       return;
   }

   url=url+"?"+qStr;
   url=url+"&sid="+Math.random();
   xmlHttp.onreadystatechange=function()
	{
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   		{
           document.getElementById('txtResult').innerHTML= xmlHttp.responseText;
   		}    
	};
   xmlHttp.open("GET",url,true) ;
   xmlHttp.send(null);
}
function getApplicationGroup(url,qStr)
{
   if (url.length==0)
   {
       document.getElementById('div-app').innerHTML="";
       return;
   }
   xmlHttp=GetXmlHttpObject()
   if (xmlHttp==null)
   {
       alert ("Browser does not support HTTP Request");
       return;
   }

   url=url+"?"+qStr;
   url=url+"&sid="+Math.random();
   xmlHttp.onreadystatechange=function()
	{
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   		{
           document.getElementById('div-app').style.display='';
		   document.getElementById('div-app').innerHTML= xmlHttp.responseText;
   		}    
	};
   xmlHttp.open("GET",url,true) ;
   xmlHttp.send(null);
}
function getGrade(url,qStr)
{
   if (url.length==0)
   {
       document.getElementById('div-grade').innerHTML="";
       return;
   }
   reqHttp=GetXmlHttpObject()
   if (reqHttp==null)
   {
       alert ("Browser does not support HTTP Request");
       return;
   }

   url=url+"?"+qStr;
   url=url+"&sid="+Math.random();
   reqHttp.onreadystatechange=function()
	{
		if (reqHttp.readyState==4 || reqHttp.readyState=="complete")
   		{
           document.getElementById('div-grade').style.display='';
		   document.getElementById('div-grade').innerHTML= reqHttp.responseText;
   		}    
	};
   reqHttp.open("GET",url,true) ;
   reqHttp.send(null);
}
function getGrade2(url,qStr)
{
   if (url.length==0)
   {
       document.getElementById('div-grade2').innerHTML="";
       return;
   }
   reqHttp=GetXmlHttpObject()
   if (reqHttp==null)
   {
       alert ("Browser does not support HTTP Request");
       return;
   }

   url=url+"?"+qStr;
   url=url+"&sid="+Math.random();
   reqHttp.onreadystatechange=function()
	{
		if (reqHttp.readyState==4 || reqHttp.readyState=="complete")
   		{
           document.getElementById('div-grade2').style.display='';
		   document.getElementById('div-grade2').innerHTML= reqHttp.responseText;
   		}    
	};
   reqHttp.open("GET",url,true) ;
   reqHttp.send(null);
}
function getContact(url,qStr)
{
   if (url.length==0)
   {
       document.getElementById('div-grade2').innerHTML="";
       return;
   }
   reqHttp=GetXmlHttpObject()
   if (reqHttp==null)
   {
       alert ("Browser does not support HTTP Request");
       return;
   }

   url=url+"?"+qStr;
   url=url+"&sid="+Math.random();
   reqHttp.onreadystatechange=function()
	{
		if (reqHttp.readyState==4 || reqHttp.readyState=="complete")
   		{
           document.getElementById('divcon').style.display='';
		   document.getElementById('divcon').innerHTML= reqHttp.responseText;
   		}    
	};
   reqHttp.open("GET",url,true) ;
   reqHttp.send(null);
}
