// JavaScript Document


function ExpandDivClass() {
this.divID="default";
this.expandDisp = pExpandDisp;
this.closeDisp = pCloseDisp;
this.setDivID = pSetDivID;
this.getDivID = pGetDivID;
}

function pExpandDisp(id)
{

	if (this.divID == "default")
	{
		document.getElementById(id).style.display = ((document.getElementById(id).style.display == "none") ? "block" : "none");							
	}
	else {

		
	  document.getElementById(id).style.display = ((document.getElementById(id).style.display == "none") ? "block" : "none");					
	 }
	this.divID = id;

}

function pCloseDisp(id)
{
	document.getElementById(id).style.display = "none";					
	this.divID = id;
}



function pGetDivID()
{
	return this.divID;
}
function pSetDivID(id)
{
	this.divID = id;
}


function GetFullDate()
{
	var d=new Date();
	var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	
	return ( weekday[d.getDay()] + " " + d.getDate() + ". " + monthname[d.getMonth()] + " " +  d.getFullYear() + " <BR>at " + d.getHours() +":"+ d.getMinutes() +":"+  d.getSeconds() )


}

function isEmailAddr(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
  result = true;
  }
  return result;
}
function validEmail(formField,fieldLabel)
{
  var result = true;
  

  if (result && ((formField.value.length < 3) || !isEmailAddr(formField.value)) )
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    formField.focus();
    result = false;
  }
   
  return result;

}
