function fun_new_join(ff)
{
	if(!ff.country.value){alert("Please Select the Business Location.");ff.country.focus(); return false;}
	if(!isString(ff.state.value)){alert("Please Enter the Valid State.");ff.state.focus(); return false;}
	var t=0; var u_type=''; for(i=0; i<ff.type.length; i++){
	if(ff.type[i].checked){t++; u_type = ff.type[i].value;}}
	if(t==0){alert("Please Select the User Type.");return false;}
	if(!isEmail(ff.email.value)){alert("Please Enter the Valid Email.");ff.email.focus(); return false;}
	if(ff.invalid_email.value){	alert("Email ID already Exist.");ff.email.focus(); return false;}
	if(!ff.pass.value){alert("Please Enter the Password.");ff.pass.focus(); return false;}
	if(!ff.repass.value){alert("Please Enter the Re-enter Password.");ff.repass.focus(); return false;}
	if(ff.pass.value != ff.repass.value){alert("Mis-Match Password and Re-enter Password. Please Re-Enter!");
		ff.pass.value="";  ff.repass.value="";	ff.pass.focus(); return false;}
	if(u_type!="Buyer")
	{		
		if(!ff.p_name.value){alert("Please Enter the Product Name.");ff.p_name.focus(); return false;}
		if(!ff.category.value){alert("Please Select the Product Category.");ff.category.focus(); return false;}
/*		if(!ff.sub_category.value){alert("Please Select the Product Sub-Category.");ff.sub_category.focus(); return false;}*/
		if(!ff.p_keyword.value){alert("Please Enter the Product Keyword.");ff.p_keyword.focus(); return false;}
		if(!ff.p_description.value){alert("Please Enter the Brief Description.");ff.p_description.focus(); return false;}
		if(!ff.p_img.value){alert("Please Browse the Product Image.");ff.p_img.focus(); return false;}
		if(!isNumber(ff.min_qty.value)){alert("Please Enter Valid Min. Order Quantity.");ff.min_qty.focus(); return false;}
		if(!ff.unit_type.value){alert("Please Select the Unit Type.");ff.unit_type.focus(); return false;}
		if(!ff.price_type.value){alert("Please Select the FOB Price.");ff.price_type.focus(); return false;}
		if(!ff.price_to.value){alert("Please Enter the Min. Price.");ff.price_to.focus(); return false;}
		if(!ff.price_from.value){alert("Please Enter the Max. Price.");ff.price_from.focus(); return false;}
		if(eval(ff.price_to.value) >= eval(ff.price_from.value)){
			alert("Invalid Max. Price.");ff.price_from.focus(); return false;}		
		if(!ff.priceunit.value){alert("Please Select the Unit Type.");ff.priceunit.focus(); return false;}	
	}
	else
	{
		if(!ff.fname.value){alert("Please Enter First Name.");ff.fname.focus(); return false;}
		if(!ff.lname.value){alert("Please Enter Last Name.");ff.lname.focus(); return false;}
	}
	return true;
}

function fun_new_join2(ff)
{
	if(!ff.company_name.value){alert("Please Enter the Company Name.");ff.company_name.focus(); return false;}
	if(!ff.add_street.value){alert("Please Enter the Street.");ff.add_street.focus(); return false;}
	if(!ff.add_city.value){alert("Please Enter the City.");ff.add_city.focus(); return false;}
	if(!ff.add_state.value){alert("Please Enter the State.");ff.add_state.focus(); return false;}
/*	if(!ff.add_zip.value){alert("Please Enter the Zip/Postal Code.");ff.add_zip.focus(); return false;}*/
	var t1=0; for(i=0; i<ff.business_type.length; i++){	if(ff.business_type[i].checked)
	t1++; }if(t1==0){alert("Please Select atleast one Business Type.");return false;}
	
	if(!ff.fname.value){alert("Please Enter the First Name.");ff.fname.focus(); return false;}
	if(!ff.lname.value){alert("Please Enter the Last Name.");ff.lname.focus(); return false;}
	var t=0; var u_type=''; for(i=0; i<ff.gender.length; i++){if(ff.gender[i].checked){t++; 
	u_type = ff.gender[i].value;}}if(t==0){alert("Please Select the Gender.");return false;}
	if(!ff.con_street.value){alert("Please Enter the Street.");ff.con_street.focus(); return false;}
	if(!ff.con_city.value){alert("Please Enter the City.");ff.con_city.focus(); return false;}
	if(!ff.con_state.value){alert("Please Enter the State.");ff.con_state.focus(); return false;}
/*	if(!ff.con_zip.value){alert("Please Enter the Zip/Postal Code.");ff.con_zip.focus(); return false;}*/
	return true;
}

function fun_new_pro(ff)
{
	if(!ff.p_name.value){alert("Please Enter the Product Name.");ff.p_name.focus(); return false;}
	if(!ff.category.value){alert("Please Select the Product Category.");ff.category.focus(); return false;}
/*	if(!ff.sub_category.value){alert("Please Select the Product Sub-Category.");ff.sub_category.focus(); return false;}*/	
	if(!ff.p_keyword.value){alert("Please Enter the Product Keyword.");ff.p_keyword.focus(); return false;}
	if(!ff.p_description.value){alert("Please Enter the Brief Description.");ff.p_description.focus(); return false;}
//	if(!ff.p_id.value){
		if(!ff.p_img.value){alert("Please Browse the Product Image.");ff.p_img.focus(); return false;}
	//}
	if(!isNumber(ff.min_qty.value)){alert("Please Enter Valid Min. Order Quantity.");ff.min_qty.focus(); return false;}
	if(!ff.unit_type.value){alert("Please Select the Unit Type.");ff.unit_type.focus(); return false;}
	if(!ff.price_type.value){alert("Please Select the FOB Price.");ff.price_type.focus(); return false;}
	if(!ff.price_to.value){alert("Please Enter the Min. Price.");ff.price_to.focus(); return false;}
	if(!ff.price_from.value){alert("Please Enter the Max. Price.");ff.price_from.focus(); return false;}
	if(ff.price_to.value>ff.price_from.value){alert("Invalid Max. Price.");ff.price_from.focus(); return false;}		
	if(!ff.priceunit.value){alert("Please Select the Unit Type.");ff.priceunit.focus(); return false;}
	return true;
}

function fun_new_selling_lead(ff)
{
	if(!ff.p_sub.value){alert("Please Enter the Subject.");ff.p_sub.focus(); return false;}
	if(!ff.p_keyword.value){alert("Please Enter the Product Keyword.");ff.p_keyword.focus(); return false;}
	if(!ff.category.value){alert("Please Select the Product Category.");ff.category.focus(); return false;}
	if(!ff.p_id.value){if(!ff.p_img.value){alert("Please Browse the Product Image.");ff.p_img.focus(); return false;}}
	if(!ff.p_description.value){alert("Please Enter the Brief Description.");ff.p_description.focus(); return false;}
	if(!ff.p_detail_description.value){alert("Please Enter the Detailed Description.");ff.p_detail_description.focus(); return false;}
	if(!ff.ExpiryDate.value){alert("Please Select the Expiry Date.");ff.ExpiryDate.focus(); return false;}
	return true;
}
