<!--this clears the text box when user begins typing for the subscribe and search-->
<!-- Hide code from non-js browsers. Author = JB 03/11/00

function clearDefault(s) {
  if (s.defaultValue==s.value) s.value = ""
}

//******************************************************
//VARIABLE DECLARATIONS

var whitespace = " \t\n\r";		//whitespace characters
var decimalpoint = ".";				//used for checking decimal point delimitation.
var defaulEmptyOK = false;

//******************************************************
//******************************************************
function isEmpty(s)
//checks whether a string is empty.
	{
	return (s.length == 0);
	}

//******************************************************
function isWhitespace(s)
//Returns true if the string is empty or whitespace characters only.
{
var i;

//Is s empty?
if(isEmpty(s)) {return true;}


//Search through String until we find a non-whitespace character.
//When we do return false else returns true.

for (i=0; i < s.length; i++)
{
//check that current char is not whitepsace.
var c = s.charAt(i);
if(whitespace.indexOf(c) == -1) return false;
}
//All characters are whitespace.
return true;
}

//******************************************************

function isEmail(s)
{

//ENTIRE FUNCTION REPLACED BY THIS ONE LINE OF CODE BY YISRAEL HARRIS
return s.search(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) != -1

/*
//The Email address must have a format which has at least 
//one character before the "@" and there must be at least 
//one character between the "@" and the "."
//"@" and "." must be present.
if (isEmpty(s))
	if (isEmail.arguments.length == 1) return defaulEmptyOK;
	else return (isEmail.arguments[1] == true);

	// is s whitespace?
	if (isWhitespace(s)) return false;

	//there must be at least 1 character before so we
	//start looking at the char position 1

	var  i = 1;
	var sLength = s.length; 

	//look for @
	while ((i < sLength) && (s.charAt(i) != "@"))
	{i++;
	}

	if ((i >= sLength) || (s.charAt(i) != "@")) return false;

	else i += 2;

	//look for
	while ((i < sLength) && (s.charAt(i) != "."))
	{i++;
	}
	
	//there must be at least one char after the "."
	if ((i >= sLength - 1) || (s.charAt(i) !=".")) return false;
	else return true;
*/
}


//******************************************************
function validate_form_subscribe()
{
    var FormOb = document.form_subscribe;

	FormOb.e_address.value = FormOb.e_address.value.replace(/^ *| *$/g, "")

	if (isEmail(FormOb.e_address.value) != true) {
		alert("You have not filled in your e-mail address correctly. Please type it in and re-submit. ");
		FormOb.e_address.focus()
	}
  else
    FormOb.submit()
}

//SHOW THE 16X16 ICON ON THE BROWSER ADDRESS LINE.
document.write("<link REL='SHORTCUT ICON' HREF='http://www.honestreporting.com/favicon.ico'>")

//-->

