function hello(){

var test = document.myform.fname.value

if (test.length < 3)
{

show('vfname');

}
else {
hide('vfname');
}
}

function hello1(){

var test = document.myform.lname.value

if (test.length < 3)
{

show('vlname');

}
else {
hide('vlname');
}
}


<!--
function hide(x) {
document.getElementById(x).style.display='none';
}
function show(x) {
document.getElementById(x).style.display='';
}


function echeck(str) { 

var at="@" 
var dot="." 
var lat=str.indexOf(at) 
var lstr=str.length 
var ldot=str.indexOf(dot) 
if (str.indexOf(at)==-1){
show('vemail');
//alert("Your E-mail ID is Invalid") 
return false 
} 

if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ 
show('vemail');
//alert("Your E-mail ID is Invalid") 
return false 
} 

if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ 
show('vemail');
//alert("Your E-mail ID is Invalid") 
return false 
} 

if (str.indexOf(at,(lat+1))!=-1){ 
show('vemail');
//alert("Your E-mail ID is Invalid") 
return false 
} 

if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ 
show('vemail');
//alert("Your E-mail ID is Invalid") 
return false 
} 

if (str.indexOf(dot,(lat+2))==-1){ 
show('vemail');
//alert("Invalid E-mail ID") 
return false 
} 

if (str.indexOf(" ")!=-1){ 
show('vemail');
//alert("Invalid E-mail ID") 
return false 
} 

}

function ValidateForm(){

var emailID=document.myform.email

if ((emailID.value==null)||(emailID.value=="")){ 
show('vemail');
//alert("Please Enter your Email ID") 
emailID.focus() 
return false 
} 
if (echeck(emailID.value)==false){ 
emailID.value="" 
emailID.focus() 
return false 
}
else{
hide('vemail');
}
}

function Checkall(){
var tes = document.getElementById('vfname').style.display;

if(tes == 'none'){
do1();
}
if(tes == ''){
alert("Invalid  First Name");
}

}

function do1(){
var tes1 = document.getElementById('vlname').style.display;

if(tes1 == 'none'){
do2();
}
if(tes1 == ''){
alert("Invalid  Last Name");
}
}

function do2(){
var tes2 = document.getElementById('vemail').style.display;

if(tes2 == 'none'){

}
if(tes2 == ''){
alert("Invalid Email Address");
}
}




function validate_form ( )
{
	valid = true;

        if ( document.myform.fname.value == "" )
        {
                alert ( "Invalid  First Name" );
                valid = false;
				return false;
        }
		
		        if ( document.myform.lname.value == "" )
        {
                alert ( "Invalid  Last Name" );
                valid = false;
				return false;
        }

		        if ( document.myform.email.value == "" )
        {
				alert ( "Invalid Email Address" );
                ValidateForm();
				
                valid = false;
        }

        return valid;
}