function ShowPhoto( objSource, strPath ){
	var objPhotoFrame = $( "#bild" );
	var objPhoto = null;
	
	// Make sure we have our photo frame.
	if (objPhotoFrame){
		
		// Get the photo image object.
		objPhoto = $( objPhotoFrame.children( "img" )[ 0 ] );
		
		// Make sure we found our photo.
		if (objPhoto.length){
		
			objPhoto.fadeOut(
				"fast",
				function(){		
					
				// Set photo source.
					objPhoto.attr( "src", strPath );
					
						// Show photo.
							ShowPhotoDo( objSource, objPhoto );
				}
				);
				
		}
			
	}
}


function ShowPhotoDo( objSource, objPhoto ){
	var objImage = new Image();
	var objPrevThumb = null;
	
	// Set the source image to this one.
	objImage.src = objPhoto.attr( "src" );
	
	// Check to see if the photo is complite.
	if (objImage.complete != false){
	
		// Fade in main photo.
		objPhoto.fadeIn( "fast" );
	
	} else {
		
		// Call this function again.
		setTimeout(
			function(){
				ShowPhotoDo( objSource, objPhoto );
			},
			100
			);
				
	}
}