function Close_Clearbox_Refresh () {
	setTimeout ("window.parent.CB_Close(); window.parent.location='./index.php';", 2500);
}

function Close_Clearbox_Refresh_LATE () {
	setTimeout ("window.parent.CB_Close(); window.parent.location='./index.php';", 5000);
}

function Close_Clearbox () {
	setTimeout ("window.parent.CB_Close();", 2500);
}

function Discard_News (question) {
	var answer = confirm ("" + question + "");
	if (answer) {
		window.parent.CB_Close();
	}
	else {
		return false;
	}
}

function News_Delete (question, id) {
	var answer = confirm ("" + question + "");
	if (answer) {
		window.location="./news.php?m=delete&id=" + id;
	}
	else {
		return false;
	}
}

function Discard_News_Edit (question, id) {
	var answer = confirm ("" + question + "");
	if (answer) {
		window.parent.CB_Close();
	}
	else {
		return false;
	}
}

function Discard_New_Gallery (question) {
	var answer = confirm ("" + question + "");
	if (answer) {
		window.parent.CB_Close();
	}
	else {
		return false;
	}
}

function Delete_Event (id, question) {
	var answer = confirm ("" + question + "");
	if (answer) {
		window.location="./events.php?m=delete&id=" + id;
	}
	else {
		window.parent.CB_Close();
	}
}

function Print (page) {
	var width = (screen.availWidth-880)/2;
	var height = (screen.availHeight-500)/2;
	window.open(page,"Print", "width=880,height=500,menubar=no,location=no,toolbar=no,resizable=no,scrollbars=yes,left=" + width + ",top=" + height + "");
}

function Delete_Image (dir, file, question) {
	var answer = confirm ("" + question + "");
	if (answer) {
		window.location="./gallery.php?m=img_del&dir=" + dir + "&file=" + file;
	}
	else {
		return false;
	}
}
