function checkBarcode()
{
if (ISBLANK(document.raceentry.Barcode.value)) 
	{ 	
		    document.raceentry.Barcode.style.backgroundColor = "yellow";
			alert("Please Enter Barcode Number in the Bar Code Field !!");
    	    return false;
    }
	
if (isNaN(document.raceentry.Barcode.value)) 
	{ 
		document.raceentry.Barcode.style.backgroundColor = "yellow";
		alert("Please enter Bar Code as a Numeric 10 Digits only.!!"); 
		return false; 
	}

if (document.raceentry.Barcode.value.length !=10)
         {
		document.raceentry.Barcode.style.backgroundColor = "yellow";
		alert("A valid Bar Code has 10 Characters. Please re-enter !!")
        return false
         }

if (document.raceentry.Barcode.value <=2009012345)
         {
		document.raceentry.Barcode.style.backgroundColor = "yellow";
		alert("An invalid Bar Code range been entered. Please re-enter !!")
        return false
         }
		
if (document.raceentry.Barcode.value >=2009020000)
         {
		document.raceentry.Barcode.style.backgroundColor = "yellow";
		alert("An invalid Bar Code range been entered. Please re-enter !!")
        return false
         }

		
	document.raceentry.Barcode.style.backgroundColor = "white";
	return true;
}

function ISBLANK(xx)
{ 
        var cc=0,tt;
		for(tt=0; tt<xx.length; tt++)
		{
		     if (xx.charAt(tt)==' ')
			 {
			 	cc=cc+1; // count blank character
			 }
		}
		if (cc==xx.length)
		{
			return true;  //// means it is BLANK
		}
	     return false;	//// means it is NOT BLANK
}
