function fill_combo(ComboID, Obj) 
{ 
	 var combo = document.getElementById(ComboID);
	 var retArr = new Array();
	 var myAjax = new Ajax.Request('getdata.asp?'+Obj.name+'='+Obj.value,
	 {
		method: 'get', 
		onComplete: function(response) { 
			 retArr = response.responseText.split("^");
			 combo.length = 1;
			 for(i = 0; i < (retArr.length/2); i++) {
				combo.options[i+1] = new Option(retArr[2*i+1], retArr[2*i]);
				}
			combo.selectedIndex = 0;
			}
	   }
	);
}


function xmlHttpAx() // Make xml request
{
   var xmlHttp = null;
   try { 
       // Firefox, Opera 8.0+, Safari
       xmlHttp=new XMLHttpRequest();
   }
   catch (e) {
       // Internet Explorer
       try { 
           xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); 
       }
       catch (e) {
          try { 
              xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); 
          }
          catch (e) {
              alert("Your browser does not support AJAX!");
              return false;
          }
       }
    }
    return xmlHttp;
}

function openPage(url)
{
	var w = 785;
	var h = 550;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	args = "top=0,left=" + winl + ",status=no, toolbar=no, menubar=no, scrollbars=yes, location=nos" + ",width="+ w + ",height="+ h;
	window.open(url, "popupPage", args);
}

