function checkCertificates() {

var elem, vis;

	if( document.getElementById ) // this is the way the standards work
            elem = document.getElementById( 'cert1' );
        else if( document.all ) // this is the way old msie versions work
            elem = document.all['cert1'];
        else if( document.layers ) // this is the way nn4 works
            elem = document.layers['cert1'];
            vis = elem.style;
            
            var elem2, vis2;

	if( document.getElementById ) // this is the way the standards work
            elem2 = document.getElementById( 'cert2' );
        else if( document.all ) // this is the way old msie versions work
            elem2 = document.all['cert2'];
        else if( document.layers ) // this is the way nn4 works
            elem2 = document.layers['cert2'];
            vis2 = elem2.style;



	if (elem.checked || elem2.checked)
	{
	
	return true;
	}else{
		alert('Please check one or more certificate/s.');
		return false;
	}
}

function funCheckForm()
{
	if (checkString(document.myform.firstName,"'First Name'", false) == false) return false;
	if (checkString(document.myform.lastName,"'Last Name'", false) == false) return false;
	if (checkString(document.myform.cNumber,"'C Number'", false) == false) return false;
	if (checkEmail(document.myform.eMail, false) == false) return false;
	if (checkUSPhone(document.myform.phoneNumber, false) == false) return false;
	if (checkCertificates() == false) return false;
	if (checkString(document.myform.signature,"'Signature'", false) == false) return false;
	
	return true;
}



function funCheckForMessageFlag()
{
	var loc = document.location.href;
	var strMessFlag =loc.substring(loc.indexOf("submit=")+7);
	switch (strMessFlag)
	{	
		case 'done':
			document.writeln	("<p><strong><font color='#FF0000'>Thank you for submitting the Toppel Program Evaluation Survey.</font></strong></p>");
			return;
		default:
			return;
	}
}
