
function listOnDrop( urlBase, listId) {

	var list 	= document.getElementById( listId );
	var items = list.getElementsByTagName( "li" );
	var args = '';
		
	for( var i = 0; i < items.length; i++ ) {
		args += "&items" + i + "=" + items[i].value;
	}
	var url = urlBase + args;
	var request;
	request = loadAJAX( request );
	var tmp = function() { dragAndDropResponse( request, "status", "Saving" ) };
	var tmp = function() { };
	request.onreadystatechange = tmp;
	request.open("GET", url, true);
	request.send(null);
}

function initializeQuestionList( listname ) {

	var ratingList = document.getElementById( "questions" );
	DragDrop.makeListContainer( ratingList, listname );

	ratingList.onDragOver 	= function() {};
	ratingList.onDragOut 		= function() {};
	ratingList.onDragDrop 	= function() { listOnDrop( 'internalmodquestions.php?mode=move', 'questions'); };

	if( document.getElementById( 'questions' ).offsetHeight )
		var height = document.getElementById( 'questions' ).offsetHeight;
	else if( document.getElementById( 'questions' ).style.pixelHeight )
		var height = document.getElementById( 'questions' ).style.pixelHeight;

	document.getElementById( 'questions' ).style.height 		= ( height + 10 ) + 'px';


}	





function dragAndDropResponse( request, location, message, pid ) {
	if( checkReadyState( request, location, message ) ) {


	}
}
