<!--
//********************************************************************
// VERSION	1.0
// CREATED	9/12/2005
// AUTHOR	Ashish Mohan(ashishmohan@textware.be)
// SUMMARY	This javascript function will validate the field of various forms
//********************************************************************


//Strip whitespace from the beginning and end of a string
//Input : a string
function mainfunc()
{
	alert("dfdsfsdfsdf");
	document.myform.submit();
	
	}
	
function trim(str)
{
    return str.replace(/^\s+|\s+$/g,'');
}


function redirectf()
{
	alert("fdsfsdfsdfsdfd");
	var sze=document.themestyle.getElementById('size');
	window.location ="level1.php?headid=273&size="+sze"&type=size";
	
	}
	
/*
Check if a string is in valid email format. 
Returns true if valid, false otherwise.
*/


function isNumber(TheNumber) {
	var valid = 1
	var GoodChars = "0123456789"
	var i = 0
	if (TheNumber=="") {
		// Return false if number is empty
		valid = 0
	}
	for (i =0; i <= TheNumber.length -1; i++) {
		if (GoodChars.indexOf(TheNumber.charAt(i)) == -1) {
// Note: Remove the comments from the following line to see this
// for loop in action.
// alert(TheNumber.charAt(i) + " is no good.")
			valid = 0
		} // End if statement
	} // End for loop
	return valid
}	


/*function maxlength()
{
if(eval(objValue.value.length) >  eval(cmdvalue)) 
             { 
               if(!strError || strError.length ==0) 
               { 
                 strError = objValue.id + " : "+cmdvalue+" characters maximum "; 
               }//if 
               alert(strError + "\n[Current length = " + objValue.value.length + " ]"); 
               return false; 
             }//if 	
	
}
*/
/*function Length()
{
// Check the length of the value of the element named text_name
// from the form named form_name if it's < 3 and > 10 characters
// display a message asking for different input
if ((login12.cfather_dob.value.length < 4) || (login12.cfather_dob.value.length > 4))
{
// Build alert box message showing how many characters entered
mesg = "You have entered " + login12.cfather_dob.value.length + " character(s)\n"
mesg = mesg + "Valid entries are between 4 and 4 characters.\n"
mesg = mesg + "Please verify your input and submit again."
alert(mesg);
// Place the cursor on the field for revision
login12.cfather_dob.focus();
// return false to stop further processing
return (false);
}
// If text_name is not null continue processing
return (true);
}*/

/*function lengthRestriction(elem, min, max){
	var uInput = elem.value;
	if(uInput.length >= min && uInput.length <= max){
		return true;
	}else{
		alert("Please enter between " +min+ " and " +max+ " characters");
		elem.focus();
		return false;
	}
}*/


function checkleve1Form(theForm) {
	
	var father_dob, mother_dob, father_dod, mother_dod;

	with(window.document.login12)
    {
		cfather_dob = father_dob;
		cmother_dob = mother_dob;
		cfather_dod = father_dod;
		cmother_dod = mother_dod;
	}
	
	
	if(!isNumber(trim(cfather_dob.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob.focus();
        return false;
    }
	
	if((cfather_dob.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob.focus();
        return false;
    }
	
	if((cfather_dob.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob.focus();
        return false;
    }
	
	if((cmother_dob.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob.focus();
        return false;
    }
	
	if((cmother_dob.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod.focus();
        return false;
    }
	if((cfather_dod.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod.focus();
        return false;
    }
	
	if((cfather_dod.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod.focus();
        return false;
    }
	if((cmother_dod.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod.focus();
        return false;
    }
	
	if((cmother_dod.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod.focus();
        return false;
    }
	
	
	else
	{
		cfather_dob = trim(father_dob);
		cmother_dob = trim(mother_dob);
		cfather_dod = trim(father_dod);
		cmother_dod = trim(mother_dod);
	return true;
	}
	
}







/// level2 start

function checkleve12Form(theForm) {
	
	var father_dob1, mother_dob1, father_dod1, mother_dod1, father_dob2, mother_dob2, father_dod2, mother_dod2;

	with(window.document.login123)
    {
		cfather_dob1 = father_dob1;
		cmother_dob1 = mother_dob1;
		cfather_dod1 = father_dod1;
		cmother_dod1 = mother_dod1;
		cfather_dob2 = father_dob2;
		cmother_dob2 = mother_dob2;
		cfather_dod2 = father_dod2;
		cmother_dod2 = mother_dod2;
	}
	
	
	if(!isNumber(trim(cfather_dob1.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob1.focus();
        return false;
    }
	
	if((cfather_dob1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob1.focus();
        return false;
    }
	
	if((cfather_dob1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob1.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob1.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob1.focus();
        return false;
    }
	
	if((cmother_dob1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob1.focus();
        return false;
    }
	
	if((cmother_dob1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob1.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod1.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod1.focus();
        return false;
    }
	if((cfather_dod1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod1.focus();
        return false;
    }
	
	if((cfather_dod1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod1.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod1.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod1.focus();
        return false;
    }
	if((cmother_dod1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod1.focus();
        return false;
    }
	
	if((cmother_dod1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod1.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dob2.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob2.focus();
        return false;
    }
	
	if((cfather_dob2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob2.focus();
        return false;
    }
	
	if((cfather_dob2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob2.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob2.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob2.focus();
        return false;
    }
	
	if((cmother_dob2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob2.focus();
        return false;
    }
	
	if((cmother_dob2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob2.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod2.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod2.focus();
        return false;
    }
	if((cfather_dod2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod2.focus();
        return false;
    }
	
	if((cfather_dod2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod2.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod2.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod2.focus();
        return false;
    }
	if((cmother_dod2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod2.focus();
        return false;
    }
	
	if((cmother_dod2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod2.focus();
        return false;
    }
	
	
	else
	{
		cfather_dob1 = trim(father_dob1);
		cmother_dob1 = trim(mother_dob1);
		cfather_dod1 = trim(father_dod1);
		cmother_dod1 = trim(mother_dod1);
	return true;
	}
	
}
/// level2 end



/// level3 start

function checkleve13Form(theForm) {
	
	var father_dob1, mother_dob1, father_dod1, mother_dod1, father_dob2, mother_dob2, father_dod2, mother_dod2,father_dob3, mother_dob3, father_dod3, mother_dod3, father_dob4, mother_dob4, father_dod4, mother_dod4;

	with(window.document.login1231)
    {
		cfather_dob1 = father_dob1;
		cmother_dob1 = mother_dob1;
		cfather_dod1 = father_dod1;
		cmother_dod1 = mother_dod1;
		cfather_dob2 = father_dob2;
		cmother_dob2 = mother_dob2;
		cfather_dod2 = father_dod2;
		cmother_dod2 = mother_dod2;
		cfather_dob3 = father_dob3;
		cmother_dob3 = mother_dob3;
		cfather_dod3 = father_dod3;
		cmother_dod3 = mother_dod3;
		cfather_dob4 = father_dob4;
		cmother_dob4 = mother_dob4;
		cfather_dod4 = father_dod4;
		cmother_dod4 = mother_dod4;
	}
	
	
	if(!isNumber(trim(cfather_dob1.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob1.focus();
        return false;
    }
	
	if((cfather_dob1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob1.focus();
        return false;
    }
	
	if((cfather_dob1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob1.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob1.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob1.focus();
        return false;
    }
	
	if((cmother_dob1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob1.focus();
        return false;
    }
	
	if((cmother_dob1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob1.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod1.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod1.focus();
        return false;
    }
	if((cfather_dod1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod1.focus();
        return false;
    }
	
	if((cfather_dod1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod1.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod1.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod1.focus();
        return false;
    }
	if((cmother_dod1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod1.focus();
        return false;
    }
	
	if((cmother_dod1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod1.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dob2.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob2.focus();
        return false;
    }
	
	if((cfather_dob2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob2.focus();
        return false;
    }
	
	if((cfather_dob2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob2.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob2.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob2.focus();
        return false;
    }
	
	if((cmother_dob2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob2.focus();
        return false;
    }
	
	if((cmother_dob2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob2.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod2.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod2.focus();
        return false;
    }
	if((cfather_dod2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod2.focus();
        return false;
    }
	
	if((cfather_dod2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod2.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod2.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod2.focus();
        return false;
    }
	if((cmother_dod2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod2.focus();
        return false;
    }
	
	if((cmother_dod2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod2.focus();
        return false;
    }
	
	
	
	
	
	
	if(!isNumber(trim(cfather_dob3.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob3.focus();
        return false;
    }
	
	if((cfather_dob3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob3.focus();
        return false;
    }
	
	if((cfather_dob3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob3.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob3.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob3.focus();
        return false;
    }
	
	if((cmother_dob3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob3.focus();
        return false;
    }
	
	if((cmother_dob3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob3.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod3.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod3.focus();
        return false;
    }
	if((cfather_dod3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod3.focus();
        return false;
    }
	
	if((cfather_dod3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod3.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod3.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod3.focus();
        return false;
    }
	if((cmother_dod3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod3.focus();
        return false;
    }
	
	if((cmother_dod3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod3.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dob4.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob4.focus();
        return false;
    }
	
	if((cfather_dob4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob4.focus();
        return false;
    }
	
	if((cfather_dob4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob4.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob4.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob4.focus();
        return false;
    }
	
	if((cmother_dob4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob4.focus();
        return false;
    }
	
	if((cmother_dob4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob4.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod4.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod4.focus();
        return false;
    }
	if((cfather_dod4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod4.focus();
        return false;
    }
	
	if((cfather_dod4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod4.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod4.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod4.focus();
        return false;
    }
	if((cmother_dod4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod4.focus();
        return false;
    }
	
	if((cmother_dod4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod4.focus();
        return false;
    }
	
	
	else
	{
		cfather_dob1 = trim(father_dob1);
		cmother_dob1 = trim(mother_dob1);
		cfather_dod1 = trim(father_dod1);
		cmother_dod1 = trim(mother_dod1);
	return true;
	}
	
}
/// level3 end




// level4 start

function checkleve4Form(theForm) {
	
	var father_dob1, mother_dob1, father_dod1, mother_dod1, father_dob2, mother_dob2, father_dod2, mother_dod2,father_dob3, mother_dob3, father_dod3, mother_dod3, father_dob4, mother_dob4, father_dod4, mother_dod4,father_dob5, mother_dob5, father_dod5, mother_dod5, father_dob6, mother_dob6, father_dod6, mother_dod6,father_dob7, mother_dob7, father_dod7, mother_dod7, father_dob8, mother_dob8, father_dod8, mother_dod8;

	with(window.document.login100)
    {
		cfather_dob1 = father_dob1;
		cmother_dob1 = mother_dob1;
		cfather_dod1 = father_dod1;
		cmother_dod1 = mother_dod1;
		cfather_dob2 = father_dob2;
		cmother_dob2 = mother_dob2;
		cfather_dod2 = father_dod2;
		cmother_dod2 = mother_dod2;
		cfather_dob3 = father_dob3;
		cmother_dob3 = mother_dob3;
		cfather_dod3 = father_dod3;
		cmother_dod3 = mother_dod3;
		cfather_dob4 = father_dob4;
		cmother_dob4 = mother_dob4;
		cfather_dod4 = father_dod4;
		cmother_dod4 = mother_dod4;
		
		
		cfather_dob5 = father_dob5;
		cmother_dob5 = mother_dob5;
		cfather_dod5 = father_dod5;
		cmother_dod5 = mother_dod5;
		cfather_dob6 = father_dob6;
		cmother_dob6 = mother_dob6;
		cfather_dod6 = father_dod6;
		cmother_dod6 = mother_dod6;
		cfather_dob7 = father_dob7;
		cmother_dob7 = mother_dob7;
		cfather_dod7 = father_dod7;
		cmother_dod7 = mother_dod7;
		cfather_dob8 = father_dob8;
		cmother_dob8 = mother_dob8;
		cfather_dod8 = father_dod8;
		cmother_dod8 = mother_dod8;
	}
	
	
	if(!isNumber(trim(cfather_dob1.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob1.focus();
        return false;
    }
	
	if((cfather_dob1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob1.focus();
        return false;
    }
	
	if((cfather_dob1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob1.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob1.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob1.focus();
        return false;
    }
	
	if((cmother_dob1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob1.focus();
        return false;
    }
	
	if((cmother_dob1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob1.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod1.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod1.focus();
        return false;
    }
	if((cfather_dod1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod1.focus();
        return false;
    }
	
	if((cfather_dod1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod1.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod1.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod1.focus();
        return false;
    }
	if((cmother_dod1.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod1.focus();
        return false;
    }
	
	if((cmother_dod1.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod1.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dob2.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob2.focus();
        return false;
    }
	
	if((cfather_dob2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob2.focus();
        return false;
    }
	
	if((cfather_dob2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob2.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob2.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob2.focus();
        return false;
    }
	
	if((cmother_dob2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob2.focus();
        return false;
    }
	
	if((cmother_dob2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob2.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod2.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod2.focus();
        return false;
    }
	if((cfather_dod2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod2.focus();
        return false;
    }
	

	if((cfather_dod2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod2.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod2.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod2.focus();
        return false;
    }
	if((cmother_dod2.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod2.focus();
        return false;
    }
	
	if((cmother_dod2.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod2.focus();
        return false;
    }
	
	
	
	
	
	
	if(!isNumber(trim(cfather_dob3.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob3.focus();
        return false;
    }
	
	if((cfather_dob3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob3.focus();
        return false;
    }
	
	if((cfather_dob3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob3.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob3.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob3.focus();
        return false;
    }
	
	if((cmother_dob3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob3.focus();
        return false;
    }
	
	if((cmother_dob3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob3.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod3.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod3.focus();
        return false;
    }
	if((cfather_dod3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod3.focus();
        return false;
    }
	
	if((cfather_dod3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod3.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod3.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod3.focus();
        return false;
    }
	if((cmother_dod3.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod3.focus();
        return false;
    }
	
	if((cmother_dod3.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod3.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dob4.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob4.focus();
        return false;
    }
	
	if((cfather_dob4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob4.focus();
        return false;
    }
	
	if((cfather_dob4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob4.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob4.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob4.focus();
        return false;
    }
	
	if((cmother_dob4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob4.focus();
        return false;
    }
	
	if((cmother_dob4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob4.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod4.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod4.focus();
        return false;
    }
	if((cfather_dod4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod4.focus();
        return false;
    }
	
	if((cfather_dod4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod4.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod4.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod4.focus();
        return false;
    }
	if((cmother_dod4.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod4.focus();
        return false;
    }
	
	if((cmother_dod4.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod4.focus();
        return false;
    }
	
	
	
	
	
	if(!isNumber(trim(cfather_dob5.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob5.focus();
        return false;
    }
	
	if((cfather_dob5.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob5.focus();
        return false;
    }
	
	if((cfather_dob5.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob5.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob5.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob5.focus();
        return false;
    }
	
	if((cmother_dob5.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob5.focus();
        return false;
    }
	
	if((cmother_dob5.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob5.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod5.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod5.focus();
        return false;
    }
	if((cfather_dod5.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod5.focus();
        return false;
    }
	
	if((cfather_dod5.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod5.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod5.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod5.focus();
        return false;
    }
	if((cmother_dod5.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod5.focus();
        return false;
    }
	
	if((cmother_dod5.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod5.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dob6.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob6.focus();
        return false;
    }
	
	if((cfather_dob6.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob6.focus();
        return false;
    }
	
	if((cfather_dob6.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob6.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob6.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob6.focus();
        return false;
    }
	
	if((cmother_dob6.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob6.focus();
        return false;
    }
	
	if((cmother_dob6.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob6.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod6.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod6.focus();
        return false;
    }
	if((cfather_dod6.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod6.focus();
        return false;
    }
	

	if((cfather_dod6.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod6.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod6.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod6.focus();
        return false;
    }
	if((cmother_dod6.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod6.focus();
        return false;
    }
	
	if((cmother_dod6.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod6.focus();
        return false;
    }
	
	
	
	
	
	
	if(!isNumber(trim(cfather_dob7.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob7.focus();
        return false;
    }
	
	if((cfather_dob7.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob7.focus();
        return false;
    }
	
	if((cfather_dob7.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob7.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob7.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob7.focus();
        return false;
    }
	
	if((cmother_dob7.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob7.focus();
        return false;
    }
	
	if((cmother_dob7.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob7.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod7.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod7.focus();
        return false;
    }
	if((cfather_dod7.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod7.focus();
        return false;
    }
	
	if((cfather_dod7.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod7.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod7.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod7.focus();
        return false;
    }
	if((cmother_dod7.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod7.focus();
        return false;
    }
	
	if((cmother_dod7.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod7.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dob8.value)))
    {
        alert('Please enter a valid Date of birth year');
        cfather_dob8.focus();
        return false;
    }
	
	if((cfather_dob8.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dob8.focus();
        return false;
    }
	
	if((cfather_dob8.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dob8.focus();
        return false;
    }
	
	if(!isNumber(trim(cmother_dob8.value)))
    {
        alert('Please enter a valid Date of birth year');
        cmother_dob8.focus();
        return false;
    }
	
	if((cmother_dob8.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dob8.focus();
        return false;
    }
	
	if((cmother_dob8.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dob8.focus();
        return false;
    }
	
	
	if(!isNumber(trim(cfather_dod8.value)))
    {
        alert('Please enter a valid Date of death year');
        cfather_dod8.focus();
        return false;
    }
	if((cfather_dod8.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cfather_dod8.focus();
        return false;
    }
	
	if((cfather_dod8.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cfather_dod8.focus();
        return false;
    }
	
	
	
	
	if(!isNumber(trim(cmother_dod8.value)))
    {
        alert('Please enter a valid Date of death year');
        cmother_dod8.focus();
        return false;
    }
	if((cmother_dod8.value.length) > 4 )
    {
		alert('Please enter year in 4 digit only');
        cmother_dod8.focus();
        return false;
    }
	
	if((cmother_dod8.value.length) < 4 )
    {
        alert('Please enter year in 4 digit only');
        cmother_dod8.focus();
        return false;
    }
	
	
	else
	{
		cfather_dob1 = trim(father_dob1);
		cmother_dob1 = trim(mother_dob1);
		cfather_dod1 = trim(father_dod1);
		cmother_dod1 = trim(mother_dod1);
	return true;
	}
	
}
/// level4 end
