// JS support for general Zenphoto use

function toggle(x) {
	jQuery('#'+x).toggle();
}

function confirmDeleteAlbum(url) {
	if (confirm(deleteAlbum1)) {
		if (confirm(deleteAlbum2)) {
			window.location = url;
		}
	}
}

function confirmDeleteImage(url) {
	if (confirm(deleteImage1)) {
		if (confirm(deleteImage2)) {
			window.location = url;
		}
	}
}

function confirmRestoreImage(url) {
	if (confirm(restoreImage1)) {
		if (confirm(restoreImage2)) {
			window.location = url;
		}
	}
}

function confirmDelete(url,msg) {
	if (confirm(msg)) {
		window.location = url;
	}
}

function launchScript(script, params) {
	window.location = script+'?'+params.join('&');
}

function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}


