/*add state - starts*/
function ValidatorTrim(s)
{
	var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
	return (m == null) ? "" : m[1];
}
function  checkState()
{
	if(ValidatorTrim(document.frmState.state_name.value)=='')
	{
		alert('Please enter statename');
		document.getElementById('state_name').focus();
		return false;		
	} 				
	return true;
}
function dostateReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmState.state_name.value = ""
}
/*add state - ends*/
/*add district - starts*/
function doDisReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmDis.district_name.value = ""
}
function checkDis()
{
	if(document.getElementById("select1").value=="select1")
	{
		alert("Please select state name");
		document.frmDis.select1.focus();
		return false
	}
	if(ValidatorTrim(document.frmDis.district_name.value)=='')
	{
		alert('Please enter district name');
		document.getElementById('district_name').focus();
		return false;		
	} 				
	return true;
}
function doDisReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmDis.district_name.value = ""
}
/*add district - ends*/
/*add taluka - starts*/
function doTalReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmTal.taluka_name.value = ""
}
function checkTal()
{
	if(document.getElementById("select1").value=="select1")
	{
		alert("Please select state name");
		document.frmTal.select1.focus();
		return false
	}
	if(ValidatorTrim(document.frmTal.taluka_name.value)=='')
	{
		alert('Please enter taluka name');
		document.getElementById('taluka_name').focus();
		return false;		
	} 				
	return true;
}
function doTalReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmTal.taluka_name.value = ""
}
/*add taluka - ends*/
/*registration - starts*/
function doRegReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmReg.name_shop_company.value = ""
	document.frmReg.username.value = ""
	document.frmReg.password.value = ""
	document.frmReg.corres_add.value = ""
	document.frmReg.phone.value = ""
	document.frmReg.mobile.value = ""
	document.frmReg.email.value = ""
	document.frmReg.website.value = ""
	document.frmReg.branch_corres_add.value = ""
	document.frmReg.branch_phone.value = ""
	document.frmReg.branch_mobile.value = ""
	document.frmReg.name_proprietorMDCEO.value = ""
	//document.frmReg.dob.value = ""
	document.frmReg.mobile_proprietorMDCEO.value = ""
	document.frmReg.work_nature.value = ""
}
var dtCh= "-";
var minYear=1900;
var maxYear=2100;
function isInteger(s)
{
	var i;
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    return true;
}
function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}
function daysInFebruary (year)
{
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}
function isDate(dtStr)
{
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strMonth=dtStr.substring(0,pos1)
	var strDay=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		alert("The date format should be : mm-dd-yyyy")
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month")
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day")
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date")
		return false
	}
return true
}
function checkRegVal()
{
	if(document.getElementById("country").value=="selectCnt")
	{
		alert("Please select country name");
		document.frmReg.country.focus();
		return false
	}	
	if(document.getElementById("country").value=="India")
	{
		if(document.getElementById("select1").value=="select1")
		{
			alert("Please select state name");
			document.frmReg.select1.focus();
			if(document.getElementById("select1").value!="select1")
			{
				document.getElementById('startName').className = "visibleDiv";
			}
			else
			{
				return false;
			}
		}	
	}
	if(ValidatorTrim(document.frmReg.name_shop_company.value)=='')
	{
		alert('Please enter shop or company name');
		document.getElementById('name_shop_company').focus();
		return false;		
	} 
	var newUsnm=document.frmReg.username.value;
	if(ValidatorTrim(document.frmReg.username.value)=='')
	{
		alert('Please enter username');
		document.getElementById('username').focus();
		return false;		
	}
	if(newUsnm!="")
	{
		if(newUsnm.indexOf(" ")!=-1)
		{
	    	alert("Please dont use space for username.");
		 	document.frmReg.username.value="";
		 	document.frmReg.username.focus();
		 	return false;
		}
		//if(newUsnm.length<6||newUsnm.length>26)
		if(newUsnm.length<5||newUsnm.length>8)
		{
		   alert("Username length must lie between 5 - 8 Characters Only");
		   document.frmReg.username.value="";
		   document.frmReg.username.focus();
		   return false;
		}
	}
	var newpass=document.frmReg.password.value;
	if(document.frmReg.password.value=="")
    {
     	alert("Please Enter the Password");
     	document.frmReg.password.focus();
     	return false;
     }
	 if(newpass!="")
	 {
	 	if(newpass.indexOf(" ")!=-1)
		{
	    	alert("Please dont use space for password..");
		 	document.frmReg.password.value="";
		 	document.frmReg.password.focus();
		 	return false;
		}
		if(newpass.length<5||newpass.length>8)
		{
		   alert("Password length must lie between 5 - 8 Characters Only");
		   document.frmReg.password.value="";
		   document.frmReg.password.focus();
		   return false;
		}
	}
	if(document.frmReg.corres_add.value!="")
	{
		if(document.frmReg.corres_add.value=='')
		{
			alert('Please enter correspondance address');
			document.frmReg.corres_add.focus();
			return false;	
		}
	}
	if(document.frmReg.phone.value!="")
	{	
		if(ValidatorTrim(document.frmReg.phone.value)=='')
		{
				alert('Please enter phone');
				document.getElementById('phone').focus();
				return false;		
		}
		var iphoneChars = "!@#$%^*+=\;{}\":<>?";
		var digphonedesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmReg.phone.value!="")
		{
			for (var i = 0; i < document.frmReg.phone.value.length; i++)
			{ 
				if(iphoneChars.indexOf(document.frmReg.phone.value.charAt(i)) != -1) 
				{				
					alert('phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper phone.');
					document.frmReg.phone.value="";
					document.frmReg.phone.focus();
					return false;
					}
					if(digphonedesit.indexOf(document.frmReg.phone.value.charAt(i)) != -1) 
					{				
						alert('phone contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
						document.frmReg.phone.value="";
						document.frmReg.phone.focus();
						return false;
					}
				}
		}
	}
	if(document.frmReg.mobile.value=="")
	{	
		alert('Please enter Mobile No.in proper format e.g. 0000000000.\nIt is compulsory to provide Mobile No. to receive message after successful registration.');
		document.frmReg.mobile.value="";
		document.frmReg.mobile.focus();
		return false;
	}
		var imobileChars = "!@#$%^*+=\;{}\":<>?";
		var digmobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmReg.mobile.value!="")
		{
			for (var i = 0; i < document.frmReg.mobile.value.length; i++)
			{ 
				if(imobileChars.indexOf(document.frmReg.mobile.value.charAt(i)) != -1) 
				{				
					alert('Mobile No. contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Mobile No.');
					document.frmReg.mobile.value="";
					document.frmReg.mobile.focus();
					return false;
					}
					if(digmobiledesit.indexOf(document.frmReg.mobile.value.charAt(i)) != -1) 
					{				
						alert('Mobile No. contains alphabates etc.\nThese are not allowed.\nPlease remove them and try again and enter only numbers..');
						document.frmReg.mobile.value="";
						document.frmReg.mobile.focus();
						return false;
					}
				}
		}
	if(document.getElementById("country").value!="India")
	{
		if(document.frmReg.email.value == "")
		{
			alert("Please provide Email-Id");
			document.getElementById('startName').className = "visibleDiv";
			document.frmReg.email.focus();
			return false;
		}
		if(document.frmReg.email.value!="")
		{			
			for(i=0;i<=document.frmReg.email.value.length;i++)
			{			
				if(document.frmReg.email.value.charAt(i)==" ")
				{
					alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
					document.getElementById('startName').className = "visibleDiv";
					document.frmReg.email.focus();
					return false;
				}
			}
			var flag;
			flag=0;
			var temp;
			var valid = "0123456789"
			temp = "" + document.frmReg.email.value.charAt(0);
			if (valid.indexOf(temp)!= "-1")
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.getElementById('startName').className = "visibleDiv";
				document.frmReg.email.select();
				return false;
			}
			for(i=0;i<=document.frmReg.email.value.length;i++)
			{			
				if(document.frmReg.email.value.charAt(i)=="@")
				{
					flag=flag+1;
				}
			}
			if( flag >1)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.getElementById('startName').className = "visibleDiv";
				document.frmReg.email.select();
				return false;
			}
			for(i=0;i<=document.frmReg.email.value.length;i++)
			{	
				if(document.frmReg.email.value.charAt(i)==".")
				{
					flag=flag+1;
					break;
				}
			}
			if(flag<2)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.getElementById('startName').className = "visibleDiv";
				document.frmReg.email.select();
				return false;
			}
		}
	}
	else
	{
		if(document.frmReg.email.value!="")
		{			
			for(i=0;i<=document.frmReg.email.value.length;i++)
			{			
				if(document.frmReg.email.value.charAt(i)==" ")
				{
					alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
					document.frmReg.email.focus();
					return false;
				}
			}
			var flag;
			flag=0;
			var temp;
			var valid = "0123456789"
			temp = "" + document.frmReg.email.value.charAt(0);
			if (valid.indexOf(temp)!= "-1")
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmReg.email.select();
				return false;
			}
			for(i=0;i<=document.frmReg.email.value.length;i++)
			{			
				if(document.frmReg.email.value.charAt(i)=="@")
				{
					flag=flag+1;
				}
			}
			if( flag >1)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmReg.email.select();
				return false;
			}
			for(i=0;i<=document.frmReg.email.value.length;i++)
			{	
				if(document.frmReg.email.value.charAt(i)==".")
				{
					flag=flag+1;
					break;
				}
			}
			if(flag<2)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmReg.email.select();
				return false;
			}
		}
	}
	if(document.frmReg.website.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmReg.website.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmReg.website.focus();
				return false;
			}
			
			tname = frmReg.website.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmReg.website.focus();
				return false;
			}
			if (document.frmReg.website.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmReg.website.focus();
				return false;
			}
			if (document.frmReg.website.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmReg.website.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmReg.website.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmReg.website.value=''; 
				document.frmReg.website.focus();
				return false;
			}
	}
	if(document.frmReg.branch_corres_add.value!="")
	{
		if(document.frmReg.branch_corres_add.value=='')
		{
			alert('Please enter branch correspondance address');
			document.frmReg.branch_corres_add.focus();
			return false;	
		}
	}
	if(document.frmReg.branch_phone.value!="")
	{	
		var ibranch_phoneChars = "!@#$%^*+=\;{}\":<>?";
		var digbranch_phonedesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmReg.branch_phone.value!="")
		{
			for (var i = 0; i < document.frmReg.branch_phone.value.length; i++)
			{ 
				if(ibranch_phoneChars.indexOf(document.frmReg.branch_phone.value.charAt(i)) != -1) 
				{				
					alert('branch_phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper branch_phone.');
					document.frmReg.branch_phone.value="";
					document.frmReg.branch_phone.focus();
					return false;
					}
					if(digbranch_phonedesit.indexOf(document.frmReg.branch_phone.value.charAt(i)) != -1) 
					{				
						alert('branch_phone contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmReg.branch_phone.value="";
						document.frmReg.branch_phone.focus();
						return false;
					}
				}
		}
	}
	if(document.frmReg.branch_mobile.value!="")
	{
		var ibranch_mobileChars = "!@#$%^*+=\;{}\":<>?";
		var digbranch_mobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmReg.branch_mobile.value!="")
		{
			for (var i = 0; i < document.frmReg.branch_mobile.value.length; i++)
			{ 
				if(ibranch_mobileChars.indexOf(document.frmReg.branch_mobile.value.charAt(i)) != -1) 
				{				
					alert('branch_mobile contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper branch_mobile.');
					document.frmReg.branch_mobile.value="";
					document.frmReg.branch_mobile.focus();
					return false;
					}
					if(digbranch_mobiledesit.indexOf(document.frmReg.branch_mobile.value.charAt(i)) != -1) 
					{				
						alert('branch_mobile contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmReg.branch_mobile.value="";
						document.frmReg.branch_mobile.focus();
						return false;
					}
				}
		}
	}
	if(document.frmReg.name_proprietorMDCEO.value!="")
	{
		if(ValidatorTrim(document.frmReg.name_proprietorMDCEO.value)=='')
		{
				alert('Please enter name_proprietorMDCEO');
				document.getElementById('name_proprietorMDCEO').focus();
				return false;		
		}
		var iname_proprietorMDCEOChars = "!@#$%^*+=\;{}\":<>?";
		var digname_proprietorMDCEOdesit = "0123456789"
		if(document.frmReg.name_proprietorMDCEO.value!="")
		{
			for (var i = 0; i < document.frmReg.name_proprietorMDCEO.value.length; i++)
			{ 
				if(iname_proprietorMDCEOChars.indexOf(document.frmReg.name_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('name_proprietorMDCEO contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper name_proprietorMDCEO.');
					document.frmReg.name_proprietorMDCEO.value="";
					document.frmReg.name_proprietorMDCEO.focus();
					return false;
					}
					if(digname_proprietorMDCEOdesit.indexOf(document.frmReg.name_proprietorMDCEO.value.charAt(i)) != -1) 
					{				
						alert('name_proprietorMDCEO contains numbers etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmReg.name_proprietorMDCEO.value="";
						document.frmReg.name_proprietorMDCEO.focus();
						return false;
					}
				}
		}
	}
	if(document.frmReg.mobile_proprietorMDCEO.value!="")
	{
		/*var dt=document.frmReg.dob;
		if (isDate(dt.value)==false){
			dt.focus()
			return false
		}*/
		if(ValidatorTrim(document.frmReg.mobile_proprietorMDCEO.value)=='')
		{
				alert('Please enter mobile_proprietorMDCEO');
				document.getElementById('mobile_proprietorMDCEO').focus();
				return false;		
		}
		var imobile_proprietorMDCEOChars = "!@#$%^*+=\;{}\":<>?";
		var digmobile_proprietorMDCEOdesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmReg.mobile_proprietorMDCEO.value!="")
		{
			for (var i = 0; i < document.frmReg.mobile_proprietorMDCEO.value.length; i++)
			{ 
				if(imobile_proprietorMDCEOChars.indexOf(document.frmReg.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('mobile_proprietorMDCEO contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper mobile_proprietorMDCEO.');
					document.frmReg.mobile_proprietorMDCEO.value="";
					document.frmReg.mobile_proprietorMDCEO.focus();
					return false;
					}
					if(digmobile_proprietorMDCEOdesit.indexOf(document.frmReg.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
					{				
						alert('mobile_proprietorMDCEO contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmReg.mobile_proprietorMDCEO.value="";
						document.frmReg.mobile_proprietorMDCEO.focus();
						return false;
					}
				}
		}
	}
	if(document.frmReg.work_nature.value!="")
	{
		if(ValidatorTrim(document.frmReg.work_nature.value)=='')
		{
				alert('Please enter work nature upto 600 chars');
				document.getElementById('work_nature').focus();
				return false;		
		}
		var iwork_natureChars = "!@#$%^*+=\;{}\":<>?";
		var digwork_naturedesit = "0123456789"
		if(document.frmReg.work_nature.value!="")
		{
			for (var i = 0; i < document.frmReg.work_nature.value.length; i++)
			{ 
				if(iwork_natureChars.indexOf(document.frmReg.work_nature.value.charAt(i)) != -1) 
				{				
					alert('work nature contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper work_nature upto 600 chars.');
					document.frmReg.work_nature.value="";
					document.frmReg.work_nature.focus();
					return false;
					}
					if(digwork_naturedesit.indexOf(document.frmReg.work_nature.value.charAt(i)) != -1) 
					{				
						alert('work nature contains numbers etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates upto 600 chars');
						document.frmReg.work_nature.value="";
						document.frmReg.work_nature.focus();
						return false;
					}
				}
		}
	}
	return true;
}
/*registration - ends*/
/*login - ends*/
function doLogReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmLog.username.value = ""
	document.frmLog.password.value = ""
}
function checkLogVal()
{
	if(document.frmLog.username.value=="")
	{
		alert("Please enter username for login");
		document.frmLog.username.focus();
		return false;
	}
	if(document.frmLog.password.value=="")
	{
		alert("Please enter password for login");
		document.frmLog.password.focus();
		return false;
	}
	return true;
}
/*login - ends*/
/*forgot password - starts*/
function doForPwdReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmForPwd.username.value = ""
}
function checkForPass()
{
	if(document.frmForPwd.username.value == "")
	{
			alert("Please provide Username")
			document.frmForPwd.username.focus();
			return false;
	}
}
/*forgot password - ends*/
/*change password - starts*/
function doForPwdReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.fmrChgePwd.cpassword.value = ""
	document.fmrChgePwd.password.value = ""
	document.fmrChgePwd.password_confirm.value = ""
}
function checkChngePwdVal()
{
	if(document.fmrChgePwd.cpassword.value=="")
	{
		alert("Please provide your old Password");
		document.fmrChgePwd.cpassword.focus();
		return false;
	}
	if(document.fmrChgePwd.cpassword.value!="")
	{
		if(document.fmrChgePwd.pwd.value!=document.fmrChgePwd.cpassword.value)
		{
			alert("Please provide your valid old password");
			document.fmrChgePwd.cpassword.focus();
			return false;
		}
	}
	var newpass=document.fmrChgePwd.password.value;
	if(document.fmrChgePwd.password.value=="")
	{
		alert("Please enter new password");
		document.fmrChgePwd.password.focus();
		return false;
	}
	if(newpass!="")
	{
		if(newpass.indexOf(" ")!=-1)
		{
			alert("Please dont use space for password");
			document.fmrChgePwd.password.value="";
			document.fmrChgePwd.password.focus();
			return false;
		}
		if(newpass.length<5||newpass.length>8)
		{
		alert("Password length must lie between 5 - 8 Characters");
		document.fmrChgePwd.password.value="";
		document.fmrChgePwd.password.focus();
		return false;
		}
	}
	if(document.fmrChgePwd.password.value!=document.fmrChgePwd.password_confirm.value)
	{
		alert("Both New and Confirm Password must be same");
		document.fmrChgePwd.password_confirm.focus();
		return false;
	}
}
/*change password - ends*/
/*feedback - ends*/
function doFeedReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmFeed.fullname.value = ""
	document.frmFeed.add.value = ""
	document.frmFeed.email.value = ""
	document.frmFeed.phone.value = ""
	document.frmFeed.mobile.value = ""
	document.frmFeed.security_code.value = ""
}
function checkFeedVal()
{
	if(ValidatorTrim(document.frmFeed.fullname.value)=='')
	{
			alert('Please enter fullname');
			document.getElementById('fullname').focus();
			return false;		
	}
	var ifullnameChars = "-_!@#$%^*+=\;{}\":<>?";
	var digfullnamedesit = "0123456789"
	if(document.frmFeed.fullname.value!="")
	{
		for (var i = 0; i < document.frmFeed.fullname.value.length; i++)
		{ 
			if(ifullnameChars.indexOf(document.frmFeed.fullname.value.charAt(i)) != -1) 
			{				
				alert('Fullname contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper fullname.');
				document.frmFeed.fullname.value="";
				document.frmFeed.fullname.focus();
				return false;
				}
				if(digfullnamedesit.indexOf(document.frmFeed.fullname.value.charAt(i)) != -1) 
				{				
					alert('Fullname contains Numbers etc.\nThese are not allowed.\nPlease remove them and try again and enter only alphabates..');
					document.frmFeed.fullname.value="";
					document.frmFeed.fullname.focus();
					return false;
				}
			}
	}
	if(document.frmFeed.add.value!="")
	{
		for(i=0;i<=document.frmFeed.add.value.length;i++)
		{	if(ValidatorTrim(document.frmFeed.add.value)=='')
		{
			alert('Please enter Address');
			document.getElementById('add').focus();
			return false;		
		}}
	}
	if(ValidatorTrim(document.frmFeed.email.value)=='')
	{
		alert('Please enter email id');
		document.getElementById('email').focus();
		return false;		
	}
	if(document.frmFeed.email.value!="")
	{			
		for(i=0;i<=document.frmFeed.email.value.length;i++)
		{			
			if(document.frmFeed.email.value.charAt(i)==" ")
			{
				alert("Invalid email-Id");
				document.frmFeed.email.focus();
				return false;
			}
		}
		var flag;
		flag=0;
		var temp;
		var valid = "0123456789"
		temp = "" + document.frmFeed.email.value.charAt(0);
     	if (valid.indexOf(temp)!= "-1")
		{
			alert("Invalid email-Id");
			document.frmFeed.email.select();
			return false;
		}
		for(i=0;i<=document.frmFeed.email.value.length;i++)
		{			
			if(document.frmFeed.email.value.charAt(i)=="@")
			{
				flag=flag+1;
			}
		}
		if( flag >1)
		{
			alert("Invalid email-Id");
			document.frmFeed.email.select();
			return false;
		}
		for(i=0;i<=document.frmFeed.email.value.length;i++)
		{	
			if(document.frmFeed.email.value.charAt(i)==".")
			{
				flag=flag+1;
				break;
			}
		}
		if(flag<2)
		{
			alert("Invalid email-Id");
			document.frmFeed.email.select();
			return false;
		}
	}
	if((document.frmFeed.phone.value=="") && (document.frmFeed.mobile.value==""))
	{
		alert("Please enter either Landline No. or Mobile No.")
		document.frmFeed.phone.focus();
		return false;
	}
	/*var iphonessssChars = "!@#$%^*+=\;{}\":<>?";
	var dddddigphonedesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
	if(document.frmFeed.phone.value!="")
	{
		for (var i = 0; i < document.frmFeed.phone.value.length; i++)
		{ 
			if(iphonessssChars.indexOf(document.frmFeed.phone.value.charAt(i)) != -1) 
			{				
				alert('Landline No. contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper phone.');
				document.frmFeed.phone.value="";
				document.frmFeed.phone.focus();
				return false;
				}
				if(dddddigphonedesit.indexOf(document.frmFeed.phone.value.charAt(i)) != -1) 
				{				
					alert('Landline No. contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
					document.frmFeed.phone.value="";
					document.frmFeed.phone.focus();
					return false;
				}
			}
	}
	var imdddobileChars = "!@#$%^*+=\;{}\":<>?";
	var digmddddobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
	if(document.frmFeed.mobile.value!="")
	{
		for (var i = 0; i < document.frmFeed.mobile.value.length; i++)
		{ 
			if(imdddobileChars.indexOf(document.frmFeed.mobile.value.charAt(i)) != -1) 
			{				
				alert('Mobile No. contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper mobile.');
				document.frmFeed.mobile.value="";
				document.frmFeed.mobile.focus();
				return false;
				}
				if(digmddddobiledesit.indexOf(document.frmFeed.mobile.value.charAt(i)) != -1) 
				{				
					alert('Mobile No. contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
					document.frmFeed.mobile.value="";
					document.frmFeed.mobile.focus();
					return false;
				}
			}
	}*/
	if(document.getElementById("enqFor").value=="select")
	{
		alert("Please select enquiry for");
		document.frmFeed.enqFor.focus();
		return false;
	}	
	if(document.frmFeed.security_code.value=="")
	{
		alert("Please enter Verification Code properly as shown in window.");
		document.frmFeed.security_code.focus();
		return false;
	}
	return true;
}
/*feedback - ends*/
/*admin- login - starts*/
function doAdnLogReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmAdLgn.admin_username.value = ""
	document.frmAdLgn.admin_password.value = ""
}
function checkAdnLogVal()
{
	if(ValidatorTrim(document.frmAdLgn.admin_username.value)=='')
	{
			alert('Please enter admin username');
			document.getElementById('admin_username').focus();
			return false;		
	} 
	if(ValidatorTrim(document.frmAdLgn.admin_password.value)=='')
	{
			alert('Please enter admin password');
			document.getElementById('admin_password').focus();
			return false;		
	} 
	return true;
}
/*admin- login - ends*/
/*sononser image - starts*/
function doSpnImgReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmSpnImg.link.value = ""
	document.frmSpnImg.uploaded.value = ""
}
function checkSpnImgVal()
{
	if(document.frmSpnImg.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmSpnImg.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmSpnImg.link.focus();
				return false;
			}
			
			tname = frmSpnImg.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmSpnImg.link.focus();
				return false;
			}
			if (document.frmSpnImg.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmSpnImg.link.focus();
				return false;
			}
			if (document.frmSpnImg.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmSpnImg.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmSpnImg.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmSpnImg.link.value=''; 
				document.frmSpnImg.link.focus();
				return false;
			}
	}
	if(ValidatorTrim(document.frmSpnImg.uploaded.value)=='')
	{
		alert('Please add image only of .gif format');
		document.getElementById('uploaded').focus();
		return false;		
	}
	return true;
}
/*sononser image - ends*/
/*change admin password - ends*/
function doAdPwdCgReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.fmrChgeAdmPwd.cpassword.value = ""
	document.fmrChgeAdmPwd.password.value = ""
	document.fmrChgeAdmPwd.password_confirm.value = ""
}
function checkAdmPwdVal()
{
	if(document.fmrChgeAdmPwd.cpassword.value=="")
	{
		alert("Please provide your old Password");
		document.fmrChgeAdmPwd.cpassword.focus();
		return false;
	}
	if(document.fmrChgeAdmPwd.cpassword.value!="")
	{
		if(document.fmrChgeAdmPwd.pwd.value!=document.fmrChgeAdmPwd.cpassword.value)
		{
			alert("Please provide your valid old password");
			document.fmrChgeAdmPwd.cpassword.focus();
			return false;
		}
	}
	var newpass=document.fmrChgeAdmPwd.password.value;
	if(document.fmrChgeAdmPwd.password.value=="")
	{
		alert("Please enter new password");
		document.fmrChgeAdmPwd.password.focus();
		return false;
	}
	if(newpass!="")
	{
		if(newpass.indexOf(" ")!=-1)
		{
			alert("Please dont use space for password");
			document.fmrChgeAdmPwd.password.value="";
			document.fmrChgeAdmPwd.password.focus();
			return false;
		}
		if(newpass.length<1||newpass.length>16)
		{
			alert("Password length must lie between 1 - 16 Characters");
			document.fmrChgeAdmPwd.password.value="";
			document.fmrChgeAdmPwd.password.focus();
			return false;
		}
	}
	if(document.fmrChgeAdmPwd.password.value!=document.fmrChgeAdmPwd.password_confirm.value)
	{
			alert("Both New and Confirm Password must be same");
			document.fmrChgeAdmPwd.password_confirm.focus();
			return false;
	}
	return true;
}
/*change admin password - ends*/
/*right side image - starts*/
function doRghtSdeImgReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmAddRghtSdeImg.link.value = ""
	document.frmAddRghtSdeImg.userfile.value = ""
}
function checkfrmAddRghtSdeImgVal()
{
	if(document.frmAddRghtSdeImg.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmAddRghtSdeImg.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmAddRghtSdeImg.link.focus();
				return false;
			}
			
			tname = frmAddRghtSdeImg.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmAddRghtSdeImg.link.focus();
				return false;
			}
			if (document.frmAddRghtSdeImg.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmAddRghtSdeImg.link.focus();
				return false;
			}
			if (document.frmAddRghtSdeImg.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmAddRghtSdeImg.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmAddRghtSdeImg.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmAddRghtSdeImg.link.value=''; 
				document.frmAddRghtSdeImg.link.focus();
				return false;
			}
	}
	if(ValidatorTrim(document.frmAddRghtSdeImg.userfile.value)=='')
	{
		alert('Please add image only of .gif,.jpeg,.png,.bmp format');
		document.getElementById('userfile').focus();
		return false;		
	} 
	return true;
}
/*right side image - ends*/
/*Index Bottom Adv - starts*/
function doAddIndBtmAdvtReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmAddIndBtmAdvt.link.value = ""
	document.frmAddIndBtmAdvt.uploaded.value = ""
}
function checkfrmAddIndBtmAdvtVal()
{
	if(document.frmAddIndBtmAdvt.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmAddIndBtmAdvt.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
			
			tname = frmAddIndBtmAdvt.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmAddIndBtmAdvt.link.focus();
				return false;
			}
			if (document.frmAddIndBtmAdvt.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
			if (document.frmAddIndBtmAdvt.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmAddIndBtmAdvt.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmAddIndBtmAdvt.link.value=''; 
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
	}
	if(ValidatorTrim(document.frmAddIndBtmAdvt.uploaded.value)=='')
	{
		alert('Please add image only of .gif format');
		document.getElementById('uploaded').focus();
		return false;		
	}
	return true;
}
/*Index Bottom Adv - ends*/
/*Bottom Long Strip - starts*/
function doBtmLngStpReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmBtmLngStp.link.value = ""
	document.frmBtmLngStp.userfile.value = ""
}
function checkBtmLngStpVal()
{
	if(document.frmBtmLngStp.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmBtmLngStp.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmBtmLngStp.link.focus();
				return false;
			}
			
			tname = frmBtmLngStp.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmBtmLngStp.link.focus();
				return false;
			}
			if (document.frmBtmLngStp.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmBtmLngStp.link.focus();
				return false;
			}
			if (document.frmBtmLngStp.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmBtmLngStp.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmBtmLngStp.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmBtmLngStp.link.value=''; 
				document.frmBtmLngStp.link.focus();
				return false;
			}
	}
	if(ValidatorTrim(document.frmBtmLngStp.userfile.value)=='')
	{
		alert('Please add image only of .gif,.jpeg,.png,.bmp format');
		document.getElementById('userfile').focus();
		return false;		
	} 
	return true;
}
/*Bottom Long Strip - ends*/
/*edit bottom long strip - starts*/
function editBtmLngStpVal()
{
	if(document.editBtmLngStp.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.editBtmLngStp.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.editBtmLngStp.link.focus();
				return false;
			}
			
			tname = editBtmLngStp.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				editBtmLngStp.link.focus();
				return false;
			}
			if (document.editBtmLngStp.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.editBtmLngStp.link.focus();
				return false;
			}
			if (document.editBtmLngStp.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.editBtmLngStp.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.editBtmLngStp.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.editBtmLngStp.link.value=''; 
				document.editBtmLngStp.link.focus();
				return false;
			}
	}
	return true;
}
/*edit bottom long strip - starts*/
/*edit sponser image - starts*/
function editSponImgVal()
{
	if(document.editSponImg.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.editSponImg.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.editSponImg.link.focus();
				return false;
			}
			
			tname = editSponImg.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				editSponImg.link.focus();
				return false;
			}
			if (document.editSponImg.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.editSponImg.link.focus();
				return false;
			}
			if (document.editSponImg.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.editSponImg.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.editSponImg.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.editSponImg.link.value=''; 
				document.editSponImg.link.focus();
				return false;
			}
	}
	return true;
}
/*edit sponser image - ends*/
/*edit right side image - starts*/
function editRightVal()
{
	if(document.editRghtSd.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.editRghtSd.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.editRghtSd.link.focus();
				return false;
			}
			
			tname = editRghtSd.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				editRghtSd.link.focus();
				return false;
			}
			if (document.editRghtSd.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.editRghtSd.link.focus();
				return false;
			}
			if (document.editRghtSd.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.editRghtSd.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.editRghtSd.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.editRghtSd.link.value=''; 
				document.editRghtSd.link.focus();
				return false;
			}
	}
	return true;
}
/*edit right side image - ends*/
/*edit index btm Advt - starts*/
function editIdxBtmAdvVal()
{
	if(document.editIdxBtmAdv.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.editIdxBtmAdv.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.editIdxBtmAdv.link.focus();
				return false;
			}
			
			tname = editIdxBtmAdv.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				editIdxBtmAdv.link.focus();
				return false;
			}
			if (document.editIdxBtmAdv.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.editIdxBtmAdv.link.focus();
				return false;
			}
			if (document.editIdxBtmAdv.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.editIdxBtmAdv.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.editIdxBtmAdv.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.editIdxBtmAdv.link.value=''; 
				document.editIdxBtmAdv.link.focus();
				return false;
			}
	}
	return true;
}
/*edit index btm Advt - ends*/
/*edit profile - starts*/
function editFrmVal()
{
	if(ValidatorTrim(document.frmEditUser.name_shop_company.value)=='')
	{
		alert('Please enter Name of Shop or Company');
		document.getElementById('name_shop_company').focus();
		return false;		
	} 
	var iname_shop_companyChars = "!@#$%^*+=\;{}\":<>?";
	var digname_shop_companydesit = "0123456789"
	if(document.frmEditUser.name_shop_company.value!="")
	{
		for (var i = 0; i < document.frmEditUser.name_shop_company.value.length; i++)
		{ 
			if(iname_shop_companyChars.indexOf(document.frmEditUser.name_shop_company.value.charAt(i)) != -1) 
			{				
				alert('Name of Shop or Company contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Name of Shop or Company.');
				document.frmEditUser.name_shop_company.value="";
				document.frmEditUser.name_shop_company.focus();
				return false;
			}
			if(digname_shop_companydesit.indexOf(document.frmEditUser.name_shop_company.value.charAt(i)) != -1) 
			{				
				alert('Name of Shop or Company contains numbers etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates');
				document.frmEditUser.name_shop_company.value="";
				document.frmEditUser.name_shop_company.focus();
				return false;
			}
		}
	}
	if (document.frmEditUser.corres_add.value != "")
	{
		if(ValidatorTrim(document.frmEditUser.corres_add.value)=='')
		{
			alert('Please enter correspondance address');
			document.getElementById('corres_add').focus();
			return false;		
		} 
	}
	/*new dropdown - starts */
	if (document.frmEditUser.select1.value != "")
	{
		if(document.getElementById("select1").value=="")
		{
			alert("Please select State Name");
			document.frmEditUser.select1.focus();
			return false;
		}
	}
	if (document.frmEditUser.select2.value != "")
	{	
		if(document.getElementById("select2").value=="Select District")
		{
			alert("Please select District Name");
			document.frmEditUser.select2.focus();
			return false;
		}
	}
	if (document.frmEditUser.select3.value != "")
	{	
		if(document.getElementById("select3").value=="Select Taluka")
		{
			alert("Please select Taluka Name");
			document.frmEditUser.select3.focus();
			return false;
		}
	}
	if (document.frmEditUser.otherVal.value== "")
	{	
		if (document.frmEditUser.select3.value== "other")
		{
			alert("Please select Other Taluka Name only in alphabates");
			document.frmEditUser.otherVal.focus();
			return false;
		}
	}
	/*new dropdown - ends */
	if (document.frmEditUser.phone.value != "")
	{
		if (document.frmEditUser.phone.value != "")
		{
					 if(document.frmEditUser.phone.value=="")
					 {
						alert("Please provide phone");
						document.frmEditUser.phone.focus();
						return false
					 }
					if (empty(stripSpaces(document.frmEditUser.phone.value)))
					{ 
						alert('phone can not be empty'); 
						document.frmEditUser.phone.value=''; 
						document.frmEditUser.phone.focus();
						return false;
					}
					 var iBnkNChars = "!@#$%^*+=\{}\"<>?";
					 var digBnksit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
					 if(document.frmEditUser.phone.value!="")
					 {
						for (var i = 0; i < document.frmEditUser.phone.value.length; i++)
						{ 
							if(iBnkNChars.indexOf(document.frmEditUser.phone.value.charAt(i)) != -1) 
							{				
								alert('phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper phone.');
								document.frmEditUser.phone.value="";
								document.frmEditUser.phone.focus();
								return false;
							}
							if(digBnksit.indexOf(document.frmEditUser.phone.value.charAt(i)) != -1) 
							{				
								alert('phone contains Alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
								document.frmEditUser.phone.value="";
								document.frmEditUser.phone.focus();
								return false;
							}
						}
					}
		}
	}
	if (document.frmEditUser.mobile.value != "")
	{
		if (document.frmEditUser.mobile.value != "")
		{
					 if(document.frmEditUser.mobile.value=="")
					 {
						alert("Please provide mobile");
						document.frmEditUser.mobile.focus();
						return false
					 }
					if (empty(stripSpaces(document.frmEditUser.mobile.value)))
					{ 
						alert('mobile can not be empty'); 
						document.frmEditUser.mobile.value=''; 
						document.frmEditUser.mobile.focus();
						return false;
					}
					 var iBnkNChars = "!@#$%^*+=\{}\"<>?";
					 var digBnksit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
					 if(document.frmEditUser.mobile.value!="")
					 {
						for (var i = 0; i < document.frmEditUser.mobile.value.length; i++)
						{ 
							if(iBnkNChars.indexOf(document.frmEditUser.mobile.value.charAt(i)) != -1) 
							{				
								alert('mobile contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper mobile.');
								document.frmEditUser.mobile.value="";
								document.frmEditUser.mobile.focus();
								return false;
							}
							if(digBnksit.indexOf(document.frmEditUser.mobile.value.charAt(i)) != -1) 
							{				
								alert('mobile contains Alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
								document.frmEditUser.mobile.value="";
								document.frmEditUser.mobile.focus();
								return false;
							}
						}
					}
		}
	}
	if(document.frmEditUser.email.value!="")
	{			
		for(i=0;i<=document.frmEditUser.email.value.length;i++)
		{			
			if(document.frmEditUser.email.value.charAt(i)==" ")
			{
				alert("Invalid Email-Id");
				document.frmEditUser.email.focus();
				return false;
			}
		}
		var flag;
		flag=0;
		var temp;
		var valid = "0123456789"
		temp = "" + document.frmEditUser.email.value.charAt(0);
     	if (valid.indexOf(temp)!= "-1")
		{
			alert("Invalid Email-Id");
			document.frmEditUser.email.select();
			return false;
		}
		for(i=0;i<=document.frmEditUser.email.value.length;i++)
		{			
			if(document.frmEditUser.email.value.charAt(i)=="@")
			{
				flag=flag+1;
			}
		}
		if( flag >1)
		{
			alert("Invalid Email-Id");
			document.frmEditUser.email.select();
			return false;
		}
		for(i=0;i<=document.frmEditUser.email.value.length;i++)
		{	
			if(document.frmEditUser.email.value.charAt(i)==".")
			{
				flag=flag+1;
				break;
			}
		}
		if(flag<2)
		{
			alert("Invalid Email-Id");
			document.frmEditUser.email.select();
			return false;
		}
	}
	if(document.frmEditUser.website.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			alert(iChars);
			if(document.frmEditUser.website.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmEditUser.website.focus();
				return false;
			}
			
			tname = frmEditUser.website.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmEditUser.website.focus();
				return false;
			}
			if (document.frmEditUser.website.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmEditUser.website.focus();
				return false;
			}
			if (document.frmEditUser.website.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmEditUser.website.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmEditUser.website.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmEditUser.website.value=''; 
				document.frmEditUser.website.focus();
				return false;
			}
	}
	if (document.frmEditUser.branch_corres_add.value != "")
	{
		if(ValidatorTrim(document.frmEditUser.branch_corres_add.value)=='')
		{
			alert('Please enter correspondance address');
			document.getElementById('branch_corres_add').focus();
			return false;		
		} 
	}	
	if (document.frmEditUser.branch_phone.value != "")
	{
		if (document.frmEditUser.branch_phone.value != "")
		{
					 if(document.frmEditUser.branch_phone.value=="")
					 {
						alert("Please provide phone");
						document.frmEditUser.branch_phone.focus();
						return false
					 }
					if (empty(stripSpaces(document.frmEditUser.branch_phone.value)))
					{ 
						alert('Phone can not be empty'); 
						document.frmEditUser.branch_phone.value=''; 
						document.frmEditUser.branch_phone.focus();
						return false;
					}
					 var iBnkNChars = "!@#$%^*+=\{}\"<>?";
					 var digBnksit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
					 if(document.frmEditUser.branch_phone.value!="")
					 {
						for (var i = 0; i < document.frmEditUser.branch_phone.value.length; i++)
						{ 
							if(iBnkNChars.indexOf(document.frmEditUser.branch_phone.value.charAt(i)) != -1) 
							{				
								alert('Phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper branch_phone.');
								document.frmEditUser.branch_phone.value="";
								document.frmEditUser.branch_phone.focus();
								return false;
							}
							if(digBnksit.indexOf(document.frmEditUser.branch_phone.value.charAt(i)) != -1) 
							{				
								alert('Phone contains Alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
								document.frmEditUser.branch_phone.value="";
								document.frmEditUser.branch_phone.focus();
								return false;
							}
						}
					}
		}
	}
	if (document.frmEditUser.branch_mobile.value != "")
	{
		if (document.frmEditUser.branch_mobile.value != "")
		{
					 if(document.frmEditUser.branch_mobile.value=="")
					 {
						alert("Please provide Mobile");
						document.frmEditUser.branch_mobile.focus();
						return false
					 }
					if (empty(stripSpaces(document.frmEditUser.branch_mobile.value)))
					{ 
						alert('Mobile can not be empty'); 
						document.frmEditUser.branch_mobile.value=''; 
						document.frmEditUser.branch_mobile.focus();
						return false;
					}
					 var iBnkNChars = "!@#$%^*+=\{}\"<>?";
					 var digBnksit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
					 if(document.frmEditUser.branch_mobile.value!="")
					 {
						for (var i = 0; i < document.frmEditUser.branch_mobile.value.length; i++)
						{ 
							if(iBnkNChars.indexOf(document.frmEditUser.branch_mobile.value.charAt(i)) != -1) 
							{				
								alert('Mobile contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Mobile.');
								document.frmEditUser.branch_mobile.value="";
								document.frmEditUser.branch_mobile.focus();
								return false;
							}
							if(digBnksit.indexOf(document.frmEditUser.branch_mobile.value.charAt(i)) != -1) 
							{				
								alert('Mobile contains Alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
								document.frmEditUser.branch_mobile.value="";
								document.frmEditUser.branch_mobile.focus();
								return false;
							}
						}
					}
		}
	}
	if (document.frmEditUser.name_proprietorMDCEO.value != "")
	{
			 if(document.frmEditUser.name_proprietorMDCEO.value=="")
			 {
				alert("Please provide Name of proprietor or M.D. or C.E.O.");
				document.frmEditUser.name_proprietorMDCEO.focus();
				return false
			 }
			 var iBnkNChars = "!@#$%^*+=\{}\"<>?";
			 var digBnksit = "0123456789"
			 if(document.frmEditUser.name_proprietorMDCEO.value!="")
			 {
				for (var i = 0; i < document.frmEditUser.name_proprietorMDCEO.value.length; i++)
				{ 
					if(iBnkNChars.indexOf(document.frmEditUser.name_proprietorMDCEO.value.charAt(i)) != -1) 
					{				
						alert('Name of proprietor or M.D. or C.E.O. contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Name of proprietor or M.D. or C.E.O..');
						document.frmEditUser.name_proprietorMDCEO.value="";
						document.frmEditUser.name_proprietorMDCEO.focus();
						return false;
					}
					if(digBnksit.indexOf(document.frmEditUser.name_proprietorMDCEO.value.charAt(i)) != -1) 
					{				
						alert('Name of proprietor or M.D. or C.E.O. contains numbers etc.\nThese are not allowed.\nPlease remove them and try again and enter only chars/letters..');
						document.frmEditUser.name_proprietorMDCEO.value="";
						document.frmEditUser.name_proprietorMDCEO.focus();
						return false;
					}
				}
			}
	}
	if (document.frmEditUser.mobile_proprietorMDCEO.value != "")
	{
				 if(document.frmEditUser.mobile_proprietorMDCEO.value=="")
				 {
					alert("Please provide Mobile");
					document.frmEditUser.mobile_proprietorMDCEO.focus();
					return false
				 }
				if (empty(stripSpaces(document.frmEditUser.mobile_proprietorMDCEO.value)))
				{ 
					alert('Mobile can not be empty'); 
					document.frmEditUser.mobile_proprietorMDCEO.value=''; 
					document.frmEditUser.mobile_proprietorMDCEO.focus();
					return false;
				}
				 var iBnkNChars = "!@#$%^*+=\{}\"<>?";
				 var digBnksit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
				 if(document.frmEditUser.mobile_proprietorMDCEO.value!="")
				 {
					for (var i = 0; i < document.frmEditUser.mobile_proprietorMDCEO.value.length; i++)
					{ 
						if(iBnkNChars.indexOf(document.frmEditUser.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
						{				
							alert('Mobile contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Mobile.');
							document.frmEditUser.mobile_proprietorMDCEO.value="";
							document.frmEditUser.mobile_proprietorMDCEO.focus();
							return false;
						}
						if(digBnksit.indexOf(document.frmEditUser.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
						{				
							alert('Mobile contains Alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
							document.frmEditUser.mobile_proprietorMDCEO.value="";
							document.frmEditUser.mobile_proprietorMDCEO.focus();
							return false;
						}
					}
				}
	}
	if (document.frmEditUser.work_nature.value != "")
	{
				if(document.frmEditUser.work_nature.value=="")
				{
					alert("Please provide Work Nature");
					document.frmEditUser.work_nature.focus();
					return false
				}
				if (empty(stripSpaces(document.frmEditUser.work_nature.value)))
				{ 
					alert('Work Nature can not be empty'); 
					document.frmEditUser.work_nature.value=''; 
					document.frmEditUser.work_nature.focus();
					return false;
				}
				
	}
	return true;
}
/*edit profile - ends*/
/*Admin side User registration - starts*/
function doAdmUsReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmUsRgInAdm.name_shop_company.value = ""
	document.frmUsRgInAdm.username.value = ""
	document.frmUsRgInAdm.password.value = ""
	document.frmUsRgInAdm.corres_add.value = ""
	document.frmUsRgInAdm.phone.value = ""
	document.frmUsRgInAdm.mobile.value = ""
	document.frmUsRgInAdm.email.value = ""
	document.frmUsRgInAdm.website.value = ""
	document.frmUsRgInAdm.branch_corres_add.value = ""
	document.frmUsRgInAdm.branch_phone.value = ""
	document.frmUsRgInAdm.branch_mobile.value = ""
	document.frmUsRgInAdm.name_proprietorMDCEO.value = ""
	document.frmUsRgInAdm.mobile_proprietorMDCEO.value = ""
	document.frmUsRgInAdm.work_nature.value = ""
}
function checkRegAdVal()
{
	if(document.getElementById("country").value=="selectCnt")
	{
		
		alert("Please select Country Name");
		document.frmUsRgInAdm.country.focus();
		return false;
	}	
	if(document.getElementById("country").value=="India")
	{
		/*without dropdown*/
		if(document.getElementById("select1").value=="select1")
		{
			alert("Please select state name");
			document.frmUsRgInAdm.select1.focus();
			if(document.getElementById("select1").value!="select1")
			{
				document.getElementById('startName').className = "visibleDiv";
			}
			else
			{
				return false;
			}
		}
		/*with dropdown
		if(document.getElementById("select1").value=="")
		{
			alert("Please select State Name");
			document.frmUsRgInAdm.select1.focus();
			return false;
		}
		if(document.getElementById("select2").value=="Select District")
		{
			alert("Please select District Name");
			document.frmUsRgInAdm.select2.focus();
			return false;
		}
		if(document.getElementById("select3").value=="Select Taluka")
		{
			alert("Please select Taluka Name");
			document.frmUsRgInAdm.select3.focus();
			return false;
		}*/
	}
	if(ValidatorTrim(document.frmUsRgInAdm.name_shop_company.value)=='')
	{
		alert('Please enter Shop or Company Name');
		document.getElementById('name_shop_company').focus();
		return false;		
	} 
	var newAdmiUsnm=document.frmUsRgInAdm.username.value;
	if(ValidatorTrim(document.frmUsRgInAdm.username.value)=='')
	{
		alert('Please enter username');
		document.getElementById('username').focus();
		return false;		
	}
	if(newAdmiUsnm!="")
	{
		if(newAdmiUsnm.indexOf(" ")!=-1)
		{
	    	alert("Please dont use space for username.");
		 	document.frmUsRgInAdm.username.value="";
		 	document.frmUsRgInAdm.username.focus();
		 	return false;
		}
		if(newAdmiUsnm.length<5||newAdmiUsnm.length>8)
		{
		   alert("Username length must lie between 5 - 8 Characters Only");
		   document.frmUsRgInAdm.username.value="";
		   document.frmUsRgInAdm.username.focus();
		   return false;
		}
	}
	var newpass=document.frmUsRgInAdm.password.value;
	if(document.frmUsRgInAdm.password.value=="")
    {
     	alert("Please Enter the Password");
     	document.frmUsRgInAdm.password.focus();
     	return false;
     }
	 if(newpass!="")
	 {
	 	if(newpass.indexOf(" ")!=-1)
		{
	    	alert("Please dont use space for password..");
		 	document.frmUsRgInAdm.password.value="";
		 	document.frmUsRgInAdm.password.focus();
		 	return false;
		}
		if(newpass.length<5||newpass.length>8)
		{
		   alert("Password length must lie between 5 - 8 Characters Only");
		   document.frmUsRgInAdm.password.value="";
		   document.frmUsRgInAdm.password.focus();
		   return false;
		}
	}
	if(document.frmUsRgInAdm.corres_add.value!="")
	{
		if(document.frmUsRgInAdm.corres_add.value=='')
		{
			alert('Please enter correspondance address');
			document.getElementById('corres_add').focus();
			return false;		
		} 
	}
	if(document.frmUsRgInAdm.phone.value!="")
	{
		if(ValidatorTrim(document.frmUsRgInAdm.phone.value)=='')
		{
				alert('Please enter phone');
				document.getElementById('phone').focus();
				return false;		
		}
		var iphoneChars = "!@#$%^*+=\;{}\":<>?";
		var digphonedesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmUsRgInAdm.phone.value!="")
		{
			for (var i = 0; i < document.frmUsRgInAdm.phone.value.length; i++)
			{ 
				if(iphoneChars.indexOf(document.frmUsRgInAdm.phone.value.charAt(i)) != -1) 
				{				
					alert('phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper phone.');
					document.frmUsRgInAdm.phone.value="";
					document.frmUsRgInAdm.phone.focus();
					return false;
					}
					if(digphonedesit.indexOf(document.frmUsRgInAdm.phone.value.charAt(i)) != -1) 
					{				
						alert('phone contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmUsRgInAdm.phone.value="";
						document.frmUsRgInAdm.phone.focus();
						return false;
					}
				}
		}
	}
	if(document.frmUsRgInAdm.mobile.value=="")
	{	
				alert('Please enter Mobile Number in proper format e.g. 0000000000.\nIt is compulsory to provide Mobile Number to receive message after successful registration.');
				document.frmUsRgInAdm.mobile.value="";
				document.frmUsRgInAdm.mobile.focus();
				return false;
	}
	var imobileChars = "!@#$%^*+=\;{}\":<>?";
	var digmobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
	if(document.frmUsRgInAdm.mobile.value!="")
	{
			for (var i = 0; i < document.frmUsRgInAdm.mobile.value.length; i++)
			{ 
				if(imobileChars.indexOf(document.frmUsRgInAdm.mobile.value.charAt(i)) != -1) 
				{				
					alert('Mobile Number contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Mobile Number .');
					document.frmUsRgInAdm.mobile.value="";
					document.frmUsRgInAdm.mobile.focus();
					return false;
				}
				if(digmobiledesit.indexOf(document.frmUsRgInAdm.mobile.value.charAt(i)) != -1) 
				{				
					alert('Mobile Number contains alphabates etc.\nThese are not allowed.\nPlease remove them and try again and enter only numbers..');
					document.frmUsRgInAdm.mobile.value="";
					document.frmUsRgInAdm.mobile.focus();
					return false;
				}
			}
	}
	if(document.getElementById("country").value!="India")
	{
		if(document.frmUsRgInAdm.email.value == "")
		{
			alert("Please provide Email-Id");
			document.getElementById('startName').className = "visibleDiv";
			document.frmUsRgInAdm.email.focus();
			return false;
		}
		if(document.frmUsRgInAdm.email.value!="")
		{			
			for(i=0;i<=document.frmUsRgInAdm.email.value.length;i++)
			{			
				if(document.frmUsRgInAdm.email.value.charAt(i)==" ")
				{
					alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
					document.getElementById('startName').className = "visibleDiv";
					document.frmUsRgInAdm.email.focus();
					//document.frmUsRgInAdm.email.focus();
					return false;
				}
			}
			var flag;
			flag=0;
			var temp;
			var valid = "0123456789"
			temp = "" + document.frmUsRgInAdm.email.value.charAt(0);
			if (valid.indexOf(temp)!= "-1")
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.getElementById('startName').className = "visibleDiv";
				document.frmUsRgInAdm.email.focus();
				return false;
			}
			for(i=0;i<=document.frmUsRgInAdm.email.value.length;i++)
			{			
				if(document.frmUsRgInAdm.email.value.charAt(i)=="@")
				{
					flag=flag+1;
				}
			}
			if( flag >1)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.getElementById('startName').className = "visibleDiv";
				document.frmUsRgInAdm.email.focus();
				return false;
			}
			for(i=0;i<=document.frmUsRgInAdm.email.value.length;i++)
			{	
				if(document.frmUsRgInAdm.email.value.charAt(i)==".")
				{
					flag=flag+1;
					break;
				}
			}
			if(flag<2)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.getElementById('startName').className = "visibleDiv";
				document.frmUsRgInAdm.email.focus();
				return false;
			}
		}
	}
	else
	{
		if(document.frmUsRgInAdm.email.value!="")
		{			
			for(i=0;i<=document.frmUsRgInAdm.email.value.length;i++)
			{			
				if(document.frmUsRgInAdm.email.value.charAt(i)==" ")
				{
					alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
					document.frmUsRgInAdm.email.focus();
					return false;
				}
			}
			var flag;
			flag=0;
			var temp;
			var valid = "0123456789"
			temp = "" + document.frmUsRgInAdm.email.value.charAt(0);
			if (valid.indexOf(temp)!= "-1")
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmUsRgInAdm.email.select();
				return false;
			}
			for(i=0;i<=document.frmUsRgInAdm.email.value.length;i++)
			{			
				if(document.frmUsRgInAdm.email.value.charAt(i)=="@")
				{
					flag=flag+1;
				}
			}
			if( flag >1)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmUsRgInAdm.email.select();
				return false;
			}
			for(i=0;i<=document.frmUsRgInAdm.email.value.length;i++)
			{	
				if(document.frmUsRgInAdm.email.value.charAt(i)==".")
				{
					flag=flag+1;
					break;
				}
			}
			if(flag<2)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmUsRgInAdm.email.select();
				return false;
			}
		}
	}
	if(document.frmUsRgInAdm.website.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmUsRgInAdm.website.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmUsRgInAdm.website.focus();
				return false;
			}
			
			tname = frmUsRgInAdm.website.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmUsRgInAdm.website.focus();
				return false;
			}
			if (document.frmUsRgInAdm.website.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmUsRgInAdm.website.focus();
				return false;
			}
			if (document.frmUsRgInAdm.website.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmUsRgInAdm.website.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmUsRgInAdm.website.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmUsRgInAdm.website.value=''; 
				document.frmUsRgInAdm.website.focus();
				return false;
			}
	}
	if(document.frmUsRgInAdm.branch_corres_add.value!="")
	{
		if(document.frmUsRgInAdm.branch_corres_add.value=='')
		{
			alert('Please enter branch correspondance address');
			document.getElementById('branch_corres_add').focus();
			return false;		
		} 
	}
	if(document.frmUsRgInAdm.branch_phone.value!="")
	{	
		var ibranch_phoneChars = "!@#$%^*+=\;{}\":<>?";
		var digbranch_phonedesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmUsRgInAdm.branch_phone.value!="")
		{
			for (var i = 0; i < document.frmUsRgInAdm.branch_phone.value.length; i++)
			{ 
				if(ibranch_phoneChars.indexOf(document.frmUsRgInAdm.branch_phone.value.charAt(i)) != -1) 
				{				
					alert('branch_phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper branch_phone.');
					document.frmUsRgInAdm.branch_phone.value="";
					document.frmUsRgInAdm.branch_phone.focus();
					return false;
					}
					if(digbranch_phonedesit.indexOf(document.frmUsRgInAdm.branch_phone.value.charAt(i)) != -1) 
					{				
						alert('branch_phone contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmUsRgInAdm.branch_phone.value="";
						document.frmUsRgInAdm.branch_phone.focus();
						return false;
					}
				}
		}
	}
	if(document.frmUsRgInAdm.branch_mobile.value!="")
	{
		var ibranch_mobileChars = "!@#$%^*+=\;{}\":<>?";
		var digbranch_mobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmUsRgInAdm.branch_mobile.value!="")
		{
			for (var i = 0; i < document.frmUsRgInAdm.branch_mobile.value.length; i++)
			{ 
				if(ibranch_mobileChars.indexOf(document.frmUsRgInAdm.branch_mobile.value.charAt(i)) != -1) 
				{				
					alert('branch_mobile contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper branch_mobile.');
					document.frmUsRgInAdm.branch_mobile.value="";
					document.frmUsRgInAdm.branch_mobile.focus();
					return false;
					}
					if(digbranch_mobiledesit.indexOf(document.frmUsRgInAdm.branch_mobile.value.charAt(i)) != -1) 
					{				
						alert('branch_mobile contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmUsRgInAdm.branch_mobile.value="";
						document.frmUsRgInAdm.branch_mobile.focus();
						return false;
					}
				}
		}
	}
	if(document.frmUsRgInAdm.name_proprietorMDCEO.value!="")
	{
		if(ValidatorTrim(document.frmUsRgInAdm.name_proprietorMDCEO.value)=='')
		{
				alert('Please enter name_proprietorMDCEO');
				document.getElementById('name_proprietorMDCEO').focus();
				return false;		
		}
		var iname_proprietorMDCEOChars = "!@#$%^*+=\;{}\":<>?";
		var digname_proprietorMDCEOdesit = "0123456789"
		if(document.frmUsRgInAdm.name_proprietorMDCEO.value!="")
		{
			for (var i = 0; i < document.frmUsRgInAdm.name_proprietorMDCEO.value.length; i++)
			{ 
				if(iname_proprietorMDCEOChars.indexOf(document.frmUsRgInAdm.name_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('name_proprietorMDCEO contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper name_proprietorMDCEO.');
					document.frmUsRgInAdm.name_proprietorMDCEO.value="";
					document.frmUsRgInAdm.name_proprietorMDCEO.focus();
					return false;
					}
					if(digname_proprietorMDCEOdesit.indexOf(document.frmUsRgInAdm.name_proprietorMDCEO.value.charAt(i)) != -1) 
					{				
						alert('name_proprietorMDCEO contains numbers etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmUsRgInAdm.name_proprietorMDCEO.value="";
						document.frmUsRgInAdm.name_proprietorMDCEO.focus();
						return false;
					}
				}
		}
	}
	if(document.frmUsRgInAdm.dob.value!="")
	{
		var dt=document.frmUsRgInAdm.dob;
		if (isDate(dt.value)==false){
			dt.focus()
			return false
		}
		if(ValidatorTrim(document.frmUsRgInAdm.mobile_proprietorMDCEO.value)=='')
		{
				alert('Please enter mobile_proprietorMDCEO');
				document.getElementById('mobile_proprietorMDCEO').focus();
				return false;		
		}
		var imobile_proprietorMDCEOChars = "!@#$%^*+=\;{}\":<>?";
		var digmobile_proprietorMDCEOdesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmUsRgInAdm.mobile_proprietorMDCEO.value!="")
		{
			for (var i = 0; i < document.frmUsRgInAdm.mobile_proprietorMDCEO.value.length; i++)
			{ 
				if(imobile_proprietorMDCEOChars.indexOf(document.frmUsRgInAdm.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('mobile_proprietorMDCEO contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper mobile_proprietorMDCEO.');
					document.frmUsRgInAdm.mobile_proprietorMDCEO.value="";
					document.frmUsRgInAdm.mobile_proprietorMDCEO.focus();
					return false;
					}
					if(digmobile_proprietorMDCEOdesit.indexOf(document.frmUsRgInAdm.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
					{				
						alert('mobile_proprietorMDCEO contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmUsRgInAdm.mobile_proprietorMDCEO.value="";
						document.frmUsRgInAdm.mobile_proprietorMDCEO.focus();
						return false;
					}
				}
		}
	}
	if(document.frmUsRgInAdm.work_nature.value!="")
	{
		if(ValidatorTrim(document.frmUsRgInAdm.work_nature.value)=='')
		{
				alert('Please enter work nature upto 600 chars.');
				document.getElementById('work_nature').focus();
				return false;		
		}
		var iwork_natureChars = "!@#$%^*+=\;{}\":<>?";
		var digwork_naturedesit = "0123456789"
		if(document.frmUsRgInAdm.work_nature.value!="")
		{
			for (var i = 0; i < document.frmUsRgInAdm.work_nature.value.length; i++)
			{ 
				if(iwork_natureChars.indexOf(document.frmUsRgInAdm.work_nature.value.charAt(i)) != -1) 
				{				
					alert('work nature contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper work_nature upto 600 chars.');
					document.frmUsRgInAdm.work_nature.value="";
					document.frmUsRgInAdm.work_nature.focus();
					return false;
					}
					if(digwork_naturedesit.indexOf(document.frmUsRgInAdm.work_nature.value.charAt(i)) != -1) 
					{				
						alert('work nature contains numbers etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates upto 600 chars.');
						document.frmUsRgInAdm.work_nature.value="";
						document.frmUsRgInAdm.work_nature.focus();
						return false;
					}
				}
		}
	}
	return true;
}
/*Admin side User registration - ends*/
/*search advt. images image - starts*/
function doSrchAdvtImgReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmSrchAdvtImg.link.value = ""
	document.frmSrchAdvtImg.userfile.value = ""
}
function checkSrchAdvtImgVal()
{
	/*if(document.frmSrchAdvtImg.link.value!="")
	{*/
			
	//}
	/*if(ValidatorTrim(document.frmSrchAdvtImg.uploaded.value)=='')
	{
		alert('Please add image only of .gif format');
		document.getElementById('uploaded').focus();
		return false;		
	}*/
	if(document.frmSrchAdvtImg.userfile.value=="")
		{
			alert("Please add image  ");
			document.frmSrchAdvtImg.userfile.focus();
			return false;
		}
	if(document.getElementById("select1").value=="select1")
	{
			alert("Please select State");
			document.frmSrchAdvtImg.select1.focus();
			return false;
	}
	var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmSrchAdvtImg.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmSrchAdvtImg.link.focus();
				return false;
			}
			
			tname = frmSrchAdvtImg.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmSrchAdvtImg.link.focus();
				return false;
			}
			if (document.frmSrchAdvtImg.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmSrchAdvtImg.link.focus();
				return false;
			}
			if (document.frmSrchAdvtImg.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmSrchAdvtImg.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmSrchAdvtImg.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmSrchAdvtImg.link.value=''; 
				document.frmSrchAdvtImg.link.focus();
				return false;
			}
	return true;
}
/*search advt. images  -  ends*/
/*search advt. images  - starts*/
function editSrHHAdvvIsmgVal()
{
	if(document.editSrHHAdvvIsmg.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.editSrHHAdvvIsmg.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.editSrHHAdvvIsmg.link.focus();
				return false;
			}
			
			tname = editSrHHAdvvIsmg.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				editSrHHAdvvIsmg.link.focus();
				return false;
			}
			if (document.editSrHHAdvvIsmg.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.editSrHHAdvvIsmg.link.focus();
				return false;
			}
			if (document.editSrHHAdvvIsmg.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.editSrHHAdvvIsmg.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.editSrHHAdvvIsmg.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.editSrHHAdvvIsmg.link.value=''; 
				document.editSrHHAdvvIsmg.link.focus();
				return false;
			}
	}
	return true;
}
/*search advt. images  - ends*/
/*normal user - starts*/
function doNorUsgReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmUserRegPop.fullname.value = ""
	document.frmUserRegPop.email.value = ""
	document.frmUserRegPop.password.value = ""
	document.frmUserRegPop.company.value = ""
	document.frmUserRegPop.designation.value = ""
	document.frmUserRegPop.phone.value = ""
	document.frmUserRegPop.mobile.value = ""
	document.frmUserRegPop.website.value = ""
	document.frmUserRegPop.enquiry.value = ""
}
function checkNorUsRegVal()
{
	if(ValidatorTrim(document.frmUserRegPop.fullname.value)=='')
	{
			alert('Please enter fullname');
			document.getElementById('fullname').focus();
			return false;		
	}
	var ifullnameChars = "-_!@#$%^*+=\;{}\":<>?";
	var digfullnamedesit = "0123456789"
	if(document.frmUserRegPop.fullname.value!="")
	{
		for (var i = 0; i < document.frmUserRegPop.fullname.value.length; i++)
		{ 
			if(ifullnameChars.indexOf(document.frmUserRegPop.fullname.value.charAt(i)) != -1) 
			{				
				alert('fullname contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper fullname.');
				document.frmUserRegPop.fullname.value="";
				document.frmUserRegPop.fullname.focus();
				return false;
				}
				if(digfullnamedesit.indexOf(document.frmUserRegPop.fullname.value.charAt(i)) != -1) 
				{				
					alert('fullname contains Numbers etc.\nThese are not allowed.\nPlease remove them and try again and enter only alphabates..');
					document.frmUserRegPop.fullname.value="";
					document.frmUserRegPop.fullname.focus();
					return false;
				}
			}
	}
	if(document.frmUserRegPop.email.value == "")
	{
		alert("Please provide proper Email-Id as a Username");
		document.frmUserRegPop.email.focus();
		return false;
	}
	if(document.frmUserRegPop.email.value!="")
	{			
		for(i=0;i<=document.frmUserRegPop.email.value.length;i++)
		{			
			if(document.frmUserRegPop.email.value.charAt(i)==" ")
			{
				alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
				document.frmUserRegPop.email.focus();
				return false;
			}
		}
		var flagClientEmail;
		flagClientEmail=0;
		var tempClientEmail;
		var validClientEmail = "0123456789"
		tempClientEmail = "" + document.frmUserRegPop.email.value.charAt(0);
     	if (validClientEmail.indexOf(tempClientEmail)!= "-1")
		{
			alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
			document.frmUserRegPop.email.select();
			return false;
		}
		for(i=0;i<=document.frmUserRegPop.email.value.length;i++)
		{			
			if(document.frmUserRegPop.email.value.charAt(i)=="@")
			{
				flagClientEmail=flagClientEmail+1;
			}
		}
		if( flagClientEmail >1)
		{
			alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
			document.frmUserRegPop.email.select();
			return false;
		}
		for(i=0;i<=document.frmUserRegPop.email.value.length;i++)
		{	
			if(document.frmUserRegPop.email.value.charAt(i)==".")
			{
				flagClientEmail=flagClientEmail+1;
				break;
			}
		}
		if(flagClientEmail<2)
		{
			alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
			document.frmUserRegPop.email.select();
			return false;
		}
	}
	var newpass=document.frmUserRegPop.password.value;
	if(document.frmUserRegPop.password.value=="")
    {
     	alert("Please Enter the password");
     	document.frmUserRegPop.password.focus();
     	return false;
     }
	 if(newpass!="")
	 {
	 	if(newpass.indexOf(" ")!=-1)
		{
	    	alert("Please dont use space for password..");
		 	document.frmUserRegPop.password.value="";
		 	document.frmUserRegPop.password.focus();
		 	return false;
		}
		if(newpass.length<6||newpass.length>16)
		{
		   alert("password length must lie between 6 - 16 Characters Only");
		   document.frmUserRegPop.password.value="";
		   document.frmUserRegPop.password.focus();
		   return false;
		}
	}
	if(document.frmUserRegPop.company.value!="")
	{
		if(ValidatorTrim(document.frmUserRegPop.company.value)=='')
		{
				alert('Please enter company name');
				document.getElementById('company').focus();
				return false;		
		}
		var ifullnameChars = "-_!@#$%^*+=\;{}\":<>?";
		var digfullnamedesit = "0123456789"
		if(document.frmUserRegPop.company.value!="")
		{
			for (var i = 0; i < document.frmUserRegPop.company.value.length; i++)
			{ 
				if(ifullnameChars.indexOf(document.frmUserRegPop.company.value.charAt(i)) != -1) 
				{				
					alert('company name contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper company name.');
					document.frmUserRegPop.company.value="";
					document.frmUserRegPop.company.focus();
					return false;
					}
					if(digfullnamedesit.indexOf(document.frmUserRegPop.company.value.charAt(i)) != -1) 
					{				
						alert('company name contains Numbers etc.\nThese are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmUserRegPop.company.value="";
						document.frmUserRegPop.company.focus();
						return false;
					}
				}
		}
	}
	if(document.frmUserRegPop.designation.value!="")
	{
		if(ValidatorTrim(document.frmUserRegPop.designation.value)=='')
		{
				alert('Please enter designation');
				document.getElementById('designation').focus();
				return false;		
		}
		var ifullnameChars = "-_!@#$%^*+=\;{}\":<>?";
		var digfullnamedesit = "0123456789"
		if(document.frmUserRegPop.designation.value!="")
		{
			for (var i = 0; i < document.frmUserRegPop.designation.value.length; i++)
			{ 
				if(ifullnameChars.indexOf(document.frmUserRegPop.designation.value.charAt(i)) != -1) 
				{				
					alert('designation contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper designation.');
					document.frmUserRegPop.designation.value="";
					document.frmUserRegPop.designation.focus();
					return false;
					}
					if(digfullnamedesit.indexOf(document.frmUserRegPop.designation.value.charAt(i)) != -1) 
					{				
						alert('designation contains Numbers etc.\nThese are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmUserRegPop.designation.value="";
						document.frmUserRegPop.designation.focus();
						return false;
					}
				}
		}
	}
	if((document.frmUserRegPop.phone.value=="") && (document.frmUserRegPop.mobile.value==""))
	{
		alert("Please enter either phone or mobile.")
		document.frmUserRegPop.phone.focus();
		return false;
	}
	var iphoneChars = "!@#$%^*+=\;{}\":<>?";
	var digphonedesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
	if(document.frmUserRegPop.phone.value!="")
	{
		for (var i = 0; i < document.frmUserRegPop.phone.value.length; i++)
		{ 
			if(iphoneChars.indexOf(document.frmUserRegPop.phone.value.charAt(i)) != -1) 
			{				
				alert('phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper phone.');
				document.frmUserRegPop.phone.value="";
				document.frmUserRegPop.phone.focus();
				return false;
				}
				if(digphonedesit.indexOf(document.frmUserRegPop.phone.value.charAt(i)) != -1) 
				{				
					alert('phone contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
					document.frmUserRegPop.phone.value="";
					document.frmUserRegPop.phone.focus();
					return false;
				}
			}
	}
	var imobileChars = "!@#$%^*+=\;{}\":<>?";
	var digmobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
	if(document.frmUserRegPop.mobile.value!="")
	{
		for (var i = 0; i < document.frmUserRegPop.mobile.value.length; i++)
		{ 
			if(imobileChars.indexOf(document.frmUserRegPop.mobile.value.charAt(i)) != -1) 
			{				
				alert('mobile contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper mobile.');
				document.frmUserRegPop.mobile.value="";
				document.frmUserRegPop.mobile.focus();
				return false;
				}
				if(digmobiledesit.indexOf(document.frmUserRegPop.mobile.value.charAt(i)) != -1) 
				{				
					alert('mobile contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
					document.frmUserRegPop.mobile.value="";
					document.frmUserRegPop.mobile.focus();
					return false;
				}
			}
	}
	if(document.frmUserRegPop.website.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmUserRegPop.website.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmUserRegPop.website.focus();
				return false;
			}
			
			tname = frmUserRegPop.website.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmUserRegPop.website.focus();
				return false;
			}
			if (document.frmUserRegPop.website.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmUserRegPop.website.focus();
				return false;
			}
			if (document.frmUserRegPop.website.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmUserRegPop.website.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmUserRegPop.website.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmUserRegPop.website.value=''; 
				document.frmUserRegPop.website.focus();
				return false;
			}
	}
	if(document.frmUserRegPop.enquiry.value!="")
	{
		if(ValidatorTrim(document.frmUserRegPop.enquiry.value)=='')
		{
				alert('Please enter enquiry');
				document.getElementById('enquiry').focus();
				return false;		
		}
	}
}
/*normal user - ends*/
/*NORMAL USER login - ends*/
function doLcheckNrUserLoginValReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmNorUsLog.email.value = ""
	document.frmNorUsLog.password.value = ""
}
function checkNrUserLoginVal()
{
	if(document.frmNorUsLog.email.value == "")
	{
		alert("Please provide proper Email-Id as a Username");
		document.frmNorUsLog.email.focus();
		return false;
	}
	if(document.frmNorUsLog.email.value!="")
	{			
		for(i=0;i<=document.frmNorUsLog.email.value.length;i++)
		{			
			if(document.frmNorUsLog.email.value.charAt(i)==" ")
			{
				alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
				document.frmNorUsLog.email.focus();
				return false;
			}
		}
		var flagClientEmail;
		flagClientEmail=0;
		var tempClientEmail;
		var validClientEmail = "0123456789"
		tempClientEmail = "" + document.frmNorUsLog.email.value.charAt(0);
     	if (validClientEmail.indexOf(tempClientEmail)!= "-1")
		{
			alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
			document.frmNorUsLog.email.select();
			return false;
		}
		for(i=0;i<=document.frmNorUsLog.email.value.length;i++)
		{			
			if(document.frmNorUsLog.email.value.charAt(i)=="@")
			{
				flagClientEmail=flagClientEmail+1;
			}
		}
		if( flagClientEmail >1)
		{
			alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
			document.frmNorUsLog.email.select();
			return false;
		}
		for(i=0;i<=document.frmNorUsLog.email.value.length;i++)
		{	
			if(document.frmNorUsLog.email.value.charAt(i)==".")
			{
				flagClientEmail=flagClientEmail+1;
				break;
			}
		}
		if(flagClientEmail<2)
		{
			alert("Invalid Email-Id, Please provide proper Email-Id as a Username");
			document.frmNorUsLog.email.select();
			return false;
		}
	}
	if(document.frmNorUsLog.password.value=="")
	{
		alert("Please enter password for login");
		document.frmNorUsLog.password.focus();
		return false;
	}
	return true;
}
/*NORMAL USER login - ends*/
function under()
{
	alert("Please click on logo to view company website.");
	return false;
}
/*Admin Side Edit Profile Form - starts*/
var dtCh= "-";
var minYear=1900;
var maxYear=2100;
function isInteger(s)
{
	var i;
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    return true;
}
function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}
function daysInFebruary (year)
{
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}
function isDate(dtStr)
{
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strMonth=dtStr.substring(0,pos1)
	var strDay=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		alert("The date format should be : mm-dd-yyyy")
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month")
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day")
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date")
		return false
	}
return true
}
function editAdnUSFrmVal()
{
	if(ValidatorTrim(document.frmAdnEdUs.name_shop_company.value)=='')
	{
		alert('Please enter Name of Shop or Company');
		document.getElementById('name_shop_company').focus();
		return false;		
	} 
	var iname_shop_companyChars = "!@#$%^*+=\;{}\":<>?";
	var digname_shop_companydesit = "0123456789"
	if(document.frmAdnEdUs.name_shop_company.value!="")
	{
		for (var i = 0; i < document.frmAdnEdUs.name_shop_company.value.length; i++)
		{ 
			if(iname_shop_companyChars.indexOf(document.frmAdnEdUs.name_shop_company.value.charAt(i)) != -1) 
			{				
				alert('Name of Shop or Company contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Name of Shop or Company.');
				document.frmAdnEdUs.name_shop_company.value="";
				document.frmAdnEdUs.name_shop_company.focus();
				return false;
			}
			if(digname_shop_companydesit.indexOf(document.frmAdnEdUs.name_shop_company.value.charAt(i)) != -1) 
			{				
				alert('Name of Shop or Company contains numbers etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates');
				document.frmAdnEdUs.name_shop_company.value="";
				document.frmAdnEdUs.name_shop_company.focus();
				return false;
			}
		}
	}
	if (document.frmAdnEdUs.corres_add.value != "")
	{
		if(ValidatorTrim(document.frmAdnEdUs.corres_add.value)=='')
		{
			alert('Please enter correspondance address');
			document.getElementById('corres_add').focus();
			return false;		
		} 
	}
	/*new dropdown - starts */
	if (document.frmAdnEdUs.select1.value != "")
	{
		if(document.getElementById("select1").value=="")
		{
			alert("Please select State Name");
			document.frmAdnEdUs.select1.focus();
			return false;
		}
	}
	if (document.frmAdnEdUs.select2.value != "")
	{	
		if(document.getElementById("select2").value=="Select District")
		{
			alert("Please select District Name");
			document.frmAdnEdUs.select2.focus();
			return false;
		}
	}
	if (document.frmAdnEdUs.select3.value != "")
	{	
		if(document.getElementById("select3").value=="Select Taluka")
		{
			alert("Please select Taluka Name");
			document.frmAdnEdUs.select3.focus();
			return false;
		}
	}
	if (document.frmAdnEdUs.otherVal.value== "")
	{	
		if (document.frmAdnEdUs.select3.value== "other")
		{
			alert("Please select Other Taluka Name only in alphabates");
			document.frmAdnEdUs.otherVal.focus();
			return false;
		}
	}
	/*new dropdown - ends */
	if(document.frmAdnEdUs.phone.value!="")
	{	
		if(ValidatorTrim(document.frmAdnEdUs.phone.value)=='')
		{
				alert('Please enter phone');
				document.getElementById('phone').focus();
				return false;		
		}
		var iphoneChars = "!@#$%^*=\;{}\":<>?";
		var digphonedesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmAdnEdUs.phone.value!="")
		{
			for (var i = 0; i < document.frmAdnEdUs.phone.value.length; i++)
			{ 
				if(iphoneChars.indexOf(document.frmAdnEdUs.phone.value.charAt(i)) != -1) 
				{				
					alert('phone contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper phone.');
					document.frmAdnEdUs.phone.value="";
					document.frmAdnEdUs.phone.focus();
					return false;
					}
					if(digphonedesit.indexOf(document.frmAdnEdUs.phone.value.charAt(i)) != -1) 
					{				
						alert('phone contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates..');
						document.frmAdnEdUs.phone.value="";
						document.frmAdnEdUs.phone.focus();
						return false;
					}
				}
		}
	}
	if(document.frmAdnEdUs.mobile.value!="")
	{	
		if(ValidatorTrim(document.frmAdnEdUs.mobile.value)=='')
		{
				alert('Please enter mobile');
				document.getElementById('mobile').focus();
				return false;		
		}
		var imobileChars = "!@#$%^*=\;{}\":<>?";
		var digmobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDFHGIJKLMNOPQRSTUVWXYZ"
		if(document.frmAdnEdUs.mobile.value!="")
		{
			for (var i = 0; i < document.frmAdnEdUs.mobile.value.length; i++)
			{ 
				if(imobileChars.indexOf(document.frmAdnEdUs.mobile.value.charAt(i)) != -1) 
				{				
					alert('mobile contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper mobile.');
					document.frmAdnEdUs.mobile.value="";
					document.frmAdnEdUs.mobile.focus();
					return false;
					}
					if(digmobiledesit.indexOf(document.frmAdnEdUs.mobile.value.charAt(i)) != -1) 
					{				
						alert('mobile contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
						document.frmAdnEdUs.mobile.value="";
						document.frmAdnEdUs.mobile.focus();
						return false;
					}
				}
		}
	}
	if(document.frmAdnEdUs.email.value!="")
	{	
		if(document.frmAdnEdUs.email.value== "")
		{
			alert("Please provide Email-Id");
			document.frmAdnEdUs.email.focus();
			return false;
		}
		if(document.frmAdnEdUs.email.value!="")
		{			
			for(i=0;i<=document.frmAdnEdUs.email.value.length;i++)
			{			
				if(document.frmAdnEdUs.email.value.charAt(i)==" ")
				{
					alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
					document.frmAdnEdUs.email.focus();
					return false;
				}
			}
			var flag;
			flag=0;
			var temp;
			var valid = "0123456789"
			temp = "" + document.frmAdnEdUs.email.value.charAt(0);
			if (valid.indexOf(temp)!= "-1")
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmAdnEdUs.email.select();
				return false;
			}
			for(i=0;i<=document.frmAdnEdUs.email.value.length;i++)
			{			
				if(document.frmAdnEdUs.email.value.charAt(i)=="@")
				{
					flag=flag+1;
				}
			}
			if( flag >1)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmAdnEdUs.email.select();
				return false;
			}
			for(i=0;i<=document.frmAdnEdUs.email.value.length;i++)
			{	
				if(document.frmAdnEdUs.email.value.charAt(i)==".")
				{
					flag=flag+1;
					break;
				}
			}
			if(flag<2)
			{
				alert("Please provide proper format for Email-Id\ne.g. xyz@xyz.com");
				document.frmAdnEdUs.email.select();
				return false;
			}
		}
	}
		if(document.frmAdnEdUs.website.value!="")
		{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmAdnEdUs.website.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmAdnEdUs.website.focus();
				return false;
			}
			
			tname = frmAdnEdUs.website.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmAdnEdUs.website.focus();
				return false;
			}
			if (document.frmAdnEdUs.website.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmAdnEdUs.website.focus();
				return false;
			}
			if (document.frmAdnEdUs.website.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmAdnEdUs.website.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmAdnEdUs.website.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmAdnEdUs.website.value=''; 
				document.frmAdnEdUs.website.focus();
				return false;
			}
	}
	if (document.frmAdnEdUs.branch_corres_add.value != "")
	{
		if(ValidatorTrim(document.frmAdnEdUs.branch_corres_add.value)=='')
		{
			alert('Please enter branch correspondance address');
			document.getElementById('branch_corres_add').focus();
			return false;		
		} 
	}
	if (document.frmAdnEdUs.branch_phone.value != "")
	{
		if(document.frmAdnEdUs.branch_phone.value=="")
		{
			alert("Please provide branch phone number");
			document.frmAdnEdUs.branch_phone.focus();
			return false
		}
		var ibranch_phoneChars = "!@#$%^*=\;{}\":<>?";
		var digbranch_phonedesit = "abcdefghijklmnopqrstuvwxyzABCEDEFGHIJKLMNOPQRSTUVQXYZ"
		if(document.frmAdnEdUs.branch_phone.value!="")
		{
			for (var i = 0; i < document.frmAdnEdUs.branch_phone.value.length; i++)
			{ 
				if(ibranch_phoneChars.indexOf(document.frmAdnEdUs.branch_phone.value.charAt(i)) != -1) 
				{				
					alert('branch phone number contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper branch phone number.');
					document.frmAdnEdUs.branch_phone.value="";
					document.frmAdnEdUs.branch_phone.focus();
					return false;
				}
				if(digbranch_phonedesit.indexOf(document.frmAdnEdUs.branch_phone.value.charAt(i)) != -1) 
				{				
					alert('branch phone number contains alphabets etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
					document.frmAdnEdUs.branch_phone.value="";
					document.frmAdnEdUs.branch_phone.focus();
					return false;
				}
			}
		}
	}
		if (document.frmAdnEdUs.branch_mobile.value != "")
	{
		if(document.frmAdnEdUs.branch_mobile.value=="")
		{
			alert("Please provide branch mobile number");
			document.frmAdnEdUs.branch_mobile.focus();
			return false
		}
		var ibranch_mobileChars = "!@#$%^*=\;{}\":<>?";
		var digbranch_mobiledesit = "abcdefghijklmnopqrstuvwxyzABCEDEFGHIJKLMNOPQRSTUVQXYZ"
		if(document.frmAdnEdUs.branch_mobile.value!="")
		{
			for (var i = 0; i < document.frmAdnEdUs.branch_mobile.value.length; i++)
			{ 
				if(ibranch_mobileChars.indexOf(document.frmAdnEdUs.branch_mobile.value.charAt(i)) != -1) 
				{				
					alert('branch mobile number contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper branch mobile number.');
					document.frmAdnEdUs.branch_mobile.value="";
					document.frmAdnEdUs.branch_mobile.focus();
					return false;
				}
				if(digbranch_mobiledesit.indexOf(document.frmAdnEdUs.branch_mobile.value.charAt(i)) != -1) 
				{				
					alert('branch mobile number contains alphabets etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
					document.frmAdnEdUs.branch_mobile.value="";
					document.frmAdnEdUs.branch_mobile.focus();
					return false;
				}
			}
		}
	}
	if (document.frmAdnEdUs.name_proprietorMDCEO.value != "")
	{
		if(document.frmAdnEdUs.name_proprietorMDCEO.value=="")
		{
			alert("Please enter Name of Oroprietor or M.D. or C.E.O.");
			document.frmAdnEdUs.name_proprietorMDCEO.focus();
			return false
		}
		var iname_proprietorMDCEOChars = "!@#$%^*=\;{}\":<>?";
		var digname_proprietorMDCEOdesit = "0123456789"
		if(document.frmAdnEdUs.name_proprietorMDCEO.value!="")
		{
			for (var i = 0; i < document.frmAdnEdUs.name_proprietorMDCEO.value.length; i++)
			{ 
				if(iname_proprietorMDCEOChars.indexOf(document.frmAdnEdUs.name_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('Name of Oroprietor or M.D. or C.E.O. number contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Name of Oroprietor or M.D. or C.E.O..');
					document.frmAdnEdUs.name_proprietorMDCEO.value="";
					document.frmAdnEdUs.name_proprietorMDCEO.focus();
					return false;
				}
				if(digname_proprietorMDCEOdesit.indexOf(document.frmAdnEdUs.name_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('Name of Oroprietor or M.D. or C.E.O. contains alphabets etc.\n These are not allowed.\nPlease remove them and try again and enter only Alphabates..');
					document.frmAdnEdUs.name_proprietorMDCEO.value="";
					document.frmAdnEdUs.name_proprietorMDCEO.focus();
					return false;
				}
			}
		}
	}
	if (document.frmAdnEdUs.mobile_proprietorMDCEO.value != "")
	{
		if(document.frmAdnEdUs.mobile_proprietorMDCEO.value=="")
		{
			alert("Please provide mobile number");
			document.frmAdnEdUs.mobile_proprietorMDCEO.focus();
			return false
		}
		var imobile_proprietorMDCEOChars = "!@#$%^*=\;{}\":<>?";
		var digmobile_proprietorMDCEOdesit = "abcdefghijklmnopqrstuvwxyzABCEDEFGHIJKLMNOPQRSTUVQXYZ"
		if(document.frmAdnEdUs.mobile_proprietorMDCEO.value!="")
		{
			for (var i = 0; i < document.frmAdnEdUs.mobile_proprietorMDCEO.value.length; i++)
			{ 
				if(imobile_proprietorMDCEOChars.indexOf(document.frmAdnEdUs.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('mobile number contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper mobile number.');
					document.frmAdnEdUs.mobile_proprietorMDCEO.value="";
					document.frmAdnEdUs.mobile_proprietorMDCEO.focus();
					return false;
				}
				if(digmobile_proprietorMDCEOdesit.indexOf(document.frmAdnEdUs.mobile_proprietorMDCEO.value.charAt(i)) != -1) 
				{				
					alert('mobile number contains alphabets etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers..');
					document.frmAdnEdUs.mobile_proprietorMDCEO.value="";
					document.frmAdnEdUs.mobile_proprietorMDCEO.focus();
					return false;
				}
			}
		}
	}
	if(document.frmAdnEdUs.work_nature.value!="")
	{
		if(ValidatorTrim(document.frmAdnEdUs.work_nature.value)=='')
		{
				alert('Please enter work nature upto 600 chars');
				document.getElementById('work_nature').focus();
				return false;		
		}
		var iwork_natureChars = "!@#$%^*+=\;{}\":<>?";
		var digwork_naturedesit = "0123456789"
		if(document.frmAdnEdUs.work_nature.value!="")
		{
			for (var i = 0; i < document.frmAdnEdUs.work_nature.value.length; i++)
			{ 
				if(iwork_natureChars.indexOf(document.frmAdnEdUs.work_nature.value.charAt(i)) != -1) 
				{				
					alert('work nature contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper work_nature upto 600 chars.');
					document.frmAdnEdUs.work_nature.value="";
					document.frmAdnEdUs.work_nature.focus();
					return false;
					}
					if(digwork_naturedesit.indexOf(document.frmAdnEdUs.work_nature.value.charAt(i)) != -1) 
					{				
						alert('work nature contains numbers etc.\n These are not allowed.\nPlease remove them and try again and enter only alphabates upto 600 chars');
						document.frmAdnEdUs.work_nature.value="";
						document.frmAdnEdUs.work_nature.focus();
						return false;
					}
				}
		}
	}
	return true;
}
/*Admin Side Edit Profile Form - ends*/
/*Index Bottom Adv  - China - starts*/
function doAddIndBtmAdvtChinaReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.frmAddIndBtmAdvt.link.value = ""
	document.frmAddIndBtmAdvt.uploaded.value = ""
}
function checkfrmAddIndBtmAdvtChinaVal()
{
	if(document.frmAddIndBtmAdvt.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.frmAddIndBtmAdvt.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
			
			tname = frmAddIndBtmAdvt.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				frmAddIndBtmAdvt.link.focus();
				return false;
			}
			if (document.frmAddIndBtmAdvt.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
			if (document.frmAddIndBtmAdvt.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.frmAddIndBtmAdvt.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.frmAddIndBtmAdvt.link.value=''; 
				document.frmAddIndBtmAdvt.link.focus();
				return false;
			}
	}
	if(ValidatorTrim(document.frmAddIndBtmAdvt.uploaded.value)=='')
	{
		alert('Please add image only of .gif format');
		document.getElementById('uploaded').focus();
		return false;		
	}
	return true;
}
/*Index Bottom Adv - China - ends*/
/*edit index btm Advt - China -  starts*/
function editIdxBtmAdvChinaVal()
{
	if(document.editIdxBtmAdv.link.value!="")
	{
			var invalid = " ";
			var length = 3;
			var minLength = 6;
			var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
			if(document.editIdxBtmAdv.link.value=="")
			{
				alert("Please enter website address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
				document.editIdxBtmAdv.link.focus();
				return false;
			}
			
			tname = editIdxBtmAdv.link.value;				 
			
			if(tname.indexOf('.') == -1)
			{
				alert("Enter website address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				editIdxBtmAdv.link.focus();
				return false;
			}
			if (document.editIdxBtmAdv.link.value.indexOf(invalid) > -1)
			{
				alert("Sorry, spaces are not allowed in website address.\n Please enter website address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
				document.editIdxBtmAdv.link.focus();
				return false;
			}
			if (document.editIdxBtmAdv.link.value.length < length)
			{
				alert('Your website address must be ' + length + ' characters long.\n Enter website address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
				document.editIdxBtmAdv.link.focus();
				return false;
			}
			if (empty(stripSpaces(document.editIdxBtmAdv.link.value)))
			{ 
				alert('website address cant be empty'); 
				document.editIdxBtmAdv.link.value=''; 
				document.editIdxBtmAdv.link.focus();
				return false;
			}
	}
	return true;
}
/*edit index btm Advt - China - ends*/
/*change user password by admin - stats*/
function doUsrPwdByAdmReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	/*document.fmrChgeUsrByAdmPwd.cpassword.value = ""*/
	document.fmrChgeUsrByAdmPwd.password.value = ""
	document.fmrChgeUsrByAdmPwd.password_confirm.value = ""
}
function checkUserPwdByAdmnVal()
{
	if(document.fmrChgeUsrByAdmPwd.cpassword.value=="")
	{
		alert("Please provide your old Password");
		document.fmrChgeUsrByAdmPwd.cpassword.focus();
		return false;
	}
		if(document.fmrChgeUsrByAdmPwd.cpassword.value!="")
		{
			if(document.fmrChgeUsrByAdmPwd.pwd.value!=document.fmrChgeUsrByAdmPwd.cpassword.value)
			{
			alert("Please provide your valid old password");
			document.fmrChgeUsrByAdmPwd.cpassword.focus();
			return false;
		}
	}
	var newpass=document.fmrChgeUsrByAdmPwd.password.value;
	if(document.fmrChgeUsrByAdmPwd.password.value=="")
	{
		alert("Please enter new password");
		document.fmrChgeUsrByAdmPwd.password.focus();
		return false;
	}
	if(newpass!="")
	{
		if(newpass.indexOf(" ")!=-1)
		{
			alert("Please dont use space for password");
			document.fmrChgeUsrByAdmPwd.password.value="";
			document.fmrChgeUsrByAdmPwd.password.focus();
			return false;
	}
	if(newpass.length<5||newpass.length>8)
	{
	alert("Password length must lie between 5 - 8 Characters");
		document.fmrChgeUsrByAdmPwd.password.value="";
		document.fmrChgeUsrByAdmPwd.password.focus();
		return false;
	}
	}
	if(document.fmrChgeUsrByAdmPwd.password.value!=document.fmrChgeUsrByAdmPwd.password_confirm.value)
	{
		alert("Both New and Confirm Password must be same");
		document.fmrChgeUsrByAdmPwd.password_confirm.focus();
		return false;
	}
}
/*change user password by admin - ends*/
