// JavaScript Document
var xmlHttp;
function createXmlHttp()
{
	if (window.ActiveXObject)
	{
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");		
	}
	else if (window.XMLHttpRequest)
	{
		xmlHttp=new XMLHttpRequest();		
	}	
}
//////////////////////////////////////////////////////////////////////////////////////////////////////²úÆ·Àà±ð
function getClass1()
{
  var selectObj = document.getElementById("pid");
  if(selectObj.value!="")
   {
	 //alert(document.getElementById("class1").value)
     createXmlHttp();
	 var url="getclass.asp?pid="+escape(selectObj.options[selectObj.selectedIndex].value);

	 xmlHttp.open("Get",url,true);
	 xmlHttp.onreadystatechange=getXqOk1;
	 //xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	 xmlHttp.send(null);
   }
    //getPinpai(document.getElementById("class1").value);			
}
function getXqOk1()
{
	if(xmlHttp.readystate==4)
	{				
		if (xmlHttp.status==200)
		{
			 var response = xmlHttp.responseText;
			try{
				var classObj = document.getElementById("sclass2");
			//	alert(classObj.innerHTML);
				classObj.innerHTML=response;
				getPinpai()
			  }
			catch(exception){}
		}
	}
}
function getPinpai()
{
   createXmlHttp();
   var pids=document.getElementById("pid").value;
   var url1="getpinpai.asp?pid="+pids;
   xmlHttp.open("Get",url1,true);
   xmlHttp.onreadystatechange=getpinpai1;
	 //xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	 xmlHttp.send(null);
}
function getpinpai1()
{
	if(xmlHttp.readystate==4)
	{				
		if (xmlHttp.status==200)
		{
			 var response1 = xmlHttp.responseText;
			//alert(response);
			try{
				var classObj1 = document.getElementById("spinpai");
			//	alert(classObj.innerHTML);
				classObj1.innerHTML=response1;
			  }
			catch(exception){}
		}
	}
}
