home_on = new Image( 100, 20 );
home_on.src = "img/home_on.png";
home_off = new Image( 100, 20 );
home_off.src = "img/home_off.png";

function _showWindow ( url ) {
	newWindow = window.open( url );
	newWindow.focus();
}

function _showRecipe ( url ) {
	nWide = 800;
	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
	
	recipeWindow = window.open( url, 'recipe', args );
	recipeWindow.focus();
}

function _msie_replace_png_imgs() {
	var i, elements;

	elements = document.getElementsByTagName( "img" );
	for ( i = 0; i < elements.length; i++ ) {
		var img = elements[i];
		if ( img.src.toLowerCase().search(/\.png$/ ) < 0 ) continue;

		img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src	+ "', sizingMethod='image')";
		img.src = "img/spacer.gif";
	}
}

if ( window.attachEvent && navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion < 7  ) window.attachEvent ( "onload", _msie_replace_png_imgs );

