								function checkemail(){
										var testresults;			
										var str=document.callback_form.email.value;
										var filter=/^(['_a-z0-9-+]+)(\.['_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,5})$/i
										if (filter.test(str))
										testresults=true
										else				
										testresults=false				
										return (testresults)			
								}


                function ValidateForm(){
                	               	
                	var tbl=document.getElementById("areaid");
 				          var tbl2=document.getElementById("firstid");
				          var tbl3=document.getElementById("lastid");
				          var tbl4=document.getElementById("emailid");
				          var tbl5=document.getElementById("warning");
                	
                	tbl5.innerHTML='';
                	tbl.className='bodyblack';
                	tbl2.className='bodyblack';
                	tbl3.className='bodyblack';
                	tbl4.className='bodyblack';
                	
                	
                				//make sure the user has picked a referrer
                        if ((document.forms[0].elements[3].selectedIndex == 0) || (document.forms[0].elements[3].selectedIndex == 1))
                        {
                                //if statement failed so ask the user to pick one!
                               	tbl.className='bodyred'                                
                                tbl5.innerHTML='Please select a service'
                                document.forms[0].elements[3].focus();
                                //and return false so the form doesn't get submitted                                
                                return false;
                        }		
                				else
                        {tbl.className='bodyblack'}
                				
                        //make sure that the first name is not blank.
                        if (document.callback_form.first_name.value.length == 0)  {
                                //it isn't so show the user an alert and go to that field
                                tbl2.className='bodyred'                                
                                tbl5.innerHTML='Please enter your first name'
                                document.callback_form.first_name.focus();
                                //and return false so the form doesn't get submitted
                                return false;
                        }
                        else
                        {tbl2.className='bodyblack'}
                        
                        
                        //make sure that the last name is not blank.
                        if (document.callback_form.last_name.value.length == 0)  {
                                //it isn't so show the user an alert and go to that field
                                tbl3.className='bodyred'                                
                                tbl5.innerHTML='Please enter your last name'
                                document.callback_form.last_name.focus();
                                //and return false so the form doesn't get submitted
                                return false;
                        }
                        else
                        {tbl3.className='bodyblack'}
                       

                        //make sure that the email is not blank.
                        if (checkemail()==false)  {
                                //it isn't so show the user an alert and go to that field
                                tbl4.className='bodyred'
                                tbl5.innerHTML='Please enter a valid email address'
                                document.callback_form.email.focus();
                                //and return false so the form doesn't get submitted
                                return false;
                        }
                        else
                        {tbl4.className='bodyblack'}                       
                                                                      
                        
                        //everything checks out, submit the form
                        return true;
                }
