var IE = (self.pageYOffset == undefined);var FF = (navigator.userAgent.indexOf('Firefox') != -1);var CMNO = (navigator.userAgent.indexOf('Camino') != -1);if (IE && RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null) var IEv = parseFloat( RegExp.$1 );if (FF && RegExp("Firefox/([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null) var FFv = parseFloat( RegExp.$1 );if (CMNO && RegExp("Camino/([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null) var CMNOv = parseFloat( RegExp.$1 );function confirmSubmit(message) {	if (message) {		var agree = confirm(message);	} else {		var agree = confirm("Are you sure you wish to continue?");	}	if (agree)		return true ;	else  	return false ;}function wedding_next(form) {	try {		if (form && typeof form != 'object') { form = $(form); }		new Ajax.Updater('dummy', form.action, {parameters:Form.serialize(form)+"&ajax=true&next=true", evalScripts:true});	} catch(err) { return true; }	return false;}function wedding_back(form) {	try {		if (form && typeof form != 'object') { form = $(form); }		new Ajax.Updater('dummy', form.action, {parameters:Form.serialize(form)+"&ajax=true&back=true", evalScripts:true});	} catch(err) { return true; }	return false;}function wedding_switch(this_div, next_div) {	if($(this_div)) { new Effect.BlindUp(this_div); }	if($(next_div)) { new Effect.BlindDown(next_div); }}function init_calculate_form_total(form) {	try {		$A(form.getElementsByClassName('total', form)).each(function(t) { t.show(); });		calculate_form_totals(form);	} catch(err) {}}function calculate_form_totals(form) {	var total = 0;	$A(form.getElementsByTagName('input')).each(function(i) {		if(i.type == 'text' && $(i.id + '_cost') && $(i.id + '_total')) {			if($(i.id + '_fri') && $(i.id + '_sat')) {				$(i.id + '_total').innerHTML = i.value * ($(i.id + '_fri').checked ? $(i.id + '_sat').checked ? 2 : 1 : $(i.id + '_sat').checked ? 1 : 0) * $(i.id + '_cost').innerHTML;			} else {				$(i.id + '_total').innerHTML = i.value * $(i.id + '_cost').innerHTML;			}			total += parseInt($(i.id + '_total').innerHTML,10);		}	});	if($(form.id + '_total')) {		$(form.id + '_total').innerHTML = total;	}}