thumb00_over = new Image( 126, 90 ); thumb00_over.src = "images/00.jpg"; thumb00_off = new Image( 48, 90 ); thumb00_off.src = "images/n00.jpg";
thumb01_over = new Image( 126, 90 ); thumb01_over.src = "images/01.jpg"; thumb01_off = new Image( 48, 90 ); thumb01_off.src = "images/n01.jpg";
thumb02_over = new Image( 126, 90 ); thumb02_over.src = "images/02.jpg"; thumb02_off = new Image( 48, 90 ); thumb02_off.src = "images/n02.jpg";
thumb03_over = new Image( 126, 90 ); thumb03_over.src = "images/03.jpg"; thumb03_off = new Image( 48, 90 ); thumb03_off.src = "images/n03.jpg";
thumb04_over = new Image( 126, 90 ); thumb04_over.src = "images/04.jpg"; thumb04_off = new Image( 48, 90 ); thumb04_off.src = "images/n04.jpg";
thumb05_over = new Image( 126, 90 ); thumb05_over.src = "images/05.jpg"; thumb05_off = new Image( 48, 90 ); thumb05_off.src = "images/n05.jpg";
thumb06_over = new Image( 126, 90 ); thumb06_over.src = "images/06.jpg"; thumb06_off = new Image( 48, 90 ); thumb06_off.src = "images/n06.jpg";
thumb07_over = new Image( 126, 90 ); thumb07_over.src = "images/07.jpg"; thumb07_off = new Image( 48, 90 ); thumb07_off.src = "images/n07.jpg";
thumb08_over = new Image( 126, 90 ); thumb08_over.src = "images/08.jpg"; thumb08_off = new Image( 48, 90 ); thumb08_off.src = "images/n08.jpg";
thumb09_over = new Image( 126, 90 ); thumb09_over.src = "images/09.jpg"; thumb09_off = new Image( 48, 90 ); thumb09_off.src = "images/n09.jpg";
thumb10_over = new Image( 126, 90 ); thumb10_over.src = "images/10.jpg"; thumb10_off = new Image( 48, 90 ); thumb10_off.src = "images/n10.jpg";
thumb11_over = new Image( 126, 90 ); thumb11_over.src = "images/11.jpg"; thumb11_off = new Image( 48, 90 ); thumb11_off.src = "images/n11.jpg";
thumb12_over = new Image( 126, 90 ); thumb12_over.src = "images/12.jpg"; thumb12_off = new Image( 48, 90 ); thumb12_off.src = "images/n12.jpg";
thumb13_over = new Image( 126, 90 ); thumb13_over.src = "images/13.jpg"; thumb13_off = new Image( 48, 90 ); thumb13_off.src = "images/n13.jpg";

var recipeCount = 14;

function _setNavbar () {
	for ( x = 0; x < recipeCount; x++ ) {
		div = ( x < 10 ) ? 'image0' + x : 'image' + x;
		document.getElementById( div ).style.left = x * 48 + 17 + 'px';
	}
}

function _show ( idNumber) {
	for ( x = 0; x < recipeCount; x++ ) {
		div = ( x < 10 ) ? "image0" + x : "image" + x;
		id = ( x < 10 ) ? "thumb0" + x : "thumb" + x;
		if ( x < idNumber ) {
			document.getElementById( div ).style.left = x * 42 + 17 + "px";
			document.getElementById( id ).style.width = "42px";
		} else if ( x == idNumber ) {
			document.getElementById( div ).style.left = x * 42 + 17 + "px";
			document.getElementById( id ).src = eval ( id + "_over.src" );
			document.getElementById( id ).style.width = "126px";
		} else {
			document.getElementById( div ).style.left = ( x - 1) * 42 + 143 + "px";
			document.getElementById( id ).style.width = "42px";
		}
	}
}

function _shrink () {
	for ( x = 0; x < recipeCount; x++ ) {
		id = ( x < 10 ) ? "thumb0" + x : "thumb" + x;
		div = ( x < 10 ) ? "image0" + x : "image" + x;
		document.getElementById( div ).style.left = x * 48 + 17 + "px";
		document.getElementById( id ).src = eval ( id + "_off.src" );
		document.getElementById( id ).style.width = "48px";
	}
}

function _recipe ( recipe ) {
	nWide = 750;
	xPosition = ( screen.width - nWide ) / 2 - 10;
	if ( screen.width <= ( nWide + 20 ) ) {
		nWide = screen.width - 40;
		xPosition = 0;
	}
	nHigh = screen.height - 40;
	yPosition = 0;

	args = "width=" + nWide + "," 
	+ "height=" + nHigh + "," 
	+ "location=no," 
	+ "menubar=no,"
	+ "resizable=yes,"
	+ "scrollbars=yes,"
	+ "status=yes," 
	+ "titlebar=no,"
	+ "toolbar=no,"
	+ "hotkeys=no,"
	+ "screenx=" + xPosition + ","  //NN Only
	+ "screeny=" + yPosition + ","  //NN Only
	+ "left=" + xPosition + ","     //IE Only
	+ "top=" + yPosition;           //IE Only
	
	url = 'recipes/index.php?' + recipe;
	recipeWindow = window.open( url, 'recipe', args );
	recipeWindow.focus();
}

