function validateSendForm() {
		yourName = document.theform.name.value;
		yourEmail = document.theform.email.value;
		yourMessage = document.theform.message.value;
		yourPhone = document.theform.phone.value;
		yourCaptcha = document.theform.vercode.value;
		
		if (yourName == "") {
			alert("Моля въведете Вашето име.");
			document.theform.name.focus();
			return false;
		}
		
		if (yourPhone != "" && (!isNumeric(yourPhone))) {
			alert("Телефонът трябва да съдържа само цифри.");
			document.theform.phone.focus();
			return false;
		}


		if (yourEmail == "") {
			alert("Моля въведете Вашият email адрес.");
			document.theform.email.focus();
			return false;
		}


		if (yourEmail != "") {
			// E-mail Validation by Henrik Petersen / NetKontoret
			// Explained at www.echoecho.com/jsforms.htm
			// Please do not remove this line and the two lines above.
			apos=yourEmail.indexOf("@"); 
			dotpos=yourEmail.lastIndexOf(".");
			lastpos=yourEmail.length-1;
			if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) {
				alert("Моля въведете валиден email адрес.");
					document.theform.email.focus();
				return false;
			}
		}



		if (yourMessage == "") {
			alert("Моля въведете Вашето съобщение.");
			document.theform.message.focus();
			return false;
		}
		
		if (yourCaptcha == "") {
			alert("Моля въведете Код за верификация.");
			document.theform.vercode.focus();
			return false;
		}
	
		
		document.theform.submit();
	}





function isNumeric(strString) {
		var strValidChars = "0123456789";
		var strChar;
		var blnResult = true;

		if (strString.length == 0) return false;
		//  test strString consists of valid characters listed above
		for (i = 0; i < strString.length && blnResult == true; i++) {
			strChar = strString.charAt(i);
			if (strValidChars.indexOf(strChar) == -1) {
				blnResult = false;
			}
		}
		return blnResult;
	}


