<!--
var whitespace = " \t\n\r";

//variable for Status bar and alert
var sName = "Name";
var sEmail = "email";
var pEntryPrompt = "Please enter a";
var mPrefix = "You did not enter a value into the ";
var mSuffix = " field. This is a required field. Please enter it now.";

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function checkString (theField, s)
{
    if (isWhitespace(theField.value))
    {
    	return warnEmpty (theField, s);
    }
    else return true;
}

function checkNews()
{
	if (document.theForm.name == "")
	{
		alert("Please fill out your name.")
		return false;
	}
	else if(document.theForm.email =="")
	{
		alert("Please fill out your email address.")
		return false;
	}
	else window.open('subscribe.php','subscribe','scrollbars=no,width=525,height=260,location=no, menubar=no, status=no, toolbar=no, resizable=no');
}

//
//This function checks passed string for whitespace and empty space
//
function isWhitespace (s)
{
	var i;

    if (isEmpty(s)) return true;

    for (i = 0; i < s.length; i++)
    {
        // Check that current character isnt whitespace.
        var c = s.charAt(i);

        if (whitespace.indexOf(c) == -1) return false;
    }

    // All characters are whitespace.
    return true;
}

//
//This function checks content of passed string
//
function isEmpty(s)
{
	return ((s == null) || (s.length == 0));
}

//
//This function dynamically populates popup error message
//
function warnEmpty (theField, s)
{
	theField.focus();
    alert(mPrefix + s + mSuffix);
    return false;
}

//
//This function changes status bar content dynamically
//
function promptEntry (s)
{
	window.status = pEntryPrompt + s;
}

function popUp(thePage)
{
	window.open(thePage+'.php','subscribe','scrollbars=no,width=525,height=260,location=no, menubar=no, status=no, toolbar=no, resizable=no');
}

//-->