<!--
var txtday = 1;
var lstBirthMonth=1;
var txtBirthYear = 1900;
var txtBirthYear1 = '01/01/1910';

var txtAnniDate = 1;
var lstAnniMonth=1;
var txtAnniYear = 1900;
var txtAnniYear1 = '01/01/1910';
var select = 0;
var criteria_no=0;

function showoff()
{
	if (document.getElementById("lstBillingCountry").value=='India' )
 		{
		 document.getElementById("lstBillingstate").style.display = "Block";
		 document.getElementById("txtBillingstate").style.display = "none";
		 if (document.getElementById("lstBillingstate").value=='Maharashtra' || document.getElementById("txtBillingstate").value=='Maharashtra')
			  {
				 document.getElementById("mumbai").style.display = "block";
				 document.getElementById("txtBillingmumbaichk").style.display = "block";
			  }
		else
			{
				 document.getElementById("mumbai").style.display = "none";
				 document.getElementById("txtBillingmumbaichk").style.display = "none";
			}
		 }
	else
 		{
		 document.getElementById("lstBillingstate").style.display = "none";
		 document.getElementById("lstBillingstate").value='';
		 document.getElementById("txtBillingmumbaichk").style.display = "none";
		 document.getElementById("mumbai").style.display = "none";
 	 	}

	if (document.getElementById("lstShippingCountry").value=='India')
		{
	 	 document.getElementById("lstShippingState").style.display = "Block";
		 document.getElementById("txtShippingState").style.display = "none";
		 if (document.getElementById("lstShippingState").value=='Maharashtra' || document.getElementById("txtShippingState").value=='Maharashtra')
			  {
				 document.getElementById("mumbai1").style.display = "block";
				 document.getElementById("txtshipingmumbaichk").style.display = "block";
			  }
		else
			{
				 document.getElementById("mumbai1").style.display = "none";
				 document.getElementById("txtshipingmumbaichk").style.display = "none";
			}
		}
	else
		{
		 document.getElementById("lstShippingState").style.display = "none";
	 	 document.getElementById("lstShippingState").value='';
		 document.getElementById("txtshipingmumbaichk").style.display = "none";
		 document.getElementById("mumbai1").style.display = "none";
		}
}

function test(obj)
     {
          if(obj.options[obj.options.selectedIndex].text == 'India')
        	  {
    	       document.getElementById("txtBillingState").style.display = "none";
			   
               document.getElementById("lstBillingstate").style.display = "block";
  			   document.getElementById("lstBillingstate").value = "Maharashtra";
			   
  			   document.getElementById("txtBillingmumbaichk").style.display = "block";
			   document.getElementById("mumbai").style.display = "block";
			   
  			   document.getElementById("txtBillingCity").value = "Mumbai";
	          }
//          else
//	          {
//               document.getElementById("txtBillingState").style.display = "block";       
//   			   document.getElementById("txtBillingState").value = "";   
//			   
//			   document.getElementById("lstBillingstate").style.display = "none";
//			   document.getElementById("lstBillingstate").value = "";
//			   
//			   document.getElementById("txtBillingmumbaichk").style.display = "none";
//  			   document.getElementById("mumbai").style.display = "none";
//			   
//   			   document.getElementById("txtBillingCity").disabled = false;
// 			   document.getElementById("txtBillingCity").style.display = "block";       
//  			   document.getElementById("txtBillingCity").value = "";
//			   document.getElementById("txtBillingZip").value = "";
 //   	      }
     }

 function test2(obj)
     {
          if(obj.options[obj.options.selectedIndex].text == 'India')
        	  {
    	       document.getElementById("txtShippingState").style.display = "none";
			   
               document.getElementById("lstShippingState").style.display = "block";
  			   document.getElementById("lstShippingState").value = "Maharashtra";
			   
  			   document.getElementById("txtshipingmumbaichk").style.display = "block";
			   document.getElementById("mumbai1").style.display = "block";
			   
  			   document.getElementById("txtShippingCity").value = "Mumbai";
	          }
          else
	          {
			   if (document.registration.chkSameAddress.checked)
			   		{
			   	     document.registration.chkSameAddress.checked=false;
  				 	 document.registration.addrs_same.value='N';
					 }
               document.getElementById("txtShippingState").style.display = "block";       
   			   document.getElementById("txtShippingState").value = "";   
			   
			   document.getElementById("lstShippingState").style.display = "none";
			   document.getElementById("lstShippingState").value = "";
			   
			   document.getElementById("txtshipingmumbaichk").style.display = "none";
   			   document.getElementById("mumbai1").style.display = "none";
			   
   			   document.getElementById("txtShippingCity").disabled = false;
  			   document.getElementById("txtShippingCity").style.display = "block";       
  			   document.getElementById("txtShippingCity").value = "";
			   document.getElementById("txtShippingZip").value = "";
    	      }
     }


function rightlogin()

{
	if (Trim(document.formLoginInfo.txtloginid.value)=='') 
		{
		alert("Invalid Login Id");
		document.formLoginInfo.txtloginid.focus();
		return false;
		}
	if (Trim(document.formLoginInfo.txtPassword.value)=='') 
		{
		alert("Invalid Password");
		document.formLoginInfo.txtPassword.focus();
		return false;
		}
	document.formLoginInfo.submit();
}

function logoutwind()
{
		document.location.href='closesession_new.asp?status=logout';
}

function logoutwind_new()
{
		document.location.href='closesession_new.asp?status=logout';
}

function zoomIt4cdiamond(i)
{
	file=i;
	window.open(file,"edit",'height=500,width=520,left=100,top=5,resizable=no,scrollbars=yes');
}


function onClose()
{
if (window.event.clientX < 0 && window.event.clientY < 0)
	{
		document.location.href='trijewelsclose_new.asp';
	}
}

function searchsorttype()
{
	document.searchqty.sort_type.value =eval('document.searchqty.sort_type.options[document.searchqty.sort_type.selectedIndex].value');
}

function searchsortgo()
{
	var a,b,c,d,e
	a = document.searchqty.Selectedmaterial.value;
	b = eval('document.searchqty.sort_type.options[document.searchqty.sort_type.selectedIndex].value');
	c = document.searchqty.criteria.value;
	d = document.searchqty.currencytype.value;
	document.location.href ='search_results_new.asp?allvalue='+a+'&sortcat='+b+'&select2_Criteria='+c+'&currency_type='+d;
}

function stores_searchsortgo()
{
	var a,b,c,d,e
	a = document.searchqty.Selectedmaterial.value;
	b = eval('document.searchqty.sort_type.options[document.searchqty.sort_type.selectedIndex].value');
	c = document.searchqty.criteria.value;
	d = document.searchqty.currencytype.value;
	e = document.searchqty.brandname.value;
	document.location.href ='stores_search_results_new.asp?brandname='+e+'&allvalue='+a+'&sortcat='+b+'&select2_Criteria='+c+'&currency_type='+d;
}

function stone_searchsortgo()
{
	var a,b,c,d,e
	a = document.searchqty.Selectedmaterial.value;
	b = eval('document.searchqty.sort_type.options[document.searchqty.sort_type.selectedIndex].value');
	c = document.searchqty.criteria.value;
	d = document.searchqty.currencytype.value;
	document.location.href ='stone_jewelry_new.asp?allvalue='+a+'&sortcat='+b+'&select2_Criteria='+c+'&currency_type='+d;
}
function registrationchk(a)
{

	if (a==1)
	{

		if (Trim(document.registration.txtloginid.value)=='') 
			{
			alert("Invalid Login Id");
			document.registration.txtloginid.focus();
			return false;
			}


		if (Trim(document.registration.txtPass.value)=='')
			{
				alert("blank password not allowed");
				document.registration.txtPass.value='';
				document.registration.txtPass.focus();
				return false;
			}
		else
			{
				if (Trim(document.registration.txtPass.value).length<8 )
				{
				alert("Password less than 8 character not allowed and space not allowed");
				document.registration.txtPass.value='';
				document.registration.txtPass.focus();
				
				return false;
				}
			}


		if (Trim(document.registration.txtPassConfirm.value)=='')
			{
				alert("Blank confirm Password NOT allowed");
				document.registration.txtPassConfirm.focus();
				return false;
			}
		else
			{
				if (Trim(document.registration.txtPassConfirm.value).length<8 )
				{
				alert("confirm Password less than 8 character not allowed and space not allowed");
				document.registration.txtPassConfirm.value='';
				document.registration.txtPassConfirm.focus();
				return false;
				}
			}

		
		if ( Trim(document.registration.txtPass.value).toLowerCase() != Trim(document.registration.txtPassConfirm.value).toLowerCase() )
			{
				alert ("Password and confirm password mismatch");
				document.registration.txtPass.focus();
				return false;
			}

	
		if (Trim(document.registration.txtEmailID.value)=='' || document.registration.txtEmailID.value.length<9 )
			{
			alert("Invalid Email Id");
			document.registration.txtEmailID.focus();
			return false;
			}
		else
		{	
			str1=Trim(document.registration.txtEmailID.value);
			var b=0;	

			for (i=0;i<document.registration.txtEmailID.value.length;i++)				
				{
				a= str1.substr([i],1);

				if (a=='@' || a=='.')	
					{
						b=b+1;	
					}	
				
				}				
			if (b<2)	
				{
				document.registration.txtEmailID.focus();
				alert("Invalid Email Id");
				return false;
				}
		}

		if ( Trim(document.registration.lstBillingCountry.value)=='') 
		{
			alert("Country should be entered");
			document.registration.lstBillingCountry.focus();
			return false;
		}
		document.registration.submit();
	}


	if (a==2)
	{
		document.registration.reset();
	}

	if (a==3)
	{

		if (Trim(document.registration.txtloginid.value)=='') 
			{
			alert("Invalid Login Id");
			document.registration.txtloginid.focus();
			return false;
			}

	
//		if (Trim(document.registration.txtFName.value)=='')
//		{
//			alert("Blank First Name");
//			document.registration.txtFName.focus();
//			return false;
//		}

//		if (Trim(document.registration.txtLName.value)=='')
//		{
//			alert("Blank Last Name");
//			document.registration.txtLName.focus();
//			return false;
//		}
		
//		if (Trim(document.registration.txtdisplayname.value)=='')
//		{
//			alert("Display Name should not be blank");
//			document.registration.txtdisplayname.focus();
//			return false;
//		}

		if (Trim(document.registration.txtEmailID.value)=='' || document.registration.txtEmailID.value.length<9 )
			{
			alert("Invalid Email Id");
			document.registration.txtEmailID.focus();
			return false;
			}
		else
		{	
			str1=Trim(document.registration.txtEmailID.value);
			var b=0;	

			for (i=0;i<document.registration.txtEmailID.value.length;i++)				
				{
				a= str1.substr([i],1);

				if (a=='@' || a=='.')	
					{
						b=b+1;	
					}	
				
				}				
			if (b<2)	
				{
				document.registration.txtEmailID.focus();
				alert("Invalid Email Id");
				return false;
				}
		}


//		if ( Trim(document.registration.txtBillingAddress.value)=='' && Trim(document.registration.txtShippingAddress.value)=='') 
//		{
//			alert("Billing Address should be entered");
//			document.registration.txtBillingAddress.focus();
//			return false;
//		}

//		if ( Trim(document.registration.txtBillingCity.value)=='' && Trim(document.registration.txtShippingCity.value)=='') 
//		{
//			alert("Billing City should be entered");
//			document.registration.txtBillingCity.focus();
//			return false;
//		}

//		if ( Trim(document.registration.txtBillingState.value)=='' && Trim(document.registration.txtShippingState.value)=='') 
//		{
//			alert("Billing State should be entered");
//			document.registration.txtBillingState.focus();
//			return false;
//		}

		if ( Trim(document.registration.lstBillingCountry.value)=='' && Trim(document.registration.lstShippingCountry.value)=='') 
		{
			alert("Billing Country should be entered");
			document.registration.lstBillingCountry.focus();
			return false;
		}


//		if ( Trim(document.registration.txtBillingZip.value)=='' && Trim(document.registration.txtShippingZip.value)=='') 
//		{
//			alert("Billing Zip should be entered");
//			document.registration.txtBillingZip.focus();
//			return false;
//		}

//		if ( Trim(document.registration.txtDayPhone.value)=='' && Trim(document.registration.txtEvePhone.value)=='') 
//		{
//			alert("Day or Evening Phone No. Required");
//			document.registration.txtDayPhone.focus();
//			return false;
//		}

//		if ( (Trim(document.registration.txtday.value)==0 || Trim(document.registration.lstBirthMonth.value)==0 || Trim(document.registration.txtBirthYear.value)==0)  ) 
//		{
//			alert("Please select Date of birth");
//			document.registration.txtday.focus();
//			return false;
//		}



		if (strToAvoid1())
		{
			alert("Day Phone no. should not be content A-Z or a-z");
			document.registration.txtDayPhone.focus();
			return false;
		}
		
		if (strToAvoid2())
		{
			alert("Evening Phone no. should not be content A-Z or a-z");
			document.registration.txtEvePhone.focus();
			return false;
		}
	
		if (strToAvoid3())
		{
			alert("Mobile Phone no. should not be content A-Z or a-z");
			document.registration.txtmobilePhone.focus();
			return false;
		}
		document.registration.submit();
	}
}

function chkboxshipaddress()
{

 if ( document.registration.chkSameAddress.checked)
	{
	document.registration.txtShippingAddress.value=document.registration.txtBillingAddress.value;
	document.registration.txtShippingCity.value=document.registration.txtBillingCity.value;
	document.registration.txtShippingState.value=document.registration.txtBillingState.value;
	document.registration.txtShippingZip.value=document.registration.txtBillingZip.value;
	document.registration.lstShippingCountry.value=document.registration.lstBillingCountry.value;
	document.registration.addrs_same.value='Y';

	if (eval('document.registration.lstBillingCountry.options[document.registration.lstBillingCountry.selectedIndex].value')=='India')	
		{
			document.registration.txtShippingState.value=eval('document.registration.lstBillingstate.options[document.registration.lstBillingstate.selectedIndex].value');
			document.registration.lstShippingState.value=eval('document.registration.lstBillingstate.options[document.registration.lstBillingstate.selectedIndex].value');
			if (eval('document.registration.lstShippingState.options[document.registration.lstShippingState.selectedIndex].value')=='Maharashtra')	
				{
					document.getElementById("txtshipingmumbaichk").style.display = 'block';
					document.getElementById("mumbai1").style.display = 'block';
				}
		}
	else
		{
    		 document.getElementById("lstShippingState").style.display = 'none';
    		 document.getElementById("txtShippingState").style.display = 'block';
			document.registration.txtShippingState.value=document.registration.txtBillingState.value;
			document.getElementById("txtshipingmumbaichk").style.display = 'none';
			document.getElementById("mumbai1").style.display = 'none';

		}
	}
else
	{
	document.registration.txtShippingAddress.value='';
	document.registration.txtShippingCity.value='';
	document.registration.txtShippingState.value='';
	document.registration.txtShippingZip.value='';
	document.registration.lstShippingCountry.value='Select Country';
	document.registration.lstShippingState.value='Select State';
	document.registration.addrs_same.value='N';
	document.getElementById("txtshipingmumbaichk").style.display = 'none';
	document.getElementById("mumbai1").style.display = 'none';
	
	
	document.registration.txtShippingAddress.disabled=false;
	document.registration.txtShippingCity.disabled=false;
	document.registration.txtShippingState.disabled=false;
	document.registration.txtShippingZip.disabled=false;
	document.registration.lstShippingCountry.disabled=false;

	}
}

function courtrysel(n)
{
	if (n==1)	
	{
		var lstBillingCountry = eval('document.registration.lstBillingCountry.options[document.registration.lstBillingCountry.selectedIndex].value');
	}
	if (n==2)
	{
		var lstShippingCountry= eval('document.registration.lstShippingCountry.options[document.registration.lstShippingCountry.selectedIndex].value');

	}
	if (n==3)	
	{
		var lstBillingCountry = eval('document.registration.lstBillingstate.options[document.registration.lstBillingstate.selectedIndex].value');
		if (eval('document.registration.lstBillingstate.options[document.registration.lstBillingstate.selectedIndex].value')=='Maharashtra')
			{
			document.registration.txtBillingCity.value='Mumbai';
 		    document.getElementById("txtBillingmumbaichk").style.display = "block";
     	    document.getElementById("mumbai").style.display = "block";
			document.registration.txtBillingmumbaichk.checked==true;
			document.registration.txtBillingCity.disabled=false;			
			}
		else
			{
			document.registration.txtBillingCity.value='';
  		    document.getElementById("txtBillingmumbaichk").style.display = "none";
     	    document.getElementById("mumbai").style.display = "none";
			document.registration.txtBillingmumbaichk.checked==false;
			document.registration.txtBillingCity.disabled=false;
			}
	}
	if (n==4)	
	{
		var lstShippingCountry = eval('document.registration.lstShippingState.options[document.registration.lstShippingState.selectedIndex].value');
		if (eval('document.registration.lstShippingState.options[document.registration.lstShippingState.selectedIndex].value')=='Maharashtra')
			{
			document.registration.txtShippingCity.value='Mumbai';
 		    document.getElementById("txtshipingmumbaichk").style.display = "block";
     	    document.getElementById("mumbai1").style.display = "block";
			document.registration.txtshipingmumbaichk.checked==true;
			document.registration.txtShippingCity.disabled=false;			
			}
		else
			{
			document.registration.txtShippingCity.value='';
  		    document.getElementById("txtshipingmumbaichk").style.display = "none";
     	    document.getElementById("mumbai1").style.display = "none";
			document.registration.txtshipingmumbaichk.checked==false;
			document.registration.txtShippingCity.disabled=false;
			}

			if (document.registration.chkSameAddress.checked)
			{
			document.registration.chkSameAddress.checked=false;
			document.registration.addrs_same.value='N';
			}
	}
}


function citymumbai(i)
{
	if (parseInt(i)==1)
		{
			if (document.registration.txtBillingmumbaichk.checked==true)
				{
				document.registration.txtBillingCity.value='Mumbai';
				document.registration.txtBillingCity.disabled=false;
				}
			else
				{
				document.registration.txtBillingCity.value='';
				document.registration.txtBillingCity.disabled=false;
				}
		}
	else
		{
		if (parseInt(i)==2)
			{
				if (document.registration.txtshipingmumbaichk.checked==true)
					{
						document.registration.txtShippingCity.value='Mumbai';
						document.registration.txtShippingCity.disabled=false;
					}
				else
					{
						document.registration.txtShippingCity.value='';
						document.registration.txtShippingCity.disabled=false;
					}
			}
		}
}




function titlesel()
	{
		var lstTitle= eval('document.registration.lstTitle.options[document.registration.lstTitle.selectedIndex].value');
	}

function daybill(a)
{
	if (a==1)
		{
		 txtday= eval('document.registration.txtday.options[document.registration.txtday.selectedIndex].value');
		}
	else
		{
		 txtAnniDate = eval('document.registration.txtAnniDate.options[document.registration.txtAnniDate.selectedIndex].value');
		}


}

function monthbill(a)
{
	if (a==1)
		{
		 lstBirthMonth = eval('document.registration.lstBirthMonth.options[document.registration.lstBirthMonth.selectedIndex].value');
		}
	else
		{

		 lstAnniMonth = eval('document.registration.lstAnniMonth.options[document.registration.lstAnniMonth.selectedIndex].value');
		}

}

function yearbill(a)
{
	if (a==1)
		{
		 txtBirthYear= eval('document.registration.txtBirthYear.options[document.registration.txtBirthYear.selectedIndex].value');
		}
	else
		{
		 txtAnniYear = eval('document.registration.txtAnniYear.options[document.registration.txtAnniYear.selectedIndex].value');
		}

}

//search query function 

function currencytype(A)
{
	var curtype
	curtype = eval('document.searchqry.currency_type.options[document.searchqry.currency_type.selectedIndex].value');
	if (curtype==2)
	{
		document.searchqry.select1.focus();
		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("-- Price --");
		opt.appendChild(txt);
		opt.value = 0;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("1-5000");
		opt.appendChild(txt);
		opt.value = 11;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("5001-10000");
		opt.appendChild(txt);
		opt.value = 12;
		cmb.options.remove(opt);
	
		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("10001-20000");
		opt.appendChild(txt);
		opt.value = 13;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("20001-35000");
		opt.appendChild(txt);
		opt.value = 14;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("35001-50000");
		opt.appendChild(txt);
		opt.value = 15;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("50001-65000");
		opt.appendChild(txt);
		opt.value = 16;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("65001-80000");
		opt.appendChild(txt);
		opt.value = 17;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("80001-above");
		opt.appendChild(txt);
		opt.value = 18;
		cmb.options.remove(opt);
	}
	else
	{
		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("-- Price --");
		opt.appendChild(txt);
		opt.value = 0;
		cmb.options.remove(opt);
		
		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("1-99");
		opt.appendChild(txt);
		opt.value = 11;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("100-299");
		opt.appendChild(txt);
		opt.value = 12;
		cmb.options.remove(opt);
	
		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("300-599");
		opt.appendChild(txt);
		opt.value = 13;
		cmb.options.remove(opt);


		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("600-799");
		opt.appendChild(txt);
		opt.value = 14;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("800-999");
		opt.appendChild(txt);
		opt.value = 15;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("1000-1499");
		opt.appendChild(txt);
		opt.value = 16;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("1500-1999");
		opt.appendChild(txt);
		opt.value = 17;
		cmb.options.remove(opt);

		var cmb = document.getElementById(A);
		var opt = document.createElement("OPTION");
		cmb.options.add(opt);
		opt.selected = false;
		var txt = document.createTextNode("2000- Above");
		opt.appendChild(txt);
		opt.value = 18;
		cmb.options.remove(opt);
	}
}



function searchprod()
{
	if (Trim(document.searchqry.searchproduct.value)=='')
		{
			alert ("Blank Text not accepted");
			document.searchqry.searchproduct.focus();
			return false;
		}
	else
		{
			document.searchqry.allvalue.value = document.searchqry.searchproduct.value;
		}
}


function searchgo(a)
{
	if (a==1)
		{
			if (Trim(document.searchqry.searchproduct.value)=='$' || Trim(document.searchqry.searchproduct.value)=='Rs.' || Trim(document.searchqry.searchproduct.value)=='Rs' || Trim(document.searchqry.searchproduct.value)=='RS.' || Trim(document.searchqry.searchproduct.value)=='RS' || Trim(document.searchqry.searchproduct.value)=='rs') 
				{
					alert ("Not accepted");
					document.searchqry.searchproduct.focus();
					return false;
				}

			if (Trim(document.searchqry.searchproduct.value)=='') 
				{
					alert ("Blank Text not accepted");
					document.searchqry.searchproduct.focus();
					return false;
				}
			else
				{
					document.searchqry.allvalue.value = document.searchqry.searchproduct.value;
					document.searchqry.select2_Criteria.value = 1;
					document.searchqry.submit();
				}
		}

	else
		if (a==3)
		{
			if (criteria_no==0)
				{
					alert ("Price not selected");
					return false;
				}
			else
				{
					document.searchqry.submit();
				}
		}
}


function func_searchaddtocart(a)
{
	var fqty;
	var cat;
	var price;
	fqty = eval('document.searchqty.homeqty'+a+'.value');
	if (fqty < 0 || Trim(fqty)=='')
	 {
		eval('document.searchqty.homeqty'+a+'.value=1');
		fqty=1;
   	 }
	cat  = eval('document.searchqty.cat'+a+'.value');
	price  = eval('document.searchqty.price'+a+'.value');
	price1 = eval('document.searchqty.price'+a+'.value');
	price2 = eval('document.searchqty.promotionprice'+a+'.value');
	if ( parseInt(price2)!=0 )
		{
			price=price2;
		}
	else
		{
			price=price1;		
		}
	document.location.href ='ItemToCart_new.asp?pid='+a+'&cat='+cat+'&price='+price+'&homeqty'+a+'='+fqty ;
}
//end search query function

//Start check subscribe email id function
function  chk_subscribe_emailid()
{
	if (Trim(document.formsubscribe.subscribeemailid.value)=='' || document.formsubscribe.subscribeemailid.value.length<9 )
		{
			if (Trim(document.formsubscribe.subscribeemailid.value)=='')
				{
					alert("Blank Subscribe Email Id not accepted");
					document.formsubscribe.subscribeemailid.focus();
					return false;
				}
			else
				{
					alert("Subscribe Email Id less than 9 character");
					document.formsubscribe.subscribeemailid.focus();
					return false;
				}
		}
	else
		{
			str1=Trim(document.formsubscribe.subscribeemailid.value);
			var b=0;	

			for (i=0;i<document.formsubscribe.subscribeemailid.value.length;i++)				
				{
					a= str1.substr([i],1);
					if (a=='@' || a=='.')	
						{
							b=b+1;	
						}	
				
				}				
					if (b<2)	
						{
							document.formsubscribe.subscribeemailid.focus();
							alert("Invalid Subscribe Email Id");
							return false;
						}
					else
						{	
							document.formsubscribe.submit();
						}
		}
}
//End check subscribe email id function
function unsubscribe_id(i)
{
	if (i==2)
	{
		document.unsubscribe.reset()
	}
	else
	{
		if ( Trim(document.unsubscribe.emailid.value)=='' || document.unsubscribe.emailid.value.length<9 )
			{
				alert("Email Id less than 9 character");
				document.unsubscribe.emailid.focus();
				return false;
			}
		else
			{	
				str1=Trim(document.unsubscribe.emailid.value);
				var b=0;	
	
				for (i=0;i<document.unsubscribe.emailid.value.length;i++)				
				{
					a= str1.substr([i],1);
					if (a=='@' || a=='.')	
						{
							b=b+1;	
						}	
					
				}				
				if (b<2)	
					{
						document.unsubscribe.emailid.focus();
						alert("Invalid Email Id");
						return false;
					}
				else
					{
					document.location.href='unsubscribe_emailid_update_new.asp?emailid='+str1;
//							document.unsubscribe.submit()
					}
			}
	}
}

//Start of function forgot password check
function forgotpasschk()
{
	if ( Trim(document.forgotpasswordform.forgotemailid.value)=='' || document.forgotpasswordform.forgotemailid.value.length<9 )
		{
			alert("Email Id less than 9 character");
			document.forgotpasswordform.forgotemailid.focus();
			return false;
		}
	else
		{	
			str1=Trim(document.forgotpasswordform.forgotemailid.value);
			var b=0;	

			for (i=0;i<document.forgotpasswordform.forgotemailid.value.length;i++)				
			{
				a= str1.substr([i],1);
				if (a=='@' || a=='.')	
					{
						b=b+1;	
					}	
				
			}				
			if (b<2)	
				{
					document.forgotpasswordform.forgotemailid.focus();
					alert("Invalid Email Id");
					return false;
				}
	}

	
		document.forgotpasswordform.submit();
			
}
function forgotmonthbill(a)
{
	if (a==1)
		{
			txtday = eval('document.forgotpasswordform.txtday.options[document.forgotpasswordform.txtday.selectedIndex].value');
		}
	
	if (a==2)
		{
			 lstBirthMonth = eval('document.forgotpasswordform.lstBirthMonth.options[document.forgotpasswordform.lstBirthMonth.selectedIndex].value');
		}
	if (a==3)
		{
			 txtBirthYear = eval('document.forgotpasswordform.txtBirthYear.options[document.forgotpasswordform.txtBirthYear.selectedIndex].value');
		}
}


//end of function forgot password 


function  chk_diwali_emailid()
{
	if (Trim(document.formdiwali.subscribeemailid.value)=='' || document.formdiwali.subscribeemailid.value.length<9 )
		{
			alert("Subscribe Email Id less than 9 character");
			document.formdiwali.subscribeemailid.focus();
			return false;
		}
	else
		{
			str1=Trim(document.formdiwali.subscribeemailid.value);
			var b=0;	

			for (i=0;i<document.formdiwali.subscribeemailid.value.length;i++)				
				{
					a= str1.substr([i],1);
					if (a=='@' || a=='.')	
						{
							b=b+1;	
						}	
				
				}				
					if (b<2)	
						{
							document.formdiwali.subscribeemailid.focus();
							alert("Invalid Subscribe Email Id");
							return false;
						}
					else
						{	
							document.formdiwali.submit();
						}
		}
}
//End check subscribe email id function



//Trim function start here
function Trim(TRIM_VALUE){
if(TRIM_VALUE.length < 1){
return"";
}
TRIM_VALUE = RTrim(TRIM_VALUE);
TRIM_VALUE = LTrim(TRIM_VALUE);
if(TRIM_VALUE==""){
return "";
}
else{
return TRIM_VALUE;
}
} //End Function

function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){
return"";
}
var iTemp = v_length -1;

while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;

} //End While
return strTemp;

} //End Function

function LTrim(VALUE){
var w_space = String.fromCharCode(32);
if(v_length < 1){
return"";
}
var v_length = VALUE.length;
var strTemp = "";

var iTemp = 0;

while(iTemp < v_length){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(iTemp,v_length);
break;
}
iTemp = iTemp + 1;
} //End While
return strTemp;
} //End Function


//In day and evening telephone no. A-Z and a-z character rejected 

function strToAvoid1()
{
	var strVal;
	var strArr=new Array();
	var str;
	strToAvoid="A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z" /// Add the characters you want to avoid the user to enter seperated by a "|"
	strArr=strToAvoid.split("|")
//	strVal = new String(document.registration.txtDayPhone.value)
//	if(strVal!="")
//	{
//		for(i=0;i<strArr.length;i++)
//		{
//			if(strVal.indexOf(strArr[i]) != -1)
//			{
//				return true;
//			}
//		}
//	}
		return false;
}

function strToAvoid2()
{
	var strVal;
	var strArr=new Array();
	var str;
	strToAvoid="A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z" /// Add the characters you want to avoid the user to enter seperated by a "|"
	strArr=strToAvoid.split("|")
//	strVal = new String(document.registration.txtEvePhone.value)
//	if(strVal!="")
//	{
//		for(i=0;i<strArr.length;i++)
//		{
//			if(strVal.indexOf(strArr[i]) != -1)
//			{
//				return true;
//			}
//		}
//	}
		return false;
}

function strToAvoid3()
{
	var strVal;
	var strArr=new Array();
	var str;
	strToAvoid="A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z" /// Add the characters you want to avoid the user to enter seperated by a "|"
	strArr=strToAvoid.split("|")
//	strVal = new String(document.registration.txtmobilePhone.value)
//	if(strVal!="")
//	{
//		for(i=0;i<strArr.length;i++)
//		{
//			if(strVal.indexOf(strArr[i]) != -1)
//			{
//				return true;
//			}
//		}
//	}
		return false;
}
// function strtoavoid () end
//-->
