function openFullScreen(page, title)
{
	var yes = 1;
	var no = 0;
	
	var menubar = no;
	var scrollbars = yes;
	var locationbar = no;
	var directories = no;
	var resizable = yes;
	var statusbar = no;
	var toolbar = no;
	
	windowprops = "width=" + (window.width) + ",height=" + (window.width)
	+
	",top=0,left=0";
	
	windowprops += (menubar ? ",menubars" : "") +
	(scrollbars ? ",scrollbars" : "") +
	(locationbar ? ",location" : "") +
	(directories ? ",directories" : "") +
	(resizable ? ",resizable" : "") +
	(statusbar ? ",status" : "") +
	(toolbar ? ",toolbar" : "");
	
	window.open(page, title, windowprops);
}

function submitonce(theform)
{
	//if IE 4+ or NS 6+
	if (document.all||document.getElementById)
	{
		//screen thru every element in the form, and hunt down "submit" and "reset"
		for (i=0;i<theform.length;i++)
		{
			var tempobj=theform.elements[i]
			if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
			//disable em
			tempobj.disabled=true
		}
	}
}

function copyToClipBoard(copy, hold)
{
	if (!copy)
	{
		return;
	}
	
	hold.innerText = copy.innerText;
	Copied = hold.createTextRange();
	Copied.execCommand("RemoveFormat");
	Copied.execCommand("Copy");
}

function delconfirm()
{
	var con= confirm("Are you sure you want to cancel this invoice?");
	if (con== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function deltripconfirm()
{
	var con= confirm("Are you sure you want to cancel this booking?");
	if (con== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function deleteconfirm(text)
{
	var con= confirm(text);
	if (con== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function paidconfirm()
{
	var con= confirm("Are you sure this invoice has been paid?");
	if (con== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	win=window.open(mypage,myname,settings);}
	
function confirmDocumentDelete(formIdentifier, message) {
	var confirmation = confirm(message);
	if (confirmation == true)
	{
		var formID = document.getElementById(formIdentifier);
		formID.submit(this);
	}
	return false;
}