var xhr = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");

var qjList = null;

function initQuickJump( theList ) {
	if( theList.options.length == 2 && (xhr.readyState == 0 || xhr.readyState == 4) ) {
		qjList = theList;
		xhr.open('get', '/includes/ajax_quickJumpList.php');
		xhr.onreadystatechange = fillQuickJumpList;
		xhr.send(null);
	}
}

function fillQuickJumpList() {
	if( xhr.readyState == 4 && xhr.status == 200 ) {
		qjList.options.length = 0;
		qjList.options[0] = new Option( "  ---- Select a Game! ----", "" );

		var options = xhr.responseXML.getElementsByTagName( 'game' );
		for( i = 0; i < options.length; i++ ) {
			qjList.options[qjList.options.length] = new Option( options[i].getAttribute('title'), options[i].getAttribute('url') );
		}
	}
}

