function getXMLHttpRequest () {
	try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {};
	try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {};
	try { return new XMLHttpRequest(); } catch(e) {};
	return null;
}

function clearDropdown (select) {
	select.options.length = 0;
}
function fillDropdown (select, arr, delimiter) {
	for( i=0; i < arr.length; i++ ){
		tmp = arr[i].split(delimiter);
		opt = new Option(tmp[1], tmp[0]);
		select.options[select.options.length] = opt;
	}
}