function selectLabel(label, IsValid) {
	if ((IsValid == false) && (label)) 
     label.className = 'ErrorText';
    else if ((IsValid == true) && (label)) 
     label.className = 'ContentText';
}

function checkTextField(value, label, filter1) {
	
	var IsValid = true;

	if (value == '')
     IsValid = false;
    else if (filter1.test(value)) 
     IsValid = true;
    else 
     IsValid = false;

	selectLabel(label, IsValid);

    return(IsValid);
 }


function checkEmailField(value, label) {
	
	var IsValid = true;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	
	if (filter.test(value)) IsValid = true;
	else IsValid = false;
	    
	selectLabel(label, IsValid);
	
	return(IsValid);
    
 }