var veryLocal = new Object();

function rememberMe (f)
{
	var corumCookie = new s1JS.Cookie('corumSearch');

	var ps = new Array('priceLo', 'priceHi', 'keywords', 'Location', 'propType', 'minBeds');
	for (var i=0; i<ps.length; ++i)
	{
		if (f[ps[i]].options)
		{
			corumCookie[ps[i]] = f[ps[i]].selectedIndex;
		}
		else
		{
			corumCookie[ps[i]] = f[ps[i]].value;
		}
	}

	// Get more local values
/*	var moreLocal = [];
	var more = document.getElementsByName('moreLocal');
	for ( var box in more )
	{
		if ( more[box].checked == true && more[box].value ) moreLocal[moreLocal.length] = more[box].value;
	}
	corumCookie.moreLocal = moreLocal;*/

	corumCookie.store();
}


function presetForm (f)
{
	var corumCookie = new s1JS.Cookie('corumSearch');

	if (corumCookie.load())
	{
		var j;

		var ps = new Array('priceLo', 'priceHi', 'keywords', 'Location', 'propType', 'minBeds');
		for (var i=0; i<ps.length; ++i)
		{
			if (j = corumCookie[ps[i]]) {
				if (f[ps[i]].options)
				{
					f[ps[i]].selectedIndex = j;
				}
				else
				{
					f[ps[i]].value = j;
				}
			}
		}

/*		if (corumCookie.moreLocal != null)
		{
			for (value in corumCookie.moreLocal)
			{
				f.veryLocal[corumCookie.moreLocal[value]] = true;
			}
		}*/
	}
}
