/* 

	+----------------------------------------------------------------+
	| Copyright (C) 2007, Paint-Tech America Inc.                    |
	| Designed by APD Technologies Inc.                              |
	| All Rights Reserved                                            |
	|                                                                |
	| RESTRICTED RIGHTS:                                             |
	|                                                                |
	| This  file  may have  been supplied  under a  license.  It may |
	| be used, disclosed, and/or copied only as permitted under such |
	| license agreement.  Any copy must contain the  above copyright |
	| notice and this restricted rights notice.  Use, copying, and / |
	| or  disclosure of   the file  is strictly  prohibited   unless |
	| otherwise provided in the license agreement.                   |
	+----------------------------------------------------------------+

	$Id: contact.js,v 1.1.1.1 2007/04/11 23:58:59 adsouza Exp $
	Author:		Anthony D'Souza
	Descrition:	contact form javascript functions

*/

function validateForm( )
{

	if ( document.frmComment.commentor.value == "" ) {
		alert( "Please enter your name." );
		document.frmComment.commentor.focus();
		return false;

	}

	if ( document.frmComment.email.value == "" ) {
		alert( "Please enter your email." );
		document.frmComment.email.focus();
		return false;

	} else {
		var results = emailCheck( document.frmComment.email.value );

		if ( results == 0 ) {
			document.frmComment.email.focus( );
			return false;

		}

	}

	if ( document.frmComment.subject.options[ document.frmComment.subject.selectedIndex ].value == "" ) {
		alert( "Please select a subject." );
		document.frmComment.subject.focus();
		return false;

	}

	if ( document.frmComment.comment.value == "" ) {
		alert( "Please enter a comment, question or message." );
		document.frmComment.comment.focus();
		return false;

	}

	if ( ! confirm( "Confirm form submission!" ) ) {
		return false;

	} else {
		document.frmComment.validated.value = 1;
		document.frmComment.submit( );

	}

}

