	function CheckContactsForm( pForm ) {

		bIsError = 0;

		document.getElementById('marker_fname').style.color="#000000";

		document.getElementById('marker_email').style.color='#000000';

		

		if ( pForm.elements['firstname'].value.match(/[a-zA-Z_0-9]/) == null ) {

            document.getElementById('marker_fname').style.color="#ff0000";

			bIsError = 1;

    	}

		if ( pForm.elements['email'].value.match(/^\w+([\.\w-]+)*\w@\w([\.\w-]+)*\.\w{2,4}$/)==null ) {

			document.getElementById('marker_email').style.color='#ff0000';

			bIsError = 1;

		}

		

		if ( bIsError ) {

			alert("Please specify fields marked in red.");

        	return false;

		} else {

			pForm.submit();

		}

	}

	

	function CheckFreeQuoteRequestForm( pForm ) {

		bIsError = 0;

		document.getElementById('marker_contact').style.color="#000000";

		document.getElementById('marker_email').style.color='#000000';

		

		if ( pForm.elements['contact'].value.length == 0 ) {

            document.getElementById('marker_contact').style.color="#ff0000";

			bIsError = 1;

    	}

		if ( pForm.elements['email'].value.match(/^\w+([\.\w-]+)*\w@\w([\.\w-]+)*\.\w{2,4}$/)==null ) {

			document.getElementById('marker_email').style.color='#ff0000';

			bIsError = 1;

		}

		

		if ( bIsError ) {

			alert("Please specify fields marked in red.");

        	return false;

		} else {

			pForm.submit();

		}

	}

	

	function CheckFeedBackForm( pForm ) {

		bIsError = 0;

		document.getElementById('marker_name').style.color="#000000";

		document.getElementById('marker_email').style.color='#000000';

		

		if ( pForm.elements['name'].value.length == 0 ) {

            document.getElementById('marker_name').style.color="#ff0000";

			bIsError = 1;

    	}

		if ( pForm.elements['email'].value.match(/^\w+([\.\w-]+)*\w@\w([\.\w-]+)*\.\w{2,4}$/)==null ) {

			document.getElementById('marker_email').style.color='#ff0000';

			bIsError = 1;

		}

		

		if ( bIsError ) {

			alert("Please specify fields marked in red.");

        	return false;

		} else {

			pForm.submit();

		}

	}

	

	function CheckingLength( pElement ) {

		var maxLength = 4000;

		var str = new String();

		str = pElement.value;

		

		if ( pElement.value.length  > (maxLength-1) ) {

			pElement.value = str.substring( 0, maxLength);;

			alert("You've exceded symbol limit");

		}

	}
