function confirmSubmit(msg)
{	  
       if(!msg){var msg = "Soll dieser Datensatz geloescht werden?";}
       return confirm(msg);
}

function uncheckThis(id) {	
    document.getElementById(id).checked = false;
    return;
}
function showMe (it, box) {
var vis = (box.checked) ? "visible" : "hidden";
document.getElementById(it).style.visibility = vis;
}
function showGrillplatz (it, box) {
var vis = (box.checked) ? "visible" : "hidden";
document.getElementById(it).style.visibility = vis;
}


function preisBerechnen() {	
	preis = (document.OrderForm.ticket_adult.value * 22.00) + (document.OrderForm.ticket_children.value * 19.00);
	if(preis > 0) {
		preis = preis + 1.5;
	} else {
		preis = "";
	}
	
	document.OrderForm.preis_gesamt.value = formatNumber(preis,2,'.',',','','','','');
	document.OrderForm.preis_gesamt2.value = formatNumber(preis,2,'.',',','','','','');
}


// number formatting function
// copyright Stephen Chapman 24th March 2006, 10th February 2007
// permission to use this function is granted provided
// that this copyright notice is retained intact
function formatNumber(num,dec,thou,pnt,curr1,curr2,n1,n2) 
{
	var x = Math.round(num * Math.pow(10,dec));
	if (x >= 0) n1=n2='';
	
	var y = (''+Math.abs(x)).split('');
	var z = y.length - dec;
	
	if (z<0) z--;
	
	for(var i = z; i < 0; i++) 
	y.unshift('0');
	
	y.splice(z, 0, pnt);
	if(y[0] == pnt) y.unshift('0');
	
	while (z > 3) 
	{
		z-=3;
		y.splice(z,0,thou);
	} 
	
	var r = curr1+n1+y.join('')+n2+curr2;
	return r;
}


