function ndeCreateCookie(name,value,days,useLang) {
	var langString = useLang ? ndeGetLang() : "";
	var cookie = name + langString + "=" + value + ";";

	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		cookie += " expires=" + date.toGMTString() + ";";
	}
	cookie += " path=/";
	cookie += ";  domain=actsaustin.org";

	document.cookie = cookie;
}

function ndeReadCookie(name, useLang) {
	var langString = useLang ? ndeGetLang() : "";
	var nameEQ = name + langString + "=";
	var ca = document.cookie.split(';');

	for(var i = 0; i < ca.length; i++) {
		var c = ca[i];
		while (c.charAt(0) == ' ') {
			c = c.substring(1, c.length);
		}

		if (c.indexOf(nameEQ) == 0) {
			return c.substring(nameEQ.length,c.length);
		}
	}
	return null;
}



///////////////////////////////////////////////////////////////
// breakframes.js
//if (window != top) top.location.href = location.href;


/////////////////////////////////////////////////
function SetFontFamily(fntfmly) {
	var bodyFont = fntfmly;
	document.body.style.fontFamily = bodyFont;
	ndeCreateCookie('font-family-judah', bodyFont);
}


/////////////////////////////////////////////////
function SetFontSize(fntsz) {
	var bodySize = fntsz + 'px';
	document.body.style.fontSize = bodySize;
	ndeCreateCookie('font-size-judah', fntsz);
}


////////////////////////////////////////////////////////////////////////////////
// this function is placed just after the opening <body> tag, and is used
// to set the font-family and font-size from the saved cookie.
function init() {
	var Font = ndeReadCookie('font-family-judah', false);
	if ((!Font)||(Font == "null")) { 
		Font = "arial";
	}
	var Size = ndeReadCookie('font-size-judah', false);
	if ((!Size)||(Size == "null")) { 
		Size = "17"; 
	}

//	ndeSetStyleSheetInternal();
	SetFontFamily(Font);
	SetFontSize(Size);
}
