	var dropped={};

	$.preloadImages = function(preload){  
	   $(document.createElement('img')).bind('load', function(){ 
	    if(preload[0]) this.src = preload.shift(); 
	   }).trigger('load'); 
	}	
	
	function dropmenu_on(uid)
	{
		document.getElementById(uid).style.height='75px';
		document.getElementById(uid).className="dropmenu_on";
		dropped[uid]=true;
	}
	
	function dropmenu_keep(uid)
	{
		dropped[uid]=true;
	}	
	
	function dropmenu_off(uid)
	{
		dropped[uid]=false;
		setTimeout('do_dropmenu_off("'+uid+'")',500);
	}	
	
	function do_dropmenu_off(uid)
	{
		if(dropped[uid] == false)
		{
			document.getElementById(uid).style.height='25px';
			document.getElementById(uid).className="dropmenu_off";
		}
	}
	

	function flashLoaded()
	{
		$('#menu').fadeTo(0,0);
		$('#contenttext').fadeTo(0,0);
		document.getElementById('menu').style.visibility='visible';
		document.getElementById('contenttext').style.visibility='visible';

		setTimeout('show_menu()',50);
		setTimeout('$(\'#swed\').show(900)',1200);
		setTimeout('$(\'#eng\').show(900)',1700);

		setTimeout('show_content()',3000);

	}
	
	function show_content()
	{
		$('#contenttext').fadeTo(2000,1,function(){$('#contenttext').css("filter","none");});
		$("#desphoto").fadeOut(2000,function(){$('#photodiv').cycle('resume')});				
	}
	
	function show_menu()
	{

		$('#menu').fadeTo(2000,1);
	}	
	

	function initShow(rnd)
	{
    $('#photodiv').cycle(
		{ 
	    timeout:  5000, 
  	  speed:  2000,  
   	  random: rnd,
  	  sync: 1,
  	  delay: -3700 
		}    
    );
	}	
	
	function animateProj(lnk)
	{
		$('#contenttext').animate({ 
       left: 0
      }, 500 , "linear", function(){document.location=lnk;}
		);
	}
	

