// JavaScript Document
function Validform2()
	{
		var ctr=document.contactform2;
		if(ctr.email.value=="")
		{
			alert("E-mail is required.");
			ctr.email.focus();
			return false;
		}
		if (EmailCheckjs(ctr.email.value) == false)
		{
			alert("Invalid E-mail Address");
			ctr.email.focus();
			return false;
		}


		if(ctr.message.value=="")
		{
			alert("Message is required.");
			ctr.message.focus();
			return false;
		}
		if(ctr.vrcode.value=="")
		{
			alert("Verification code is required.");
			ctr.vrcode.focus();
			return false;
		}

	}
	function EmailCheckjs(argvalue)
	{
		if (argvalue.indexOf(" ") != -1)
		  return false;
		else if (argvalue.indexOf("@") == -1)
		  return false;
		else if (argvalue.indexOf("@") == 0)
		  return false;
		else if (argvalue.indexOf("@") == (argvalue.length-1))
		  return false;
		var arrayString = argvalue.split("@");
		if(arrayString.length > 2)
		  return false;
		if (arrayString[1].indexOf(".") == -1)
		  return false;
		else if (arrayString[1].indexOf(".") == 0)
		  return false;
		else if (arrayString[1].charAt(arrayString[1].length-1) == ".") {
		  return false;
		}
	  return true;
	}
