
var cButt='m0';
var cClass;

function xClOver (obj, sw){
clsName = 'menu' + sw + 'over';
if (obj.id!=cButt){
	obj.className=clsName;
	}
}

function xClOut (obj, sw){
clsName = 'menu' + sw;
if (obj.id!=cButt){
	obj.className=clsName;
	}
}

function xClSet (obj, oCont, sw){
	var cb;
clsName = 'menu' + sw;
clsNameSet = 'menu' + sw + 'set';
if (obj.id!=cButt){
	if(cButt!=""){
		cb=MM_findObj(cButt);
		cb.className=clsName;
		}
	obj.className = clsNameSet;
	MM_goToURL('parent',oCont);
	cButt=obj.id;
	}
}

function xClOverNill (obj, sw){
	clsName = 'menu' + sw + 'over';
	obj.className=clsName;
}

function xClOutNill (obj){
	clsName = '';
	obj.className=clsName;

}

function xClGo (oCont){
	MM_goToURL('parent',oCont);
}


function xClSetOther (ob){
obj=MM_findObj(ob);

//coC=MM_findObj(cCont);
if (obj.id!=cButt){
	if(cButt!=""){
		cb=MM_findObj(cButt);
	//alert(oTd);
		cb.className='menuTop';
		}
	obj.className='menuTopOrangeSet';
	//if (subB>0)pb.style.height=(subB*25+25);
//	MM_goToURL('parent.frames[\'mainFrame\']',oCont);
//	=co.id;
	cButt=obj.id;
	}
}

function xClPreSet (ob, sw) {
clsNameSet = 'menu' + sw + 'set';
obj=MM_findObj(ob);
	if (obj.id!="m0"){
	obj.className=clsNameSet;
	}
	cButt=obj.id;
}

function xClSideOver (obj){
//pb=getDivObj(obj);
if (obj.id!=cButt){
//	cClass=obj.classNam;alert(cClass);
	obj.className='sideBoxHdrOver';
	}
}

function xClSideOut (obj){
//pb=getDivObj(obj);
	if (obj.id!=cButt){
	obj.className='sideBoxHrd';
	}
}

function getDateNow(){
	
	var now = new Date();
var textout;
var date = now.getDate();
var month = now.getMonth();
var year = now.getYear();//alert(year);
var day = now.getDay();
var d_out = new Array("Sunday", "Monday", "Tuesday");
   d_out = d_out.concat("Wednesday","Thursday", "Friday");
   d_out = d_out.concat("Saturday");
var dayout=d_out[day];

   
if (month==0) textout="01";
if (month==1) textout="02";
if (month==2) textout="03";
if (month==3) textout="04";
if (month==4) textout="05";
if (month==5) textout="06";
if (month==6) textout="07";
if (month==7) textout="08";
if (month==8) textout="09";
if (month==9) textout="10";
if (month==10) textout="11";
if (month==11) textout="12";

textout += "/" + year;
textout1 = dayout + ", " + date + "/" + textout + " "
return textout1
}
function CheckSearchForm (inp) {

	//Check for a word to search
	if (inp.value==""){
		alert("Please enter at least one keyword to search");
		inp.focus();
		return false;
	}
	
	return true
}

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 FormValidatorBasic(theForm)
{
  if (theForm.firstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.firstName.focus();
    return (false);
  }  

 
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  return (true);
}

function FormValidatorUnEmail(theForm){
	
  if (theForm.unEmail.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.unEmail.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.unEmail.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.unEmail.focus();
    return (false);
  }
   
  if (theForm.unEmail.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.unEmail.focus();
    return (false);
  }

  return (true);
}