
	//utils
	function switchImage(imgName, imgSrc) {
	  if (document.images) {
		if (imgSrc != "none"){
		  document.images[imgName].src = imgSrc;
		}
	  }
	}


	function keller_slideUpHeader() {
		//alert('keller_slideUpHeader aufgerufen');
		_keller_slideUpHeader($('#header_start'));
	}

	function _keller_slideUpHeader(tgt) {
				//alert('start animation!!');
				
				//$(this).slideDown();
				//return;
				//alert('slide up header');
				var pos = tgt.css("height");
				//if (pos == "210px") {
				  	//tgt.animate({left: "600px", width: "200px"}, 5000);
					tgt.animate({height: "210px"}, 1500, function() {
						//alert('animation complete');
						/*tgt.css({
							position: 'absolute'
							,height: '210px'
							,overflow:'hidden'
						});*/
					});
					
				  
				  //tgt.animate({top: "100px"}, 1000);
				  
				//} else {
				  //tgt.animate({height: "210px"}, 2000);
				//}
			
	}
	
	
	
	$(function() {
		
		
		//
		// slide up animation (only in FE)
		//
		if (/*false && */$.flash.available && typeof(dbtal_inAdministration)!=='undefined' && dbtal_inAdministration==0) {
			
			
			
			if (false || $('.skipIntro').length>0) {
				$('#header_start').flash({
						// test_flashvars.swf is the flash document
						swf: 'header_de.swf'
						//swf: 'bdata/files/templateAdditional_files_bdataFileExtZIP/10000/keller_navi.swf'
						,width: 967
						,height: 210
						,play: true
						,allowscriptaccess:'always'
						,allowScriptAccess:'always'
						//,allowscriptaccess:'sameDomain'
						//,allowScriptAccess:'sameDomain'
		
						// these arguments will be passed into the flash document
						,flashvars: {
							pageID: dbtal_pageID
							,skipIntro:"1"
						}
				});
			} else {
			
				
				$("#header_start").css({
								position: 'absolute'
								,height: '863px'
								,overflow:'hidden'
								,zIndex: 1
								//,top: '0px'
								//,left: '0px'
				}).css('background-color','white');
				$("#header_spacer").css({
								height: '210px'
								,overflow:'hidden'
								//,position:'normal'
				});//.css('background-color','red');
				
				//TEMP: trigger scroll-up
				/*$("#container_main").click(function(evnt) {
					//alert('start animation');
					keller_slideUpHeader();
				});*/
					
				//scroll up at start if in administration
				if (dbtal_inAdministration==1) {
					keller_slideUpHeader();
					
					
					
				}
				
				
				//
				// embed flash (see http://jquery.thewikies.com/swfobject/examples)
				//
				$('#header_start').flash({
						// test_flashvars.swf is the flash document
						swf: 'intro_de.swf'
						//swf: 'bdata/files/templateAdditional_files_bdataFileExtZIP/10002/keller_navi.swf'
						,width: 967
						,height: 863
						,play: true
						,allowscriptaccess:'always'
						,allowScriptAccess:'always'
						//,allowscriptaccess:'sameDomain'
						//,allowScriptAccess:'sameDomain'
		
						// these arguments will be passed into the flash document
						,flashvars: {
							pageID: dbtal_pageID
						}
				});
			
			}
			
		}
		
		//
		// embed flash (see http://jquery.thewikies.com/swfobject/examples)
		//
		/*$('#header_start').flash({
				// test_flashvars.swf is the flash document
				swf: 'header_de.swf'
				//swf: 'bdata/files/templateAdditional_files_bdataFileExtZIP/10002/keller_navi.swf'
				,width: 967
				,height: 210
				,play: true
				,allowscriptaccess:'always'
				,allowScriptAccess:'always'
				//,allowscriptaccess:'sameDomain'
				//,allowScriptAccess:'sameDomain'

				// these arguments will be passed into the flash document
				,flashvars: {
					pageID: dbtal_pageID
				}
		});*/
		
		
		
		
		
		
		//
		// show 1 col or 2 col content? show 2 col if 2nd col has content
		//
		if (typeof('dbtal_inAdministration')!=='undefined' && dbtal_inAdministration==0) {
			//
			// show 1 col or 2 col
			//
			if ($('.teaser_1>*').length>0 || $('.teaser_2>*').length>0 || $('.teaser_3>*').length>0) {
				//alert($('.teaser_1>*').length+','+$('.teaser_2>*').length);
				
				$('#start_video_1col').hide();
			} else {
				$('#start_rightcol,#start_video').hide();
			}
			
			//
			// hide empty containers in right col
			//
			if ($('.teaser_1>*').length==0) {
				$('.start_cont_teaser_1').hide();
			}
			if ($('.teaser_2>*').length==0) {
				$('.start_cont_teaser_2').hide();
			}
			if ($('.teaser_3>*').length==0) {
				$('.start_cont_teaser_3').hide();
			}
			
		}
		
		
		//
		// show flash movies instead of images
		//
		if ($.flash.available && typeof(dbtal_inAdministration)!=='undefined' && dbtal_inAdministration==0) {
			/*$('#start_video').flash({
					// test_flashvars.swf is the flash document
					swf: 'home_small.swf'
					//swf: 'bdata/files/templateAdditional_files_bdataFileExtZIP/10002/keller_navi.swf'
					,width: 765
					,height: 380
					,play: true
	
					// these arguments will be passed into the flash document
					,flashvars: {
						pageID: dbtal_pageID
					}
			});
			$('#start_video_1col').flash({
					// test_flashvars.swf is the flash document
					swf: 'home_big.swf'
					//swf: 'bdata/files/templateAdditional_files_bdataFileExtZIP/10002/keller_navi.swf'
					,width: 967
					,height: 380
					,play: true
	
					// these arguments will be passed into the flash document
					,flashvars: {
						pageID: dbtal_pageID
					}
			});*/
		}
		
		
		
		//
		// add icon to search field
		//
		$('.dbtal_search_field').append('<input class="searchgo" type="submit" value="" />');
		
		
	});
