
/*
    window.addEvent('domready', function(){
        var fx_butterfly = new Fx.Morph($('butterfly'), { 
            duration: 3500,
            transition: Fx.Transitions.Back.easeInOut 
        });
        fx_butterfly.start({
            left: 57,
            top: 71
        });
    });
 */



function setMailLink(An,Dn,En,Ln)
{
	/* ####### Die Integration ########
	<script type="text/javascript">setMailLink("soundman","music","de","Link");</script>
	### ergibt: soundman@music.de
	oder
	<script type="text/javascript">setMailLink("soundman","music","de","Jetzt bewerben!");</script>
	### ergibt: Jetzt bewerben!
	*/
	var At = "@";
	var LinkText = An + At + Dn + "." + En;
	var LinkName = "";
	if(Ln=="Link") 
		LinkName = LinkText;
	else 
		LinkName = Ln;
	document.open();
	document.write("<a class=\"foot\" href=\"mai" + "lto:" + LinkText + "\">" + LinkName + "</a>");
	document.close();
}

var galleryEnabled = true;
function setGalleryPicture(ahref)
{
	if(!galleryEnabled) {
		return false;
	} else {
	
		galleryEnabled = false;   
		             	
		var myFx = new Fx.Morph($('cont_gallery_picture_img'), {
		    duration: 1000
		});
	
		myFx.start({
		    'width': 0,
			'opacity': 0
		}).chain(function(){ 
			$('cont_gallery_picture_a').href = ahref;
			$('cont_gallery_picture_img').src = ahref;
		    myFx.start({
		    	'width': '750',
				'opacity': 1
		    });
		}).chain(function(){
			milkbox.reloadGalleries();
			galleryEnabled = true;
			return false;
		});
		//window.setTimeout("setGalleryEnabled();",500);
		//return false;		
	}/* if..else... */
	/*
	myFx.start({
	    'width': 0,
		'opacity': 0
	}).chain(function(){
		//$('cont_gallery_picture').innerHTML = '<a id="cont_gallery_picture_a" rel="milkbox[gal]" href="'+ahref+'"><img id="cont_gallery_picture_img" src="'+ahref+'" /></a>'; 
		$('cont_gallery_picture_a').href = ahref;
		$('cont_gallery_picture_img').src = ahref;
	    myFx.start({
	    	'width': '750',
			'opacity': 1
	    }).chain(function(){
	        galleryEnabled = true;    
	    });
	});
 	*/	
	/*
	myFx.start({
	    'height': 0,
		'opacity': 0
	}).chain(function(){
	    myFx.start({
	    	'height': 300,
			'opacity': 1
	    }).chain(function(){
	        galleryEnabled = true;    
	    });
	}); 
	*/	
	/* 
	window.setTimeout("milkbox.reloadGalleries();",1000); 
	*/
}

function setGalleryEnabled()
{
	milkbox.reloadGalleries();
	window.setTimeout("galleryEnabled = true;",500);  
}


