
<!--

function validateForm()
{
	//alert('-TESTING  * & ^ % $# @ !.- ---- 1');
	var vWeb;
	var a = 0;


/*	for(var i=1; i < 10; i++){
		alert('-TESTING  * & ^ % $# @ !.------- 2');
		// var Vname = 'cuWebinars' + i;
		// var a = 0;

		 alert(document.getElementById('cuWebinars' + i).value);
		//alert(Vname);
	//};
     if(document.getElementById('cuWebinars' + i).checked){
      //   total +=document.form1.scripts[i].value + "\n"
		 a = 1;
       }
	}
 	if (a == 0) {alert('-You must register for at least 1 webinar listed.\n\n Please click the checkbox next to the webinar(s) you wish to attend. \n\n Thank you.');}
	*/

	//alert('-TESTING  * & ^ % $# @ !.------ 3');
	//alert(cuWebinars.length);
	var cuFirstName = document.theForm.cuFirstName.value;

	if ( cuFirstName == '' )
	{
		alert('-First Name is required-\n\n Please fill it out to continue.\n\n Thank you.');
		//alert('- check first name -');
		document.theForm.cuFirstName.focus();
		return false;
	}
	var cuLastName = document.theForm.cuLastName.value;
	if ( cuLastName == '' )
	{
		alert('-Last Name is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuLastName.focus();
		return false;
	}
	var cuTitle = document.theForm.cuTitle.value;
	if ( cuTitle == '' )
	{
		alert('-Title is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuTitle.focus();
		return false;
	}
	var cuCompany = document.theForm.cuCompany.value;
	if ( cuCompany == '' )
	{
		alert('-Organization is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuCompany.focus();
		return false;
	}
	var cuAddress1 = document.theForm.cuAddress1.value;
	if ( cuAddress1 == '' )
	{
		alert('-Address is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuAddress1.focus();
		return false;
	}
	var cuCity = document.theForm.cuCity.value;
	if ( cuCity == '' )
	{
		alert('-City is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuCity.focus();
		return false;
	}
	var cuStateID = document.theForm.cuStateID.selectedIndex;
	if ( cuStateID == 0 )
	{
		alert('-State is required-\n\n Please select a state to continue.\n\n Thank you.');
		document.theForm.cuStateID.focus();
		return false;
	}
	var cuZIP = document.theForm.cuZIP.value;
	if ( cuZIP == '' )
	{
		alert('-ZIP is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuZIP.focus();
		return false;
	}
	var cuPhone = document.theForm.cuPhone.value;
	if ( cuPhone == '' )
	{
		alert('-Phone is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuPhone.focus();
		return false;
	}
	var cuEmail = document.theForm.cuEmail.value;
	if ( cuEmail == '' )
	{
		alert('-Email is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.cuEmail.focus();
		return false;
	}
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(cuEmail))
	{
		alert('-Email must be in a proper format.-');
		document.theForm.cuEmail.focus();
		return false;
	}
	var captcha = document.theForm.captcha.value;
	if ( captcha == '' )
	{
		alert('-captcha text is required-\n\n Please fill it out to continue.\n\n Thank you.');
		document.theForm.captcha.focus();
		return false;
	}
//alert('-TESTING  * & ^ % $# @ !.-');

    vWeb = document.getElementsByName('cuWebinars[]');
	//alert('vWeb length = ' + vWeb.length);
	//	alert('vWeb =  ' + toString(vWeb[0]));

	for(var i=0; i < vWeb.length; i++){
	    if ( vWeb[i].checked == 1 ){
            // alert('vWeb[i].checked =  ' + vWeb[i].checked);
	          a = 1;}
	  //  alert ('i = : ' + i);
	}


	if (a == 0)
       {alert('-You must register for at least 1 webinar listed.\n\n Please click the checkbox next to the webinar(s) you wish to attend. \n\n Thank you.');
	    return false;
       }
    //var cuWeb = document.theForm.cuWebinars;
	//alert('-COUNT cuWeb = ' . count(cuWeb) . ' -');

	/*if ( !isset(count(document.theForm.cuWebinars)) )
	{
		alert('-COUNT cuWebinars = ' . count(document.theForm.cuWebinars) . ' -');
		alert('-You must register for at least 1 webinar listed.\n\n Please click the checkbox next to the webinar(s) you wish to attend. \n\n Thank you.');
		document.theForm.cuWebinars[0].focus();
		return false;
	}*/

	return true;
}
-->
