function ICHidePhotoCatalog() {
	var catlayer = document.getElementById("photocataloglayer");
  if (catlayer.style.display == 'inline') {
		catlayer.style.display = 'none';
    return;
	}
}
function doPhotoUpload(fnam, bURL) {
	progdlg.show();
	var theUpload;
	if (bURL) {
		theUpload = '/ic/photobook/uploadurl.jsp';
	} else {
	 theUpload = '/ic/photobook/upload.jsp';
	 document.getElementById("photocataloglayer").style.display = 'none';
	}
	 
	dojo.io.iframe.send({
		url: theUpload,
		method: "post",
		handleAs: "json",
		form:   fnam,
		load: function(data, ioArgs){
			var imgin = data.uorg;
			if (imgin) {
				ICTogglePhotoSelect(imgin,false);
			}
			progdlg.hide();
			fnam.reset();
		},
		timeoutSeconds: 60,
		error: function(data){
			progdlg.hide();
			alert(data);
		}
	});
	if (bURL) {
		ICHidePhotoCatalog();
	}
	return false;
} 

function doPhotoUploadClassic() {
//	var theform = dojo.byId("uploadclassic");
	doPhotoUpload(document.forms["uploadformclassic"],false);
 	return false;
}

function abortphoto() {
	if ( photorequest != null ) {
		photorequest.abort();
	}
}
