function ValidateNewUserEmailID(str1)
{
		xmlHttpCourses=GetXmlHttpObject();
		if (xmlHttpCourses==null)
		{
		alert ("Browser does not support HTTP Request");
		return;
		}

		document.getElementById("LoadingMsg").innerHTML = 'Loading&hellip;';

		var url="http://www.indb2b.com/Ajax.php";
		var parameters="fuse=2&EmailID="+str1;

		xmlHttpCourses.onreadystatechange= function ()
			{
			if (xmlHttpCourses.readyState==4 || xmlHttpCourses.readyState=="complete")
				{
					if (xmlHttpCourses.responseText == 1)
					{
						document.getElementById("EmailIDError").className="fld_ERROR";
						alert ("Please Enter a Valid Email ID....");
						document.frm_Registration.EmailID.focus();
						document.frm_Registration.EmailID.value="";
					}
					else if (xmlHttpCourses.responseText == 2)
					{
						document.getElementById("EmailIDError").className="fld_ERROR";
						alert ("Sorry a User Already Exists having the same EmailID ("+str1+")\n\nKindly Try To Enter Another EmailID");
						document.frm_Registration.EmailID.focus();
						document.frm_Registration.EmailID.value="";
					}
					else if (xmlHttpCourses.responseText == 3)
					{
						document.getElementById("ValidEmailID").innerHTML = str1 + ' <span class="Error_red" style="cursor:pointer;" onClick="JavaScript:RollBackID()"><b>Change ID</b></span><input type="hidden" name="EmailID" value="'+str1+'">';
						document.frm_Registration.FirstName.focus();
					}
					document.getElementById("LoadingMsg").innerHTML = '';
				}
			}

		xmlHttpCourses.open('POST', url, true);
		xmlHttpCourses.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlHttpCourses.setRequestHeader("Content-length", parameters.length);
		xmlHttpCourses.setRequestHeader("Connection", "close");
		xmlHttpCourses.send(parameters);
}

function RollBackID()
{
	document.getElementById("ValidEmailID").innerHTML = '<span onblur="writetip1(this,1);" onFocus="writetip1(this,1);" onClick="writetip1(this,1);"><input id="EmailIDError" class="fld" name="EmailID" size="41" onblur="JavaScript:ValidateNewUserEmailID(document.frm_Registration.EmailID.value)" onFocus="this.className=\'fld\'" onClick="this.className=\'fld\'"></span> <span class="dark_red">*</span>';
}


function ValidateNewUserForm()
{
fldEmailID = document.frm_Registration.EmailID.value;
if (MyTrim(document.frm_Registration.EmailID.value) == "")
	{
		alert ("A valid Email Address is required \n\nin order to receive all important communication.\n\nYour email will also be your userid / login id for signing in");
		document.frm_Registration.EmailID.focus();
		return 0;
	}
if(fldEmailID=="" || fldEmailID.indexOf('@',0)==-1 || fldEmailID.indexOf('.',0)==-1 || fldEmailID.indexOf(' ',0)!=-1)
	{
		alert ("A valid Email Address is required \n\nin order to receive all important communication.\n\nYour email will also be your userid / login id for signing in");
		document.feedback.emailid.focus();
		document.feedback.emailid.value="";
		return 0;
	}
if (MyTrim(document.frm_Registration.FirstName.value) == "")
	{
		alert ("Please Enter Your First Name. i.e. Harry from your name Harry Potter");
		document.frm_Registration.FirstName.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.LastName.value) == "")
	{
		alert ("Please Enter Your Last Name. i.e. Potter from your name Harry Potter");
		document.frm_Registration.LastName.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.Designation.value) == "")
	{
		alert ("Enter Your Job Title / Designation. i.e. BDM, EDP Manager, Prop, CEO, Owner etc.");
		document.frm_Registration.Designation.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.CompanyName.value) == "")
	{
		alert ("Please Enter Your Company Name");
		document.frm_Registration.CompanyName.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.StreetAddress.value) == "")
	{
		alert ("Street / Lane Address of Your Company???");
		document.frm_Registration.StreetAddress.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.City.value) == "")
	{
		alert ("Enter the City Name where your business is located");
		document.frm_Registration.City.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.ZipPinCode.value) == "")
	{
		alert ("Please Enter a Value for Zip / Pin Code");
		document.frm_Registration.ZipPinCode.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.Country.value) == "")
	{
		alert ("Enter the Country Name where your business is located");
		document.frm_Registration.Country.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.CountryCodePhone.value) == "")
	{
		alert ("Enter Your Country ISD Code i.e. +1 for USA, +91 for INDIA...");
		document.frm_Registration.CountryCodePhone.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.AreaCodePhone.value) == "")
	{
		alert ("Enter Your State STD Code i.e. 0161 for Ludhiana, 011 for Delhi...");
		document.frm_Registration.AreaCodePhone.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.PhoneNumber.value) == "")
	{
		alert ("Enter Your Office phone (land line or fixed phone) Number.");
		document.frm_Registration.PhoneNumber.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.MobileNumber.value) == "")
	{
		alert ("Enter your Mobile Phone / Hand Phone / GSM / CDMA");
		document.frm_Registration.MobileNumber.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.CEOFirstName.value) == "")
	{
		alert ("Please Enter Company Owner First Name. i.e. Harry from your name Harry Potter");
		document.frm_Registration.CEOFirstName.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.CEOLastName.value) == "")
	{
		alert ("Please Enter Company Owner Last Name. i.e. Potter from your name Harry Potter");
		document.frm_Registration.CEOLastName.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.CompanyProfile.value) == "")
	{
		alert ("Brief Introduction about Your Company???");
		document.frm_Registration.CompanyProfile.focus();
		return 0;
	}
if (MyTrim(document.frm_Registration.VerificationCode.value) == "")
	{
		alert ("Enter the Verify Code shown on Image.");
		document.frm_Registration.VerificationCode.focus();
		return 0;
	}

		document.frm_Registration.submit();
		return true;
}