<!-- hide this script from non-javascript-enabled browsers
/* Function that displays status bar messages. */
function MM_displayStatusMsg(msgStr)  { //v3.0
status=msgStr; document.MM_returnValue = true;
}

function MM_findObj(n, d) { //v3.0
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

/* Functions that swaps images. */
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function showUserPopup(URL, height, width)	
{
	day = new Date();
	id = day.getTime();
	window.open(URL, ''+id, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width='+width+',height='+height+',left=400,top=275');
}

function selectElement(element) {
    element.className = 'selected-cell';
}

function unselectElement(element) {
    element.className = 'Cell_Unselected';
}

function selectLeftMenuElement(element) {
    element.className = 'LeftMenuLink-Selected';
}

function unselectLeftMenuElement(element) {
    element.className = 'LeftMenuLink-Unselected';
}

function gotoUrl(url) {
	window.location.href = url;
}

function createVariationRequest(bookingID, isThisOriginalBooking) {
	var Yn = false;
	
	if (isThisOriginalBooking.toString() == 'True') 
		Yn = window.confirm('Are you sure you want to create a variation request?'); 
	else
		Yn = window.confirm('You are creating variation request for the existing variation request, do you want to continue?'); 

	if (Yn)
		gotoUrl('CreateVariationRequest.aspx?BookingID=' + bookingID);
}

function AD_createVariationRequest(bookingID, isThisOriginalBooking) {
	var Yn = false;
	
	if (isThisOriginalBooking.toString() == 'True') 
		Yn = window.confirm('Are you sure you want to create a variation request?'); 
	else
		Yn = window.confirm('You are creating variation request for the existing variation request, do you want to continue?'); 

	if (Yn)
		gotoUrl('AD_CreateVariationRequest.aspx?BookingID=' + bookingID);
}

function createCancellationRequest(bookingID, URLBack) {
	var Yn = false;
	
	Yn = window.confirm('Are you sure you want to cancel this booking?'); 
	
	if (Yn)
		gotoUrl('CreateCancellationRequest.aspx?BookingID=' + bookingID + '&URLBack=' + URLBack);
}
function createDeleteLodgeReportRequest(reportID, URLBack) {
	var Yn = false;
	
	Yn = window.confirm('Are you sure you want to delete this lodge report?'); 
	
	if (Yn)
		gotoUrl('CreateDeleteLodgeReportRequest.aspx?ReportID=' + reportID + '&URLBack=' + URLBack);
}

function createDeleteWorkPartyRequest(workPartyID, URLBack) {
	var Yn = false;
	
	Yn = window.confirm('Are you sure you want to remove this member from work party?'); 
	
	if (Yn)
		gotoUrl('CreateDeleteWorkPartyRegister.aspx?WorkPartyID=' + workPartyID + '&URLBack=' + URLBack);
}




// stop hiding -->

