/*userinfo_validation.js*/

function  _CF_chkForm(_CF_this)
{  

  /* if  (!_CF_hasValue(_CF_this.prefix, "SELECT" )) 
        {
        if  (!_CF_onError(_CF_this, _CF_this.prefix, _CF_this.prefix.value, "Please select a title from the drop-down list.     "))
            {
            return false; 
            }
        }*/
	
	if  (!_CF_hasValue(_CF_this.fname, "TEXT" )) 
        {
        if  (!_CF_onError(_CF_this, _CF_this.fname, _CF_this.fname.value, "Please enter your first name.    "))
            {
            return false; 
            }
        }
		
   if  (!_CF_hasValue(_CF_this.lname, "TEXT" )) 
        {
        if  (!_CF_onError(_CF_this, _CF_this.lname, _CF_this.lname.value, "Please enter your last name.    "))
            {
            return false; 
            }
        }
		
    if  (!_CF_hasValue(_CF_this.position, "SELECT" )) 
        {
        if  (!_CF_onError(_CF_this, _CF_this.position, _CF_this.position.value, "Please select a job title.  "))
            {
            return false; 
            }
        }
		
	if  (!_CF_checkdate(_CF_this.decision_dt.value))
	{
		if  (!_CF_onError(_CF_this, _CF_this.decision_dt, _CF_this.decision_dt.value, "Invalid 'Decision Date'!\nDate format: mm/dd/yyyy\nYou may click on the calendar icon to help you to pick a date!     "))
		{
			return false;
		}
	}

	/*if  (!_CF_hasValue(_CF_this.decision_dt, "TEXT" ))
        {
        if  (!_CF_onError(_CF_this, _CF_this.decision_dt, _CF_this.decision_dt.value, "'Decision Date' is a required field.\nYou may click on the calendar icon to help you to pick a date!     "))
            {
            return false; 
            }
        }
		
    if  (!_CF_hasValue(_CF_this.curr_area, "SELECT" )) 
        {
        if  (!_CF_onError(_CF_this, _CF_this.curr_area, _CF_this.curr_area.value, "What is your curriculum area?  "))
            {
            return false; 
            }
        }
		
    if  (!_CF_hasValue(_CF_this.grade_lvl, "SELECT" )) 
        {
        if  (!_CF_onError(_CF_this, _CF_this.grade_lvl, _CF_this.grade_lvl.value, "Please select at least one grade level.  "))
            {
            return false; 
            }
        } */
		
   if  ((!_CF_hasValue(_CF_this.email, "TEXT" )) || (_CF_this.email.value.indexOf('@') == -1) || (_CF_this.email.value.indexOf('.') == -1)) 
        {
        if  (!_CF_onError(_CF_this, _CF_this.email, _CF_this.email.value, "Email address is a required field.\nPlease enter correct Email address.\nFor example: pl@pearsoned.com"))
            {
            return false; 
            }
        }

	return _CF_checkschl(_CF_this);
	
 return true;
}

/* provide helpfule hints*/
// SIMPLE  BROWSER SNIFFER
if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}

// popup text 
descarray = new Array(
"<b>PC Users:</b>&nbsp;hold 'Ctrl' key down as you click<br><b>MAC Users:</b>&nbsp;hold 'Command' key down as you click"
);

overdiv="0";
// CREATES POP UP BOXES 
function popLayer(a){
if(!descarray[a]){descarray[a]="<font color=red>This popup (#"+a+") isn't setup correctly - needs description</font>";}
if (navigator.family == "gecko") 
{pad="4"; bord="1 bordercolor=black";}
else {pad="6"; bord="1";}
desc = "<table cellspacing=0 cellpadding="+pad+" border="+bord+" bgcolor=#ffffcc width=280>\n<tr valign=top>\n<td class=blk11 align=left>"
	+descarray[a]
	+"\n</td>\n</tr></table>\n";
if(navigator.family =="nn4") {
	document.object1.document.write(desc);
	document.object1.document.close();
	document.object1.left=x+50;
	document.object1.top=y-52;
	}
else if(navigator.family =="ie4"){
	object1.innerHTML=desc;
	object1.style.pixelLeft=x+50;
	object1.style.pixelTop=y-52;
	}
else if(navigator.family =="gecko"){
	document.getElementById("object1").innerHTML=desc;
	document.getElementById("object1").style.left=x+50;
	document.getElementById("object1").style.top=y-52;
	}
}
function hideLayer(){
if (overdiv == "0") {
	if(navigator.family =="nn4") {eval(document.object1.top="-500");}
	else if(navigator.family =="ie4"){object1.innerHTML="";}
	else if(navigator.family =="gecko") {document.getElementById("object1").style.top="-500";}
	}
}

// TRACKS MOUSE POSITION FOR POPUP PLACEMENT
var isNav = (navigator.appName.indexOf("Netscape") !=-1);
function handlerMM(e){
x = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
y = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
}
if (isNav){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = handlerMM;