// Dynamisch Flash einfügen
function FlashMovie(src, movie, width, height, version, quality, menu, bgcolor, flashvars)
{
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+",0,0,0' width='" +width+ "' height='" +height+ "' id='" +movie+ "'>");
	document.write("<param name='movie' value='" +src+ "' />");
	document.write("<param name='FlashVars' value='" +flashvars+ "'>");
	document.write("<param name='quality' value='" +quality+ "' />");
	document.write("<param name='scale' value='noscale' />");
	document.write("<param name='wmode' value='transparent' />");	
	document.write("<param name='salign' value='m' />");
	document.write("<param name='menu' value='" +menu+ "' />");
	document.write("<param name='bgcolor' value='" +bgcolor+ "' />");
	document.write("<embed src='" +src+ "' swLiveConnect='true' menu='" +menu+ "' FlashVars='" +flashvars+ "' quality='" +quality+ "' bgcolor='" +bgcolor+ "' width='" +width+ "' height='" +height+ "' name='" +movie+ "' wmode='transparent' scale='noscale' salign='m' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function addInput(cellId,childId,prefixId,text){
		
		var arrText = new Array();
		arrText = text.split(',');
		
		document.getElementById(cellId).innerHTML = "";
		var num = document.getElementById(childId).value;
		var y = document.getElementById(cellId);
		
		if ( parseInt(num)!=num - 0 || num.isAlpha  || num < 0 ){ 
			alert('Nur Nummern sind erlaubt'); 
			document.getElementById(childId).value = 0;
		}
		else {
			y.innerHTML += "<div class=\"booking-child-row\"><div class=\"booking-child-number\">"+arrText[0]+"</div>";
			y.innerHTML += "<div class=\"booking-child-age\">"+arrText[1]+"</div>";
			y.innerHTML += "<div class=\"booking-child-junior\">"+arrText[2]+"</div></div>";
			
			for (var x = 1; x <= num; x++) {	
				
				y.innerHTML += "<div class=\"booking-child-row\">";
				y.innerHTML += "<div class=\"booking-child-number\">"+x+"</div>";
				
				var age = prefixId+"[input][child"+x+"][age]";
				y.innerHTML += "<div class=\"booking-child-age\"><input class=\"input-short\" name="+age+" type=\"text\"  /></div>";
				
				var junior = prefixId+"[input][child"+x+"][junior]";
				y.innerHTML += "<div class=\"booking-child-junior\"><input name="+junior+" type=\"checkbox\" value=\"1\" /></div></div>";
			}										
		}
	}
