if(window.name == ""){
	window.name = "f0";
}

	function resizestage(newheight,time,newfunc){
		tim =  parseFloat(time) * 100;
		dif = 600 - parseFloat(newheight) * 0.5;
		nwd = parseFloat(newheight) * -0.5;
		$("#botmask").animate({
				height: dif
			}, tim 
		);	
		$("#topmask").animate({
				height: dif
				}, tim, '', function(){
					window.name = "f"+newheight;
						if(newfunc != ""){
							eval(newfunc+"()");
				}
		});
	}


	function startintro(){
		resizestage(94,9,"introwait");
		//introproc();
	}
	
	function introproc(){
		setTimeout(function(){ 
                      introend(); 
             	},1500 
        	); 
	}
	
	function introend(){
		resizestage(0,9,"tohomepage");
	}
	
	function tohomepage(){
		setTimeout(function(){ 
                      window.location.href="homepage"; 
             	}, 200 
        	); 
	}

	function startlogo(){
		$("#menuholder").fadeIn(1000);
		$("#logoholdersmall").fadeIn(1000);
		$("#menumarge").animate({
			width: 106
			}, 900, '' 
		);
	}

	function contactopen(){
		$("#backpage").css('display','block');
		$("#contact").css('z-index','100');
	}

	function thumbsopen(){
		$("#thumbs").css('z-index','10');
		$("#backholder").css('z-index','20');
		$("#mailholder").css('z-index','30');
	}

	function bringlarge(){
		$("#thumbs").css('z-index','10');
		$("#backholder").css('z-index','20');
		$("#mailholder").css('z-index','30');
	}

	function enlarge(pic,nwhd){
		$('#enlarged').html('<img src="/photos/'+cat+'/'+folder+'/large/'+pic+'" />');
//alert('/photos/'+cat+'/'+folder+'/'+pic);
		resizestage(nwhd,6,"bringlarge");
		//window.location.hash = id;
	}
	
	
