function menuhelp(helptopic,itemNo,store) {
		helpwindow = window.open('/members/popupHelp/' + helptopic + '.html?itemNo='+itemNo+'&store=' + store,
		"helpwindow",
		"status=no,"+
		"toolbar=no,"+
		"location=no,left=5,top=5"+
		"directories=no,"+
		"menu=no,"+
	 	"scrollbars=yes," +
		"resizable=yes," +
		"width=420,height=250");
}
function imageDisplay(graphicid) {
		helpwindow = window.open(graphicid,
		"helpwindow",
		"status=yes,"+
		"toolbar=yes,"+
		"location=yes,left=5,top=5"+
		"directories=yes,"+
		"menu=no,"+
	 	"scrollbars=yes," +
		"resizable=yes," +
		"width=420,height=250");
}
function launchForm(targetUrl,targetWidth,targetHeight,scrollPermitted) {		
	if (typeof targetWidth == "undefined") {			
		targetWidth=600;		}		
	if (typeof targetHeight == "undefined") {			
		targetHeight=300;		
		}
	if (typeof scrollPermitted == "undefined") {
		scrollPermitted='yes'
	}

		formWindow = window.open(targetUrl,
		"formWindow",
		"status=yes,"+
		"toolbar=yes,"+
		"location=yes,left=5,top=5"+
		"directories=yes,"+
		"menubar=yes,"+
	 	"scrollbars=" + scrollPermitted +
		",resizable=yes," +
		"width=" + targetWidth + ",height=" + targetHeight);
}

function doFTP()	{
	if (navigator.appName != "Netscape"){
			alert('This function will only work if you have the Netscape browser.');
	}	else	{
			location.href='/updates/ftp.cgi';
	}
}

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
    endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

//
//  Function to return the value of the cookie specified by "name".
//    name - String object containing the cookie name.
//    returns - String object containing the cookie value, or null if
//    the cookie does not exist.
//

function getCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen)   	{
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}

/*
*********************************************************************************************
(myCookieVar, cookieValueVar, null, '/myPath', null, true);
*********************************************************************************************
*/ 
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 7)); 
//the above is an override for the date if needed

function setCookie (name,value,expires,path,domain,secure) { 
	document.cookie=name + 	'=' +	escape (value) + 
		((expires) ? '; expires=' + expires.toGMTString(): '') + 
		((path) ? '; path=' + 	path : '') + 
		((domain) ? '; domain=' +	domain :'') + 
		((secure) ? '; secure' : ''); 
}

function clearCookie () {
	setCookie("updateRequired","0",expdate)
}	
	
function confirmWheel(branchAddr){
var msg=("As a wheel, executing this option may cause problems with the customer's account.\n\nDo you really want to proceed?");
	if (wheel == false) {		
		location.href=branchAddr;	
	} else {
		if (confirm(msg)) {
			location.href=branchAddr;		}
	}
}

