// javascript snippets

/****************** loadEditWindow(1) **********************/

// this funtion loads an appropriate edit window
// and accepts the page id and the current id of the item that raised the event
function loadEditWindow(page_id,item_id){
	window.open('admin/edit.php?edit='+page_id+'&eid='+item_id,'edit_page_'+page_id,'width=785, height=600, menubars=no, scrollbars=yes');
}

function loadDeleteWindow(page_id,item_id){
	if(confirm('This item will be deleted. NB: You cannot undo delete.')){
		location.href="?delete="+page_id+"&id="+item_id;
	}
}