// The variable 'country' stores the country directory prefix for ASP
var country = ""

var Ver4 = parseInt(navigator.appVersion) >= 4
var Nav4 = ((navigator.appName == "Netscape") && Ver4)
var IE4 = ((navigator.userAgent.indexOf("MSIE") != -1) && Ver4)



var myWindow
//Pop Up Window
function windowOpen(url,width,height,mb,sp) {

myWindow = window.open(url,"windowRef","width=" + width + ",height=" + height+",top=0,left=0,screenX=0,screenY=0,resizable=0,menubar=" + mb + ",scrollbars="+sp);
self.name="main"
}

//Pop Up Window
function windowOpen2(url,wname,width,height,mb,sp) {
myWindow2 = window.open(url,wname,"width=" + width + ",height=" + height+",top=0,left=0,screenX=0,screenY=0,resizable=0,left=0,top=0,menubar=" + mb + ",scrollbars="+sp);
window.close()
}

//BEGIN FOOD TRACKER CODE

var trackfood = 0
var testlocation=location.href

function foodTrackDiv() {
//alert("here")
if (Nav4) {
var testfile = 0
if (testlocation.search("a7_my_activity") != -1){
testfile=1
} else if (testlocation.search("a7_my_food") != -1) {
testfile=1
}
if (testfile==1){
if (origWidth != window.innerWidth || origHeight != window.innerHeight) {
closefind(2)
}
}
}
}

//END FOOD TRACKER CODE  - 

function recipeBuilder() {
//alert("recipebuilder")
var testfile = 0
if (testlocation.search("d6_fr_recipebuilder_edit.asp") != -1){
//alert("recipeBuilder")
serverpage();
	}
if (testlocation.search("d6_fr_recipebuilder_net.asp") != -1){
//alert("recipeBuilder")
serverpage();
	}
if (testlocation.search("netscape.html") != -1){
//alert("recipeBuilder")
serverpage();
	}

}



var wloginPop
//var winCheck

function loginPopup(setURL) {
	if (!wloginPop || wloginPop.closed) {
		wloginPop  = window.open('/globalutilities/login_prof.asp?txtHiddenURL=' + escape(setURL),'wlogin','width=350,height=325,top=200,left=350,menubar=0,scrollbars=0')
	} else { 
		wloginPop.focus()
	}
}


//****
//This code is used for the User Guide Demos
//****
var pg = "yes"

function openJUG(page) {
var jugName, windowJug

if (page.indexOf("main") >= 0) {
pg = "gateway"
page="gateway"
} else if (page.indexOf("add_food") >= 0) {
pg = "add_food"
} else if (page.indexOf("add_ex") >= 0) {
pg = "add_ex"
} else if (page.indexOf("changing") >= 0) {
pg = "changing"
} else if (page.indexOf("savebank") >= 0) {
pg = "savebank"
} else if (page.indexOf("hints") >= 0) {
pg = "hints"
} else if (page.indexOf("print") >= 0) {
pg = "print"
}

jugName = "/help/j6_he_jug.asp?pg=" + pg + "&page=" + page

windowJug = window.open(jugName,"jug","width=600,height=420,scrollbars=0,toolbar=0,left=100,top=100");

}
//****
//END
//****

//****
//This code is used for the User Guide Demos
//****
var pg = "yes"

function openMUG(page) {
var mugName, windowMug

if (page.indexOf("main") >= 0) {
pg = "gateway"
page = "gateway"
} else if (page.indexOf("about") >= 0) {
pg = "adding"
} else if (page.indexOf("features") >= 0) {
pg = "changing"
} else if (page.indexOf("preferences") >= 0) {
pg = "banking"
} else if (page.indexOf("printing") >= 0) {
pg = "logsave"
} else if (page.indexOf("faqs") >= 0) {
pg = "timesavers"
}

mugName = "/help/j7_he_mug.asp?pg=" + pg + "&page=" + page

windoMug = window.open(mugName,"mug","width=600,height=420,scrollbars=0,toolbar=0,left=100,top=100");

}
//****
//END
//****


