function openwindow(location, width, height) {
	newwin = window.open(location,"tmpwindow",
	config="width="+width+",height="+height+",toolbar=no,menubar=no,resizable=no,location=no,directories=no,status=no,scrollbars=no");
	if (newwin.focus) newwin.focus();
}

function change_field(id, value, doc) {
	doc.getElementById(id).value = value;
	return false;
}
function submit_form(id, doc) {
	doc.getElementById(id).form.submit();
	return false;
}

<!-- Show a different selection of global gallery images -->
function getGlobalGallery(start, limit) {
	showWorkingHideGallery();
	$.post('/none/ws/updateGlobalGallery/'+start+'/'+limit,
	function(data) {
		$('#globalGallery').replaceWith(data);
		hideWorkingShowGallery();
	});
}

function showWorkingHideGallery() {
	$('#globalGallery').css('display','none');
	$('#working').css('display','block');
}

function hideWorkingShowGallery() {
	$('#working').css('display','none');
	$('#globalGallery').css('display','block');
}