// forum help functions

function helpname()
	{
	alert('Please type your real name or your alias here. This allows other people to identify you. This field is required.');
	return false;
	}

function helpemail()
	{
	alert('Please type a valid email address here. Your email address will be automatically altered to protect you from unauthorised usage. This field is required.');
	return false;
	}

function helpsubject()
	{
	alert('Please type a subject line here. This allows other people to distinguish your message from other messages. This field is required.');
	return false;
	}

function helpmessage()
	{
	alert('Please type your message here. Please try to be precise when helping other people, and try to be concise when requiring help.');
	return false;
	}

function helpresource()
	{
	alert('Please type a title for the resource that you want to hyperlink to here. This describes the \"Resource Location\" field below and allows other people to identify your resource before they visit it.');
	return false;
	}

function helpurl()
	{
	alert('Please type a valid URL in this field. This field will be used to create the hyperlink to the resource you described in the \"Resource Name\" field above.');
	return false;
	}

// end forum help functions

function InitializeForm()
	{
	document.bbsform.name.value = getcookie('name');
	document.bbsform.email.value = getcookie('email');
	}

function getcookieval (offset)
	{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
	}

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;
	}

function setcookie (name, value)
	{
	var argv = setcookie.arguments;
	var argc = setcookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
	}

function set_name(form)
	{
	var expdate = new Date ();
	expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 31));
	var username = form.name.value
	var emailname = form.email.value
	if (username != "")
		{
		setcookie ("tdnfname", username, expdate);
		}
	if (emailname != "")
		{
		setcookie ("tdnfemail", emailname, expdate);
		}
	}

function setFormToNull() {
document.forms[0].submit.value = " Processing. Please Wait... ";
document.forms[0].submit.disabled = true;
}



function MM_openBrWindow(theURL,winName,features)
	{
	window.open(theURL,winName,features);
	}

function sw(theURL,winName,features)
	{
	window.open(theURL,winName,features);
	}

function check()
	{
	if (list.email.value == "")
		{
		alert("Please Enter A Valid Email Address!");
		list.email.focus();
		return false;
		}
	}

function nw (link)
	{
	window.open(link.href);
	return false;
	}
