 //generic openWin that accepts parameter settings
function openWin(url,name,params) {
		theWin = window.open(url,name,params);
		theWin.focus();
}

//used to get a query string parameter based on name
//ex:  var source = getParam("source")
function getParam(name)
{
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var tmpURL = window.location.href;
  var results = regex.exec( tmpURL );
  if( results == null )
    return "";
  else
    return results[1];
}

//set the navigation on/off
function init() {
	var fileName = location.pathname.substring(location.pathname.lastIndexOf('/')+1)
	if(fileName == "default.aspx" || fileName == "") {
		document.getElementById("navHome").style.color = '#886622';
	}
	if(fileName == "products.aspx") {
		document.getElementById("navProd").style.color = '#886622';
	}
	if(fileName == "recipes.aspx") {
		document.getElementById("navRecipe").style.color = '#886622';
	}
	if(fileName == "legal.aspx") {
		document.getElementById("navLegal").style.color = '#886622';
	}
	if(fileName == "privacy.aspx") {
		document.getElementById("navPriv").style.color = '#886622';
	}
}

