function visitorvalid(theForm)

{

if (theForm.Name.value == "") 
	{ 
	alert ("Please enter your name");
	theForm.Name.focus();
	return false;
	}

if (theForm.EmailAddress.value == "")
  {
    alert("Please enter your Email Id");
    theForm.EmailAddress.focus();
    return (false);  
  }

if (theForm.EmailAddress.value != "")
   {
	var your_Id=theForm.EmailAddress.value;
	var is_site_ok=your_Id.indexOf('@');
	var is_dot_ok=your_Id.indexOf('.');

	if ((is_site_ok==-1) || (is_dot_ok==-1))
 	{ 
 	 alert("Please enter a valid email Id");
	theForm.EmailAddress.focus();
    	return (false);
	}
  
}


if (theForm.Telephone.value == "") 
	{ 
	alert ("Please enter your telephone no.");
	theForm.Telephone.focus();
	return false;
	}

if (theForm.Message.value == "")
	{ 
	alert ("Please enter some message, it will help us to understand your purpose of filling this form.");
	theForm.Message.focus();
	return false;
	}

return ture;
}


//*************** //


function applyValid(theForm)

{

if (theForm.Name.value == "") 
	{ 
	alert ("Please enter your name.");
	theForm.Name.focus();
	return false;
	}

if (theForm.Phone.value == "") 
	{ 
	alert ("Please provide your phone no.");
	theForm.Phone.focus();
	return false;
	}

if (theForm.EmailAddress.value == "")
  {
    alert("Please enter your Email Id");
    theForm.EmailAddress.focus();
    return (false);  
  }

if (theForm.EmailAddress.value != "")
   {
	var your_Id=theForm.EmailAddress.value;
	var is_site_ok=your_Id.indexOf('@');
	var is_dot_ok=your_Id.indexOf('.');

	if ((is_site_ok==-1) || (is_dot_ok==-1))
 	{ 
 	 alert("Please enter a valid email Id");
	theForm.EmailAddress.focus();
    	return (false);
	}
  
}

if (theForm.Qualification.value == "") 
	{ 
	alert ("Please provide your educational qualification in brief.");
	theForm.Qualification.focus();
	return false;
	}


if (theForm.uploaded.value == "")
	{ 
	alert ("You can't apply without attaching your resume file, please click on browse and select file to continue.");
	theForm.uploaded.focus();
	return false;
	}

return ture;
}



// ************** //

function shareQueryValid(theForm)

{

if (theForm.NameHolder.value == "") 
	{ 
	alert ("Please enter the Name of sole/first holder");
	theForm.NameHolder.focus();
	return false;
	}

if (theForm.EmailAddress.value == "")
  {
    alert("Please enter your Email Id");
    theForm.EmailAddress.focus();
    return (false);  
  }

if (theForm.EmailAddress.value != "")
   {
	var your_Id=theForm.EmailAddress.value;
	var is_site_ok=your_Id.indexOf('@');
	var is_dot_ok=your_Id.indexOf('.');

	if ((is_site_ok==-1) || (is_dot_ok==-1))
 	{ 
 	 alert("Please enter a valid email Id");
	theForm.EmailAddress.focus();
    	return (false);
	}
  
}

if (theForm.FolioNo.value == "") 
	{ 
	alert ("Please enter Folio no.");
	theForm.FolioNo.focus();
	return false;
	}

if (theForm.DPIDNo.value == "") 
	{ 
	alert ("Please enter DP ID no.");
	theForm.DPIDNo.focus();
	return false;
	}

if (theForm.ClientIDNo.value == "") 
	{ 
	alert ("Please enter Client ID no.");
	theForm.ClientIDNo.focus();
	return false;
	}

if (theForm.Mobile.value == "") 
	{ 
	alert ("Please enter your Mobile no.");
	theForm.Mobile.focus();
	return false;
	}

if (theForm.Message.value == "")
	{ 
	alert ("Please enter some message, it will help us to understand your purpose of filling this form.");
	theForm.Message.focus();
	return false;
	}

return ture;
}


//*************** //

function enquiryValid(theForm)

{

if (theForm.CompanyName.value == "") 
	{ 
	alert ("Please enter the Name of Company.");
	theForm.CompanyName.focus();
	return false;
	}




if (theForm.Address.value == "") 
	{ 
	alert ("Please provide the address.");
	theForm.Address.focus();
	return false;
	}

if (theForm.Country.value == "") 
	{ 
	alert ("Please enter the Country name");
	theForm.Country.focus();
	return false;
	}




if (theForm.EmailAddress_OD.value == "")
  {
    alert("Please enter your Email Id");
    theForm.EmailAddress_OD.focus();
    return (false);  
  }

if (theForm.EmailAddress_OD.value != "")
   {
	var your_Id=theForm.EmailAddress_OD.value;
	var is_site_ok=your_Id.indexOf('@');
	var is_dot_ok=your_Id.indexOf('.');

	if ((is_site_ok==-1) || (is_dot_ok==-1))
 	{ 
 	 alert("Please enter a valid email Id");
	theForm.EmailAddress_OD.focus();
    	return (false);
	}
  
}

if (theForm.Telephone_OD.value == "") 
	{ 
	alert ("Please enter Telephone no.");
	theForm.Telephone_OD.focus();
	return false;
	}

if (theForm.Name_CP.value == "") 
	{ 
	alert ("Please enter contact perosn's name.");
	theForm.Name_CP.focus();
	return false;
	}

if (theForm.Designation.value == "") 
	{ 
	alert ("Please enter contact person's designation.");
	theForm.Designation.focus();
	return false;
	}

if (theForm.Telephone_CP.value == "") 
	{ 
	alert ("Please enter contact person's direct telephone no.");
	theForm.Telephone_CP.focus();
	return false;
	}


if (theForm.EmailAddress_CP.value == "")
  {
    alert("Please enter contact person's Email Id");
    theForm.EmailAddress_CP.focus();
    return (false);  
  }

if (theForm.EmailAddress_CP.value != "")
   {
	var your_Id=theForm.EmailAddress_CP.value;
	var is_site_ok=your_Id.indexOf('@');
	var is_dot_ok=your_Id.indexOf('.');

	if ((is_site_ok==-1) || (is_dot_ok==-1))
 	{ 
 	 alert("Please enter a valid email Id");
	theForm.EmailAddress_CP.focus();
    	return (false);
	}
  
}



if ((theForm.Type.value == "----") && (theForm.TypeOther.value == "")) 
	{ 
	alert ("Please select the type of required casting/fabrication/forged particulars or enter in other field");
	theForm.Type.focus();
	return false;
	}

if ((theForm.MatGrade.value == "----") && (theForm.MatGradeOther.value == ""))
	{ 
	alert ("Please select the Mat Grade of required casting/fabrication/forged particulars or enter in other field.");
	theForm.MatGrade.focus();
	return false;
	}

if (theForm.DrwNo.value == "") 
	{ 
	alert ("Please provide Drawing no.");
	theForm.DrwNo.focus();
	return false;
	}

if (theForm.QtyUnit.value == "----") 
	{ 
	alert ("Please select the Qty. Unit.");
	theForm.QtyUnit.focus();
	return false;
	}

if (theForm.WtPc.value == "") 
	{ 
	alert ("Please enter Weight / Pc.");
	theForm.WtPc.focus();
	return false;
	}

if (theForm.ReqrdQty.value == "") 
	{ 
	alert ("Please enter Required Quantity.");
	theForm.ReqrdQty.focus();
	return false;
	}

if (theForm.Delivery.value == "") 
	{ 
	alert ("Please enter Delivery.");
	theForm.Delivery.focus();
	return false;
	}

if (theForm.Inspection.value == "----") 
	{ 
	alert ("Please select Inspection");
	theForm.Inspection.focus();
	return false;
	}


if (theForm.SupplyCondition.value == "----") 
	{ 
	alert ("Please select Supply Condition.");
	theForm.SupplyCondition.focus();
	return false;
	}


if ((!theForm.PhyTest_Ultrasonic.checked) && (!theForm.PhyTest_MPI.checked) && (!theForm.PhyTest_RadioGraphy.checked) && (!theForm.PhyTest_Tensile.checked) && (!theForm.PhyTest_Impact.checked) && (!theForm.PhyTest_Elongation.checked))
	{ 
	alert ("Please select Physical Testing method.");
	theForm.PhyTest_Ultrasonic.focus();
	return false;
	}


if ((!theForm.ChemTest_Spectromtr.checked) && (!theForm.ChemTest_WetAnalysis.checked))
	{ 
	alert ("Please select Chemical Testing.");
	theForm.ChemTest_Spectromtr.focus();
	return false;
	}


if ((!theForm.Anneling_HT.checked) && (!theForm.Normalizing_HT.checked) && (!theForm.OilQuenching_HT.checked) && (!theForm.Other_HT.checked))
	{ 
	alert ("Please select Physical Testing method.");
	theForm.Anneling_HT.focus();
	return false;
	}


if (theForm.Comments.value == "")
	{ 
	alert ("Please enter you queries / details / comments");
	theForm.Comments.focus();
	return false;
	}

if (theForm.uploaded.value == "")
	{ 
	alert ("You can't apply without attaching your resume file, please click on browse and select file to continue.");
	theForm.uploaded.focus();
	return false;
	}

return ture;
}


//*************** //




function supplyRegValid(theForm)

{

if (theForm.Company.value == "") 
	{ 
	alert ("Please enter the Name of your Company.");
	theForm.Company.focus();
	return false;
	}


if (theForm.Address.value == "") 
	{ 
	alert ("Please enter the Address.");
	theForm.Address.focus();
	return false;
	}

if (theForm.Telephone.value == "") 
	{ 
	alert ("Please enter Telephone no.");
	theForm.Telephone.focus();
	return false;
	}

if ((!theForm.NatureOfBusiness1.checked) && (!theForm.NatureOfBusiness2.checked) && (!theForm.NatureOfBusiness3.checked) && (!theForm.NatureOfBusiness4.checked))
	{ 
	alert ("Please select Nature of business.");
	theForm.NatureOfBusiness1.focus();
	return false;
	}




if (theForm.ProductService.value == "") 
	{ 
	alert ("Please enter Product / Service.");
	theForm.ProductService.focus();
	return false;
	}

if (theForm.TypeOfIndustry.value == "") 
	{ 
	alert ("Please enter Type of Industry.");
	theForm.TypeOfIndustry.focus();
	return false;
	}

if (theForm.SSI_No.value == "") 
	{ 
	alert ("Please enter SSI Regn. no.");
	theForm.SSI_No.focus();
	return false;
	}

if (theForm.DGC_No.value == "") 
	{ 
	alert ("Please enter D.G.S & D Regn. no.");
	theForm.DGC_No.focus();
	return false;
	}


if (theForm.ST_No.value == "") 
	{ 
	alert ("Please enter S.T. Regn. no.");
	theForm.ST_No.focus();
	return false;
	}

if (theForm.CST_No.value == "") 
	{ 
	alert ("Please enter C.S.T. Regn. no.");
	theForm.CST_No.focus();
	return false;
	}


return ture;
}

