function popup(url,width,height){
	if(!width){width="800";}
	if(!height){height="600";}
	window.open(url,'mywindow','width='+width+',height='+height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}
function updateGalleryQueue(galID){
	var xmlHttpReq = false;
	if (window.XMLHttpRequest) {
		xmlHttpReq = new XMLHttpRequest();
	}else if (window.ActiveXObject) {
		xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	url="/gallery/include/galleryQueue.php";
	ulID=(document.getElementById(galID).parentNode.id);
	qStr=document.getElementById(ulID+"_order").value;
	qStr+="&name="+ulID+"&table="+ulID;
	xmlHttpReq.open('POST', url+"?"+qStr, true);
	xmlHttpReq.onreadystatechange = function() {
		if (xmlHttpReq.readyState == 4) {
			var response=xmlHttpReq.responseText;
			if(response!=""){eval(response);}
		}
	}
	xmlHttpReq.send(null);
}
