<!--
function cnt(){
	w=document.getElementById('bio');

	var y=w.value;
	var r = 0;
	a=y.replace(/\s/g,' ');
	a=a.split(' ');
	for (z=0; z<a.length; z++) {if (a[z].length > 0) r++;}
	
	return r;
}
function validate()
{
	count = 0;
	rv = true;
	msg  = "";

	if( required )
	{	
		for( i=0;i<required.length;i++)
		{
  			d=document.getElementById( required[i][0] );
			if(  d.value  == "" || (d.type=='radio'? !validate_radio(d): false)) { msg+= required[i][1] + " is required\n"; rv = false; }
		}
	}

	if ( rv ) return true;

	window.alert(  msg );
        return false;
}

// Radio Button Validation
// copyright Stephen Chapman, 15th Nov 2004,14th Sep 2005
// you may copy this function but please keep the copyright notice with it
function validate_radio(id) {
    d=document.getElementsByName(d.name);
    var cnt = -1;
    for (var i=d.length-1; i > -1; i--) {if (d[i].checked) {cnt = i; i = -1;}}
    //if (cnt > -1) return d[cnt].value;
    if (cnt > -1) {return true;}
    else return false;
}
                  
function validate_bio()
{
	count = 0;
	rv = true;
	msg  = "";

//	If need to validate bios, and limit to less then 250 words, uncomment below
	count = cnt();
	if( count > 300 ) 
	{
		rv = false;
		window.alert( "Bio must be less then 250 words.\nCurrent Count is " + count );
		return false;
	}
	rv = validate();

	if ( rv ) return true;
        return false;
}
-->

