/* opens a new window with htmlContent */
function printThisPage()
{
	// replace relative links (IE issue)
	relative_regex = new RegExp('#.*');
	var old_url = document.URL.replace(relative_regex, '');
	
	var new_url = old_url+'/print/';
	if (old_url.substring(old_url.length-1) == '/') { new_url = old_url+'print/'; }
	var print_window = window.open(new_url, 'print_window', 'height=600,width=800,menubar=1,scrollbars=1,resizable=1');
}

/* opens a new window with htmlContent */
function printRegisterConfirm(needHotel)
{
	var new_url = document.URL+'/print/';
	if (document.URL.substring(document.URL.length-1) == '/') { new_url = document.URL+'print/'; }
	new_url = new_url+'?hotel='+needHotel;
	var print_window = window.open(new_url, 'print_window', 'height=600,width=800,menubar=1,scrollbars=1,resizable=1');
}

/* using slightly different print page for register to include form information */
function printPageRegister()
{
	var new_url = document.URL+'/print/';
	if (document.URL.substring(document.URL.length-1) == '/') { new_url = document.URL+'print/'; }
	
	var register_form = document.forms['registration_form'];
	var old_action = register_form.action
	var old_target = register_form.target;
	register_form.action = new_url;
	register_form.target = '_blank';
	register_form.submit();
	register_form.target = old_target;
	register_form.action = old_action;
}
