$(function(){

    $("ul.dropdown li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");

});




function checkname(object) {
var regex = /^[a-zA-Z ]+$/ 
if (!regex.test(object.value)) { 
object.value = ""; 
alert('Please Enter Alphabets only!');
}
}


function nameempty()
{
var re5digit=/^({+})|(\d)$/;
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var regexLetter = /^[a-zA-Z ]+$/;
	var regex=/^[A-Za-z0-9_\-\,\(\-|\/|\.) ]+$/; 
    var com,lngstr;
    var flag;
var address = document.form.email.value;
        if ( document.form.first_name.value == '' )
        {
		document.form.first_name.focus();
                alert('Please Enter the First Name!');
	
                return false;
        }
		
			
		
		if ( document.form.last_name.value == '' )
        {
		document.form.last_name.focus();
                alert('Please Enter the Last Name!');
	
                return false;
        }
		
		
		
		
		 if ( document.form.email.value == '' )
        {       document.form.email.focus();
                alert('Please Enter the Email_ID!');
				
                return false;
        }
		
			if ( document.form.email.value != '' )
		       {
		       if(reg.test(address) == false) {
			    alert('Invalid email address.');
			    document.form.email.focus();
			    return false;

           }
		   }
		
		 if ( document.form.telephone.value == '' )
        {        document.form.telephone.focus();
                alert('Please Enter the Phone No.!');
				
                return false;
        }
		
		 if ( document.form.telephone.value != '' )		 
		 {
		    if(re5digit.test(document.form.telephone.value) == false)
			{
		 	alert("Mobile number should be numeric.");
			document.form.telephone.focus();
			return false;
			}
		 
		  }
		  
		   if(re5digit.test(document.form.telephone.value) == true)
		   {
				 if(document.form.telephone.value.length <13)
				 {
					alert("Mobile number should be 12 chars like that (+919868042451).");
					document.form.telephone.focus();
					return false;
				 }
		   }
				 
				 
		 if ( document.form.comments.value == '' )
        {       document.form.comments.focus();
                alert('Please Leave the Comments !');
				
                return false;
				
        } 
		
var com = document.form.comments.value;
lngstr = com.length;
for(var j=0;j<lngstr;j++)
{
if(com.charCodeAt(j)==32)
{
flag=0;
}
else
{
flag=1;
break;
}
}

if(flag==0)
{
document.form.comments.focus();
alert('Please Leave the Comments !');
 return false;
}


	
		  return true;
		}  






		function nameemptyforcareer()
{
var re5digit=/^({+})|(\d)$/;
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var regexLetter = /^[a-zA-Z ]+$/;
	var regex=/^[A-Za-z0-9_\-\,\(\-|\/|\.) ]+$/; 
	
	
	var com,lngstr;
    var flag;

var address = document.form.email.value;
        if ( document.form.name.value == '' )
        {
		document.form.name.focus();
                alert('Please Enter the Name!');
	
                return false;
        }
		
	/*		
		
		if ( document.form.last_name.value == '' )
        {
		document.form.last_name.focus();
                alert('Please Enter the Last Name!');
	
                return false;
        }
		
		*/
		
		
		 if ( document.form.email.value == '' )
        {       document.form.email.focus();
                alert('Please Enter the Email_ID!');
				
                return false;
        }
		
			if ( document.form.email.value != '' )
		       {
		       if(reg.test(address) == false) {
			    alert('Invalid email address.');
			    document.form.email.focus();
			    return false;

           }
		   }
		
		 if ( document.form.phoneno.value == '' )
        {        document.form.phoneno.focus();
                alert('Please Enter the Phone No.!');
				
                return false;
        }
		
		 if ( document.form.phoneno.value != '' )		 
		 {
		    if(re5digit.test(document.form.phoneno.value) == false)
			{
		 	alert("Mobile number should be numeric.");
			document.form.phoneno.focus();
			return false;
			}
		 
		  }
		  
		   if(re5digit.test(document.form.phoneno.value) == true)
		   {
				 if(document.form.phoneno.value.length <13)
				 {
					alert("Mobile number should be 12 chars like that (+919868042451).");
					document.form.phoneno.focus();
					return false;
				 }
		   }
				 
			 
		 if ( document.form.address.value == '' )
        {       document.form.address.focus();
                alert('Please Enter the Address !');
				
                return false;
				
        } 
		
		
var com = document.form.address.value;
lngstr = com.length;
for(var j=0;j<lngstr;j++)
{
if(com.charCodeAt(j)==32)
{
flag=0;
}
else
{
flag=1;
break;
}
}

if(flag==0)
{
document.form.address.focus();
alert('Please Enter the Address !');
 return false;
}
		
		
		
		


			 if ( document.form.resume.value == '' )
        {       document.form.resume.focus();
                alert('Please Upload Your Resuma!');
				
                return false;
        }
	
		  return true;
		}  
		
		
		
		

		

/*var com,lngstr;
var flag;
var com = document.form.comments.value;
lngstr = com.length;
for(var j=0;j<lngstr;j++)
{
if(com.charCodeAt(j)==32)
{
flag=0;
}
else
{
flag=1;
break;
}
}

if(flag==0)
{
document.form.comments.focus();
alert('Please Leave the Comments !');
}*/



