function setCookie( name, value, expires, path, domain, secure ) {
	var curCookie = name + "=" + escape( value ) +
		((expires) ? "; expires=" + expires.toGMTString( ) : "") +
		((path)    ? "; path=" + path : "") +
		((domain)  ? "; domain=" + domain : "") +
		((secure)  ? "; secure" : "")
	document.cookie = curCookie
}
function daysAhead( days ) {
	var expires = new Date( )
	return expires.setTime( expires.getTime( ) + days * 24 * 60 * 60 * 1000 )
}
function getCookie( name ) {
	var result = null
	var dc = " " + document.cookie + ";"
	var search = " " + name + "="
	var begin = dc.indexOf( search )
	var end
	if (begin != -1) {
		begin += search.length;
		end = dc.indexOf( ";", begin )
		result = unescape( dc.substring( begin, end ) )
	}
	return result
}
function deleteCookie( name, path, domain ) {
	if (getCookie( name )) {
		document.cookie = name + "=" + 
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}
function makeCode( ) {
	var today = new Date( )
	var msec = today.getTime( )
	var code = msec.toString( 36 ) // base 36 - 8 digits from 1973 to 2058
	return code.toUpperCase( )
}
function makeTag( page ) {
	if (page.substring( 0, 6 ) != "/beta/")
		return ""
	var uid, pid, exp, url, tag 
	uid = getCookie( "uid" )
	if (uid == null) {
		uid = makeCode( )
		exp = new Date( "Aug 31, 2002" )
		setCookie( "uid", uid , exp, "/", "omeganutrition.com" )
	}
	uid = getCookie( "uid" )
	if (uid == null) {
		uid = "NOCOOKIE"
	}
	pid = page.substring( 5 )
	url = 'http://www.omeganutrition.com/beta/_scripts/page_track.asp?uid=' + uid + '&pid=' + pid
	tag = '<img src=\"' + url + '\" border=\"0\" width=\"1\" height=\"1\">'
	return tag
}
