//recipe print page function, called from flash recipeNav, printable Version button
function openPrint() {
	 myleft=(screen.width)?(screen.width-700)/2:100;
     myNewWin = window.open("/recipe/recPrintable.html", "printRecipe", "scrollbars=1, width=700, height=700, left="+myleft+", top=10");
	 myNewWin.focus();
}

//recipe send to friend function, called from flash recipeNav
function launchRecipeMail() {
	myleft=(screen.width)?(screen.width-400)/2:100;
     myNewWin2 = window.open("/recipe/recipeMailForm.html", "recipeMail", "width=400, height=400, left="+myleft+", top=40");
	 myNewWin2.focus();
}

//returns Town and Country Markets cookie for 'cookie_name'
function getName() {
	if(document.cookie) {
		index = document.cookie.indexOf(cookie_name);
		if (index != -1) {
			namestart = (document.cookie.indexOf("=", index) + 1);
			nameend = document.cookie.indexOf(";", index);
			if (nameend == -1) {nameend = document.cookie.length;}
			myVar = document.cookie.substring(namestart, nameend);
			return myVar;
		}
	}
	else {
		return myVar;
	}
}


function fillintheblank(){
urlString = location.search ? unescape(location.search.substring(1)):'nothing';

if (urlString != "nothing") {
    
	middle = urlString.indexOf("&");
	firstVar = urlString.substring(0,middle);
	secondVar = urlString.substring(middle+1,urlString.length);
    to = firstVar.indexOf("=");
    firstVarName = firstVar.substring(0,to);
	firstVarVal = firstVar.substring(to+1,firstVar.length);
	to = secondVar.indexOf("=");
    secondVarName = secondVar.substring(0,to);
	secondVarVal = secondVar.substring(to+1,secondVar.length);
	//alert("firstVar="+firstVarName+" "+firstVarVal+" secondVars = "+secondVarName+" "+secondVarVal);
	if (firstVarName == "positiondesired"){
	document.jobApp.positiondesired.value = firstVarVal;
	document.jobApp.Slocation.value = secondVarVal;
	//alert("job description = "+secondVarVal+" and Slocation = "+firstVarVal);
	}else {
	document.jobApp.positiondesired.value = firstVarVal;
	document.jobApp.Slocation.value = secondVarVal;
	//alert("job description = "+firstVarVal+" and Slocation = "+secondVarVal);
	}
}
}

//sets height and width of side navigation for all pages
navWidth = 150;
navHeight = 648;