var includeAkamai = false;

var akamai = (includeAkamai) ? "http://a248.g.akamai.net/f/1016/606/5m/image.pathfinder.com/rsn/microsites/homebasics/" : "";

if (document.images)
	{

	/* top nav */

	home_on = new Image();
	home_on.src= akamai + "images/nav/home_on.gif";

	recipe_ideas_on = new Image();
	recipe_ideas_on.src= akamai + "images/nav/recipe_ideas_on.gif";

	beauty_made_simple_on = new Image();
	beauty_made_simple_on.src= akamai + "images/nav/beauty_made_simple_on.gif";

	household_hints_on = new Image();
	household_hints_on.src= akamai + "images/nav/household_hints_on.gif";

	more_ideas_on = new Image();
	more_ideas_on.src= akamai + "images/nav/more_ideas_on.gif";

	sweepstakes_on = new Image();
	sweepstakes_on.src= akamai + "images/nav/sweepstakes_on.gif";


	/* right nav */

	rbeauty_made_simple_on = new Image();
	rbeauty_made_simple_on.src= akamai + "images/nav_right/rbeauty_made_simple_on.gif";

	rhousehold_hints_on = new Image();
	rhousehold_hints_on.src= akamai + "images/nav_right/rhousehold_hints_on.gif";

	rrecipe_ideas_on = new Image();
	rrecipe_ideas_on.src= akamai + "images/nav_right/rrecipe_ideas_on.gif";

	}

function rollover(whichone, turnon)
	{
	var root =  akamai + "images/";
	var x = (root.substring(0,1) == "/")  ? 1 : 0;
	var t = document.images[whichone].src;	
	var subdirectory = t.substring(t.indexOf(root), t.lastIndexOf('/')+1);
	var direction = ( turnon ) ? "_on.gif" : "_off.gif";
	document.images[whichone].src = subdirectory + whichone + direction;
	}

function preloadImages()
	{
	//v3.0
	var path= akamai + "images/";
	var d = document;
	if( d.images )
		{
		if( !d.MM_p ) 
			{ d.MM_p = new Array(); }
		var i,  j = d.MM_p.length,  a = preloadImages.arguments;
		for( i=0; i<a.length; i++ )
			{
    		if ( a[i].indexOf("#") !=0 )
    			{
    			d.MM_p[j] = new Image;
    			d.MM_p[j++].src = path + a[i];
    			}
    		}
    	}
	} 