var popUpWindow;
	
function NewWindow(theURL,winName,width,height,scrollbars,resizable)
{
	options = 'toolbar=no,menubar=no,location=no,directories=no,status=no,copyhistory=no,dependent=yes'
	options += ',width=' + width + ',height=' + height + ',scrollbars=' + scrollbars + ',resizable=' + resizable;
	
	if (window.screen)
	{
		windowLeft = (screen.availWidth - width)/2;
		windowTop = (screen.availHeight - height)/2;
		options += ',left=' + windowLeft + ',top=' + windowTop;
	}
	popUpWindow = window.open(theURL,winName,options);
	popUpWindow.opener = this;
	popUpWindow.focus();
	return popUpWindow;
}

function clearValues()
{
	for(var i=0; i<document.forms[0].elements.length ; i++)
	{                       
		element = document.forms[0].elements[i];
		if (element.value)
		{
			if (element.type != 'hidden' && element.type != 'submit' )
			{
				element.value = '';
			}
		}
	}
}

function enableBookingButtons(genCondId, btnBookingId, btnOptionId)
{	
	control = myGetElementById(btnBookingId);
	if (control != null)
		control.disabled = !myGetElementById(genCondId).checked;

	control = myGetElementById(btnOptionId);
	if (control != null)
		control.disabled = !myGetElementById(genCondId).checked;
}


function myGetElementById(id)
{
	if (document.getElementById)
	{
		x = document.getElementById(id);
	}
	else if (document.all)
	{
		x = document.all[id];
	}
	else if (document.layers)
	{
		x = document.layers[id];
	}
	return x;
}