
		function delInv(id) {
//			var msg = '<p>Are you sure you want to delete invoice ID#'+id+'?</p><input type="button" value="Yes, delete this" onclick="window.location=\''+baseUrl+'/invoices/delete/'+id+'\'"/>     <input type="button" value="Cancel" onclick="window.location=\''+baseUrl+'/invoices/\'"/>';
//			win = new Window({className: "spread", title: "Confirm", width:200, height:150, destroyOnClose: true, recenterAuto:false}); 
//			win.getContent().update(msg); 
//			win.showCenter();
			window.location=baseUrl+'/invoices/delete/'+id;
		}
		function delHr(id) {
/*
			var msg = '<p>Are you sure you want to delete hour ID#'+id+'?</p><input type="button" value="Yes, delete this" onclick="window.location=\''+baseUrl+'/hours/delete/'+id+'\'"/>     <input type="button" value="Cancel" onclick="window.location=\''+baseUrl+'/hours/\'"/>';
			win = new Window({className: "spread", title: "Confirm", width:200, height:150, destroyOnClose: true, recenterAuto:false}); 
			win.getContent().update(msg); 
			win.showCenter();
*/
			window.location=baseUrl+'/hours/delete/'+id;
		}
		function delExp(id) {
/*
			var msg = '<p>Are you sure you want to delete expense ID#'+id+'?</p><input type="button" value="Yes, delete this" onclick="window.location=\''+baseUrl+'/expenses/delete/'+id+'\'"/>     <input type="button" value="Cancel" onclick="window.location=\''+baseUrl+'/expenses/\'"/>';
			win = new Window({className: "spread", title: "Confirm", width:200, height:150, destroyOnClose: true, recenterAuto:false}); 
			win.getContent().update(msg); 
			win.showCenter();
*/
			window.location=baseUrl+'/expenses/delete/'+id;
		}
		
		function checkAll(field)
		{
			for (i = 0; i < field.length; i++)
			field[i].checked = true ;
		}

		function uncheckAll(field)
		{
			for (i = 0; i < field.length; i++)
			field[i].checked = false ;
		}
		
		function logoutConfirm() {
/*			Dialog.confirm("Are you sure you want to log out?", 
               {width:300, okLabel: "Yes", 
               buttonClass: "myButtonClass",
               id: "myDialogId",
               cancel:function(win) {return true;},
               ok:function(win) {window.location=baseUrl+'/logout'}
              });
*/
//		return true;
			window.location=baseUrl+'/logout'
		}


// from http://www.dustindiaz.com/basement/checkAllDustin.js
function checkAllFields(ref)
{
var chkAll = document.getElementById('checkAll');
var checks = document.getElementsByName('delAnn[]');
var removeButton = document.getElementById('removeChecked');
var boxLength = checks.length;
var allChecked = false;
var totalChecked = 0;
	if ( ref == 1 )
	{
		if ( chkAll.checked == true )
		{
			for ( i=0; i < boxLength; i++ )
			checks[i].checked = true;
		}
		else
		{
			for ( i=0; i < boxLength; i++ )
			checks[i].checked = false;
		}
	}
	else
	{
		for ( i=0; i < boxLength; i++ )
		{
			if ( checks[i].checked == true )
			{
			allChecked = true;
			continue;
			}
			else
			{
			allChecked = false;
			break;
			}
		}
		if ( allChecked == true )
		chkAll.checked = true;
		else
		chkAll.checked = false;
	}
	for ( j=0; j < boxLength; j++ )
	{
		if ( checks[j].checked == true )
		totalChecked++;
	}
}

