function validateUser()
{
	x=document.entry;
	at=x.Email.value.indexOf("@");
	IdLength=x.LoginID.value;
	Pwd=x.Password.value;
	RPwd=x.RetypePassword.value;
	name=x.UserName.value;
	bAddress1=x.BillingAddress1.value;
	sAddress1=x.ShippingAddress1.value;
	bCity=x.BillingCity.value;
	sCity=x.ShippingCity.value;
	bZip=x.BillingZip.value;
	bState=x.BillingState.value;
	sState=x.ShippingState.value;
	bCountry=x.BillingCountry.value;
	sCountry=x.ShippingCountry.value;
	sPhone=x.ShippingPhone.value;
	bPhone=x.BillingPhone.value;
        sZip=x.ShippingZip.value;

        Ch1=x.Checkbox1;
	
	submitOK="True";
	
	
	if (IdLength.length<3)
	{
		alert("Please enter a Login ID that is more than three characters");
		submitOK="False";
	}

	if (name.length<3)
	{
		alert("Name does not seems correct.Expects minimum three letters for the name");
		submitOK="False";
	}

	if (Pwd.length<3)
	{
		alert("Please enter a password that is more than 3 letters");
		submitOK="False";
	}

	if (Pwd!=RPwd)
	{
		alert("Password retyped does not match with the password");
		submitOK="False";
	}
	
	if (bAddress1.length<2)
	{
		alert("Please enter a valid Billing Address");
		submitOK="False";
	}

	if (sAddress1.length<2)
	{
		alert("Please enter a valid Shipping Address");
		submitOK="False";
	}

	if (bCity.length<2)
	{
		alert("Please enter a valid Billing City");
		submitOK="False";
	}

	if (sCity.length<2)
	{
		alert("Please enter a valid Shipping City");
		submitOK="False";
	}

	if (bCountry=="X")
	{
		alert("Please enter a valid Billing Country");
		submitOK="False";
	}
if (bCountry=="IN"||bCountry=="US")
{
	
	if (bState=="X")
	{
		alert("Please enter a valid Billing State");
		submitOK="False";
	}
}


	if (sCountry=="X")
	{
		alert("Please enter a valid Shipping Country");
		submitOK="False";
	}
if (sCountry=="IN"||sCountry=="US")
{

	if (sState=="X")
	{
		alert("Please enter a valid Shipping State");
		submitOK="False";
	}
}

	if (bZip <0 )
	{
		alert("Please enter a valid Billing PIN Code/ZIP Code");
		submitOK="False";
	}

	if (bPhone.length<7)
	{
		alert("Please enter a valid Phone number for billing address.");
		submitOK="False";
	}
	if (sPhone.length<7)
	{
		alert("Please enter a valid Phone number for shipping address.");
		submitOK="False";
	}

	if (sZip <0 )
	{
		alert("Please enter a valid Shipping PIN Code/ZIP Code");
		submitOK="False";
	}

	if (at==-1) 
	{
		alert("Please enter a valid e-mail address.");
		submitOK="False";
	}
	
	if(!Ch1.checked)
        {
	        alert("Please agree with the terms and conditions");
	        submitOK="False";
        }

	if (submitOK=="False")
	{
		return false;
	}
	else
	{
		return true;
	}

}


