  whitespaces="!@#$%^&*(){}|?_+=-\,./;<>"
  lowercase="abcdefghijklmnopqrstuvwxyz "
  uppercase="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  numbers="0123456789"
  telephone="0123456789()-"
  s = new Date()
  dd = s.getDay() 
  y=s.getMonth()
  yy=s.getYear()
  mm="469"
  abc="2"

function f()
{
document.form.Name.focus()
}

function chk_not_char(obj)
{
 
  val=obj.value
  len=val.length
  if ((obj==document.forms[0].Phone)||(obj==document.forms[0].fax))
  {
   for(i=0;i<len;i++)
  {                                     
    var s=val.charAt(i)
   if (telephone.indexOf(s)==-1)
   {
    alert("Invalid Telephone Number")
    obj.select()
    obj.focus()
    return true;
    break
   }
  }
 }
 else
 {
  for(i=0;i<len;i++)
  {
    var s=val.charAt(i)
   if (numbers.indexOf(s)==-1)
   {
     alert(obj.name +" cannot have characters in them")
    obj.select()
    obj.focus()
    return true;
    break
   }
 } 
 }
 return false;
}

function validate()
{

	if(document.form.Name.value=="")
		{
			alert("Enter your name");
			document.form.Name.focus()
			document.form.Name.select()
			return false;
		}

        if(document.form.Address.value=="")
		{
                        alert("Enter your Street address");
                        document.form.Address.focus()
                        document.form.Address.select()
			return false;
		}

	if(document.form.Phone.value=="")
		{
			alert("Enter your telephone number");
			document.form.Phone.focus()
			document.form.Phone.select()
			return false;
		}


	if(document.form.Email.value=="")
		{
			alert("Enter your email");
			document.form.Email.focus()
			return false;
		}
	if(valem(document.form.Email.value)==false)
	    {
          alert("Invalid E-Mail ID");
          document.form.Email.focus();
          document.form.Email.select();
          return false;
            }

	if(document.form.Comments.value=="")
		{
			alert("Enter your Comments");
			document.form.Comments.focus()
			document.form.Comments.select()
			return false;
		}		

return true;                    
	
}
function valem(text)
{
	var flag=true;
	var flag1=0
	var flag3
	var l=0
	
	flag=valsplchars(text);
        if(flag==false)
               return false;
       	if(text.substring(0,1)=="@" || text.substring(0,1)=="." || text.substring(text.length-1,text.length)=="@" ||  text.substring(text.length-1,text.length)==".")
		return false;
	for(i=0;i<text.length;i++){
		if(text.substring(i,i+1)=="@"){
			l=i
			flag1=flag1+1
		}
		if(text.substring(i,i+1)==flag3 && text.substring(i,i+1)==".")
			return false;	
		flag3=text.substring(i,i+1)			
	}
	if(flag1!=1)
		return false;
	l=(text.indexOf(".",l))
//	alert(l)	
	if(l==-1)
		return false
	if(l+3>text.length)
		return false;	
        return(flag);   
}
function valsplchars(text)
{	
	
	var flag=true;
	for(j=0;j<text.length;j++)
	{
		if((text.substring(j,j+1)=="!") ||
		   (text.substring(j,j+1)=="~") ||
		   (text.substring(j,j+1)=="#") ||
		   (text.substring(j,j+1)=="$") ||
		   (text.substring(j,j+1)=="%") ||
		   (text.substring(j,j+1)=="^") ||
		   (text.substring(j,j+1)=="'") ||
		   (text.substring(j,j+1)=="&") ||
		   (text.substring(j,j+1)=="*") ||
		   (text.substring(j,j+1)=="(") ||
		   (text.substring(j,j+1)=="|") ||
		   (text.substring(j,j+1)=="=") ||
		   (text.substring(j,j+1)==")") ||
		   (text.substring(j,j+1)=="{") ||
		   (text.substring(j,j+1)=="}") ||
		   (text.substring(j,j+1)=="[") ||
		   (text.substring(j,j+1)=="]") ||
		   (text.substring(j,j+1)==":") ||
		   (text.substring(j,j+1)=="\"") ||
		   (text.substring(j,j+1)==",") ||
		   (text.substring(j,j+1)=="<") ||
		   (text.substring(j,j+1)==">") ||
		   (text.substring(j,j+1)=="?") ||
		   (text.substring(j,j+1)=="/") ||
		   (text.substring(j,j+1)=="\\")||
		   (text.substring(j,j+1)=="+"))
		{
			flag=false;
			break;
		}
	}
	return(flag);
}

function fun()
	{
            var t=window.document.form.venture.length;
	    var x="";
	    for(var p=0;p<t;p++)
		{
                        if(window.document.form.venture[p].checked)
        		{ 	
                        x+=window.document.form.venture[p].value
			}
                        return false
    		}
        return true
	}


