var gWarningColor = '#CEEAF6';
var gNormalColor = '#FFFFFF';
var fBlink;

//alert( 'Loading formcheck.js...' ) ;

function ChangeColor( field, color )
{
    field.style.background = color;
}


function Blink(fieldName, color)
{
	var field = eval(fieldName);

	if (fBlink)
	{
		ChangeColor(field, color);

		if(color == gWarningColor)
		{
			setTimeout("Blink(\"" + fieldName + "\", gNormalColor)", 500);
		}
		else
		{
			setTimeout("Blink(\"" + fieldName + "\", gWarningColor)", 500);
		}
	}
	else
	{
		ChangeColor(field, gNormalColor);
	}
}


function StartBlink(form, field)
{
	field.focus();
	fBlink = true;
	Blink("document.forms['"+form.name+"']." + field.name, gWarningColor);
}


function StopBlink()
{
	fBlink = false;
}


// You don't really need to change anything above this line, unless you want to change the warning colours on lines 1-3


//////////////////////////////////////////////////////////////////////////////////////

function Validate(form)
{

//alert(2) ;

	var field;

    StopBlink();

	//COPY AND PASTE THIS BLOCK AND CHANGE "cname"
	//REAL INPUT BOX NAME (DON't USE "name" AS NAME)

/*

// FOR COMBO BOXES - DROP DOWNS - USE onChange NOT onKeyPress

	field=eval(form.cname); // Here, copy the contents of input name="" and replace cname with it. So, if the input name is "email", this becomes "form.email"

	if( field.value == "")
	{
		alert("Please enter information."); //will make a window that comes up saying what information in a required field hasn't yet been entered.
		StartBlink(form, field);
		return false;
	}


	//END OF BLOCK TO COPY

*/

	field=eval(form.email2);

	if( field.value == "")
	{
		alert("Please enter your e-mail address.");
		StartBlink(form, field);
		return false;
	}



	field=eval(form.regarding2);

	if( field.value == "")
	{
		alert("Please select an enquiry.");
		StartBlink(form, field);
		return false;
	}





	return true;
}

