function HStep0Validation()
{
	res = TextFildValid('zipcode', 'zip', 'zipcodeHTML');;
	SerErrorText(res);
	return res; 
}

function HStep1Validation()
{
	/// texts //////////////////////////////////////////////
	resFN = TextFildValid('fname', null, 'fnameHTML');
	resLN = TextFildValid('lname', null, 'lnameHTML');
	resZC = TextFildValid('zipcode', 'zip', 'zipcodeHTML');

	/// radios /////////////////////////////////////////////
	// questions relpase insurance
	resRI = RadioFildValid('replaceInsurance', 'step1', 'replaceInsuranceHTML');
	
	res = (resFN && resLN && resZC && resRI);
	SerErrorText(res);
	return res;
}
function HStep3Validation()
{
	/////  text filds /////////////////////////////////////////////////////////
	
	// first name
	resFN = TextFildValid('fname', null, 'fnameHTML');
	
	// last  name
	resLN = TextFildValid('lname', null, 'lnameHTML');
	
	// Weight  name
	resWE = TextFildValid('weight', 'number', 'weightHTML');
		
	/// radios ///////////////////////////////////////////////////////////////
	// Gender
	resGN = RadioFildValid('gender', 'step3', 'genderHTML');
	
	// state most by selected ///////////////////////////////////////////////
	
	// Marital status?
	resMS = SelectFildValid('mstates', 'mstatusHTML');
	
	// feet  and inches
	resH1 = SelectFildValid('hei1', null);
	resH2 = SelectFildValid('hei2', null);
	
	var tagHTML = document.getElementById('hei3HTML');
	tagHTML.className = (resH1 && resH2) ? "bold" : "red";
	
	
	/// date /////////////////////////////////////////////////////////////////
	resDate = isDateSelects('OBOD3Y', 'OBOD3M', 'OBOD3D');

	var tagHTML = document.getElementById('OBOD3HTML');
	tagHTML.className = (resDate) ? "bold" : "red";
	
	res = (resFN && resLN && resWE && resGN && resMS && resWI && resH1 && resH2 && resDate);
	SerErrorText(res);
	return res;
}

function HStep4Validation()
{
	/////////// text //////////////////////////////////////////////////////////////
	//Approximate livable square footage of residence:
	resAL = TextFildValid('ALSFOR4', null, 'ALSFOR4HTML');
	
	

	/// radios /////////////////////////////////////////////
	//Have you reported any claims or losses to your insurance
	resHYR = RadioFildValid('HYRACOLYI4', 'step4', 'HYRACOLYI4HTML');
	
	//Is business or farming conducted on this property
	resIB = RadioFildValid('IBOFCOTP4', 'step4', 'IBOFCOTP4HTML');
	
	//Do you have any pets? xxx
	resDY = RadioFildValid('DYHAPXXX4', 'step4', 'DYHAPXXX4HTML');
	
	resAW = true;
	if(resDY == "yes")
	{
		//And what kind of it? xxx
		resAW = TextFildValid('AWKOIXXX4', null, 'AWKOIXXX4HTML');
	}
	

	// SELECT ////////////////////////////////////////////////////////////
	//Approximate year property built:
	resAY = SelectFildValid('AYPB4', 'AYPB4HTML');

	//Is this your primary or secondary residence?
	resIT = SelectFildValid('ITYPOSR4', 'ITYPOSR4HTML');
	
	// Dwelling design:
	resDD = SelectFildValid('DD4', 'DD4HTML');

	//Exterior wall type
	resEW = SelectFildValid('EWT4', 'EWT4HTML');
		
	//Roof type:
	resRT = SelectFildValid('RT4', 'RT4HTML');
		
	//Roof age:
	resRA = SelectFildValid('RA4', 'RA4HTML');

	//Garage type
	resGT = SelectFildValid('GT4', 'GT4HTML');
		
	//Fire hydrant
	resFH = SelectFildValid('FH4', 'FH4HTML');
	
	//Please describe the heating system in this dwelling:
	resPD = SelectFildValid('PDTHSITD4', 'PDTHSITD4HTML');
	
	//Is your home prone to flooding or located in a designated flood plain?
	resIY = SelectFildValid('IYHPTFOLIADFP4', 'IYHPTFOLIADFP4HTML');
		
	res = (resAL && resAW && resHYR && resIB && resDY && resDD && resEW && 
			resRT && resRA && resGT && resFH && resPD && resPD && resPD && resIY);
	SerErrorText(res);
	return res;
}
function HStep5Validation()
{
	//////////  TEXT ///////////////////////////////////////////////////////
	//Owner's First Name:
	resOF = TextFildValid('OFName5', null, 'OFName5HTML');
	
	//Owner's Last Name:
	resOL = TextFildValid('OLName5', null, 'OLName5HTML');

	// Radio ////////////////////////////////////////////////////////////////
	//Owner's Gender
	resOG = RadioFildValid('OG5', 'step5', 'OG5HTML');
	
	/////////////////////////////////////////////////////////////////////////
	// Owner's Date of Birth:
	resDate = isDateSelects('OBOD5Y', 'OBOD5M', 'OBOD5D');
	
	var tagHTML = document.getElementById('OBOD5HTML');
	tagHTML.className = (resDate) ? "bold" : "red";

	/////////////////////////////////////////////////////////
	res = (resOF && resOL && resOG && resDate);
	SerErrorText(res);
	return res;
}
function HStep6Validation()
{
	/// text //////////////////////////////////////
	// first name
	resFN = TextFildValid('fname', null, 'fnameHTML');

	// last name
	resLN = TextFildValid('lname', null, 'lnameHTML');
	
	// zip code moset by 5 digit
	resZP = TextFildValid('zipcode', 'zip', 'zipcodeHTML');
		
	// city not empty
	resCY = TextFildValid('city', null, 'cityHTML');
	
	// address not empty
	resAD = TextFildValid('address', null, 'addressHTML');
	
	//Please enter a valid E-mail address
	resEM = TextFildValid('email', 'email', 'emailHTML');
	
	//Home Telephone Number: (format: 212-555-1234)
	resHP = TextFildValid('phone', 'phone', 'phoneHTML');
	///////////////////////////////////////////////	/////////////////////////////
	// state most by selected
	resST = SelectFildValid('states', 'statesHTML');
	
	// corrent resident
	resCR = SelectFildValid('cr6', 'cr6HTML');
	/// radios /////////////////////////////////////////////
	//Are you interested in a multiple-policy discount (for auto and home insurance)?
	resAY = RadioFildValid('AYIIAMD6', 'step6', 'AYIIAMD6HTML');
	
	res = (resFN && resLN && resZP && resCY && resAD && resEM && resHP && resCR && resAY && resST);
	SerErrorText(res);
	return res;
}