/***********************************************************************

   FILE:  JavaScript/humor/nbb.js		
   Auth:  Thuy Le				

   DATE:  April 17, 2002
   LMD :  March 6, 2009

Naked babies - Why men wear clothes (geocities.com/naked_bb)

***********************************************************************/

currBB = 1					// First index file.
maxBB = 46					// Last index file.

/*
 *   Previous image.
 */
function prev_naked_bb() 
{
	currBB == 1 ? currBB=maxBB : currBB--
	naked_bb_img()
}

/*
 *   Next image.
 */
function next_naked_bb() 
{
	currBB == maxBB ? currBB=1 : currBB++
	naked_bb_img()
}

/*
 *   Define & change to next image.
 */
function naked_bb_img() 
{
	baby_image			= new Image() 	
	baby_image.src		= createImg( currBB ) 	
	document.images[3].src 	= baby_image.src	
}

/*
 *   Return new image/location file.
 */
function createImg( num ) 
{
	image_name = "../../images/fun/nbb/0"

	if ( num < 10 ) 
		image_name += "0"
	
	image_name += num + ".gif"

	return image_name
}

