function confirmDelete(tid, cid) { if (cid == -1) { url = "./?act=dele&tid=" + tid; msg = "You are about to delete a WHOLE THREAD.\nDeleting is NOT reversible.\n\nAre you sure you wish to continue?" } else { url = "./?act=dele&tid=" + tid + "&cid=" + cid; msg = "You are about to delete a message.\nDeleting is NOT reversible.\n\nAre you sure you wish to continue?" } if (window.confirm(msg)) { document.location = url; return true; } }