function popUp(URL,w,h) {
day = new Date();
id = day.getTime();
if(w == "") w = 640;
if(h == "") h = 480;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + w + ",height=" + h + ",left = 320,top = 272');");
}
 
function saveBooking()
{
	dLoadMessage();
	scroll(0,0);	
	getSmallBooking();
}

function getSmallBooking()
{
	url = 'http://www.usatravel.be/v3/recherche/saveBooking.php';
	data = null;
	jQuery.get(url,data,function(text){
		jQuery('#booking').html(text);
		makeDeleteButtons();
		hLoadMessage();	
	});
}

function dLoadMessage()
{
	scroll(0,0);
	html = '<div id="loadMsg"></div>';
	jQuery('body').append(html);
	jQuery('#loadMsg').css({
		display: 'block',
		background: '#C0C0C0',
		border: '1px solid black',
		margin: 'auto',
		width: '10000px',
		height: '10000px',
		overflow: 'hidden',
		position: 'absolute',
		margin: '0',
		padding: '200px',
		zIndex: 100000,
		opacity: 0.5,
		top: 0,
		left: 0
		}
	);
	
	jQuery('#Bodypage').css({
		overflow: 'hidden',
		margin: 0,
		padding: 0		
	});
}

function hLoadMessage()
{
	jQuery("#loadMsg").remove();
	jQuery('#Bodypage').css({
		overflow: 'auto',
		margin: 0,
		paddingTop: '20px'
	});
}

jQuery(function(){
	makeDeleteButtons();
});

function makeDeleteButtons()
{
	jQuery(".delete").click(function(){
		dLoadMessage();
		url = jQuery(this).attr('href');
		jQuery.get(url,null,function(){
			getSmallBooking();			
		});
		jQuery(this).attr('href',null);
		return false;
	});
}
