    function validate()
    {
        var val,val1,val2,val3,val4,n;
         n = 1;   
         val = document.inputfrm.namtxt.value;
         val1 = document.inputfrm.addtxt.value;
         val2 = document.inputfrm.teltxt.value;
         val3 = document.inputfrm.mailtxt.value;
         val4 = document.inputfrm.comtxt.value;
         val5=document.inputfrm.webtxt.value;


         if (validate_isempty(val) == true)
            {   n=0;
                 alert("Enter your name"); 
                 document.inputfrm.namtxt.focus();
                 return false;
             }

          if (isAlphabetic(val) == false)
            {      n=0;
                    alert("Enter Valid Name");
                     document.inputfrm.namtxt.focus();
                    return false;
            }

			  if (validate_mail(val3) == false)
            {      n=0;
                    alert("Enter valid mail Id");
                    document.inputfrm.mailtxt.focus();
                    return false;
            }
			 if (isValid_tel (val2) == false)
            {     n=0;
                   alert("Enter valid phone no");
                   document.inputfrm.teltxt.focus();
                   return false;
            }

			 if (validate_isempty(val5) == false)
            {    
                  if (checkDomain(val5)==false)
                  {
                  document.inputfrm.webtxt.focus();
                  return false;

                  }
            }
       
			 if (validate_isempty(val1) == true)
            {    n=0;
                  alert("Enter company Name"); 
                  document.inputfrm.addtxt.focus();
                  return false;
            }
			
			if (isSpecialcharacter(val1) == false)
            {    n=0;
                  alert("Enter valid company Name"); 
                  document.inputfrm.addtxt.focus();
                  return false;
            }
			


			if (validate_isempty(val4) == true)
            {    n=0;
                  alert("Enter your Description"); 
                  document.inputfrm.comtxt.focus();
                  return false;
            }
       // document.inputfrm.hidtxt.value="sub";
        document.inputfrm.submit();
    }
   
		//**************************Contact us***********************/////////////
		function contactus()
		{
        var val,val1,val2,n;
         n = 1;   
         val = document.frmcontact.txtmail.value;
         val1 = document.frmcontact.txtname.value;
         val2 = document.frmcontact.txtquery.value;
        
		if (validate_mail(val) == false)
            {      n=0;
                    alert("Enter valid mail Id");
                    document.frmcontact.txtmail.focus();
                    return false;
            }
         if (validate_isempty(val1) == true)
            {   n=0;
                 alert("Enter your name"); 
                 document.frmcontact.txtname.focus();
                 return false;
             }
       
          
		if (isAlphabetic(val1) == false)
            {      n=0;
                    alert("Enter Valid Name");
                     document.frmcontact.txtname.focus();
                    return false;
            }

        if (validate_isempty(val2) == true)
            {    n=0;
                  alert("Enter your Query"); 
                  document.frmcontact.txtquery.focus();
                  return false;
            }
       document.frmcontact.submit();
    }
//*************** careers********************///
function careers()
		{
        var val,val1,n;
         n = 1;   
         val = document.frmcareer.comtxt.value;
         val1 = document.frmcareer.Fileup.value;
         
        
		if (validate_isempty(val) == true)
            {      n=0;
                    alert("Enter your comment");
                    document.frmcareer.comtxt.focus();
                    return false;
            }
         if (validate_isempty(val1) == true)
            {   n=0;
                 alert("Select the resume file to upload"); 
                 document.frmcareer.Fileup.focus();
                 return false;
             }
       
        var ComVal=val1.substr(val1.lastIndexOf(".")+1);
		if ((String(ComVal).toUpperCase())!="DOC" && (String(ComVal).toUpperCase())!="ZIP") 
	 			{
					alert("Please select DOC,ZIP Files Only.");					 
					return false;
				}



              document.frmcareer.submit();}
			  //************************************White Papers********************///
function WhitePapers()
    {
        var val,val1,val2,val3,val4,n;
         n = 1;   
         val = document.frmwhitepapers.reqInfoName.value;
         val1 = document.frmwhitepapers.reqInfoEmail.value;
         val2 = document.frmwhitepapers.txtPhone.value;
         val3 = document.frmwhitepapers.txtCname.value;
         
		 val5 = document.frmwhitepapers.webtxt.value;

         if (validate_isempty(val) == true)
            {   n=0;
                 alert("Enter your name"); 
                 document.frmwhitepapers.reqInfoName.focus();
                 return false;
             }

			 if (isAlphabetic(val) == false)
            {      n=0;
                    alert("Enter Valid Name");
                      document.frmwhitepapers.reqInfoName.focus();
                    return false;
            }

        if (validate_mail(val1) == false)
            {      n=0;
                    alert("Enter valid mail Id");
                    document.frmwhitepapers.reqInfoEmail.focus();
                    return false;
            }
        if (isValid_tel (val2) == false)
            {     n=0;
                   alert("Enter valid phone no");
                   document.frmwhitepapers.txtPhone.focus();
                   return false;
            }
        if (validate_isempty(val3) ==true)
            {      n=0;
                    alert("Enter your company Name");
                    document.frmwhitepapers.txtCname.focus();
                    return false;
            }
               
	if (isSpecialcharacter(val3) == false)
            {    n=0;
                  alert("Enter valid company Name"); 
                  document.frmwhitepapers.txtCname.focus();
                  return false;
            }

			 if (validate_isempty(val5) == false)
            {    
                  if (checkDomain(val5)==false)
                  {
                  document.frmwhitepapers.webtxt.focus();
                  return false;

                  }
            }


        document.frmwhitepapers.submit();
    }
	//***********************Case Study************************
function casestudy()
		{
        var val,val1,val2,n;
         n = 1;   
         val = document.frmcasestudy.reqInfoName.value;
         val1 = document.frmcasestudy.reqInfoEmail.value;
		 val2=document.frmcasestudy.txtPhone.value;
		 val5=document.frmcasestudy.webtxt.value;
	  val4=document.frmcasestudy.txtCname.value;
         
        
		if (validate_isempty(val) == true)
            {      n=0;
                    alert("Enter your Name");
                    document.frmcasestudy.reqInfoName.focus();
                    return false;
            }

		if (isAlphabetic(val) == false)
            {      n=0;
                    alert("Enter Valid Name");
                     document.frmcasestudy.reqInfoName.focus();
                    return false;
            }

         if (validate_mail(val1) == false)
            {   n=0;
                 alert("Enter valid mail Id"); 
                 document.frmcasestudy.reqInfoEmail.focus();
                 return false;
             }
		 if (isValid_tel (val2) == false)
            {     n=0;
                   alert("Enter valid phone no");
                   document.frmcasestudy.txtPhone.focus();
                   return false;
            }
			 if (validate_isempty(val4) == false)
			 { 
			if (isSpecialcharacter(val4) == false)
				{    n=0;
					  alert("Enter valid company Name"); 
					  document.frmcasestudy.txtCname.focus();
					  return false;
				}
			 }

			 if (validate_isempty(val5) == false)
            {    
                  if (checkDomain(val5)==false)
                  {
                  document.frmcasestudy.webtxt.focus();
                  return false;

                  }
            }

        
              document.frmcasestudy.submit();}
			  // ******************************************NO risk**********************8888
			  
			   function norisk()
    {
        var val,val1,val2,val3,n;
         n = 1;   
         val = document.frmnorisk.txtname.value;
         val1 = document.frmnorisk.txtmail.value;
         val2 = document.frmnorisk.txtphone.value;
         val3 = document.frmnorisk.txtcomments.value;
        
         if (validate_isempty(val) == true)
            {   n=0;
                 alert("Enter your  name"); 
                 document.frmnorisk.txtname.focus();
                 return false;
             }
             if (isAlphabetic(val) == false)
            {      n=0;
                    alert("Enter Valid Name");
                     document.frmnorisk.txtname.focus();
                    return false;
            }


			  if (validate_mail(val1) == false)
            {      n=0;
                    alert("Enter valid mail Id");
                    document.frmnorisk.txtmail.focus();
                    return false;
            }
			 if (isValid_tel (val2) == false)
            {     n=0;
                   alert("Enter valid phone no");
                   document.frmnorisk.txtphone.focus();
                   return false;
            }
        if (validate_isempty(val3) == true)
            {    n=0;
                  alert("Enter your Comments"); 
                  document.frmnorisk.txtcomments.focus();
                  return false;
            }
            
        document.frmnorisk.submit();
    }
	
	
	//***********************Case Study************************
function Quickcontact()
		{
        var val,val1,n;
         n = 1;   
         val = document.quick.q_message.value;
         val1 = document.quick.q_email.value;
		 
         
        
		if (validate_isempty(val) == true)
            {      n=0;
                    alert("Enter your Name");
                    document.quick.q_message.focus();
                    return false;
            }
	    

         if (validate_mail(val1) == false)
            {   n=0;
                 alert("Enter valid mail Id"); 
                 document.quick.q_email.focus();
                 return false;
             }
		       
             document.quick.submit();
			  }


function fnProposalSubmit(){
	if (document.frmComment.txtTitle.value==""){
		alert("Please enter RFP/RFI title");
		document.frmComment.txtTitle.focus();
	}

	else if (document.frmComment.txtSummary.value==""){
		alert("Please enter Summary");
		document.frmComment.txtSummary.focus();
	}
	
	else if (document.frmComment.txtBusTech.value==""){
		alert("Please enter your business and technical requirements");
		document.frmComment.txtBusTech.focus();
	}
	
		else if (document.frmComment.txtDescription.value==""){
		alert("Please enter description");
		document.frmComment.txtDescription.focus();
	}
	
	else if (document.frmComment.txtCompany.value==""){
		alert("Please enter your company name");
		document.frmComment.txtCompany.focus();
	}
	 else if(document.frmComment.txtEmail.value==""){
		alert("Please enter your Email ID");
		document.frmComment.txtEmail.focus();
	} 
	else if (validate_mail(document.frmComment.txtEmail.value) == false)
            {      n=0;
                    alert("Enter valid mail Id");
                    document.frmComment.txtEmail.focus();
                    return false;
             
			}

	else if (document.frmComment.txtName.value==""){
		alert("Please enter your Full Name");
		document.frmComment.txtName.focus();
	}
	else if (document.frmComment.txtDesignation.value==""){
		alert("Please enter your job title");
		document.frmComment.txtDesignation.focus();
	}
	
	

	 else if (document.frmComment.txtRndNo.value != document.frmComment.hidRndNo.value)
            {      n=0;
                    alert("Enter valid code ");
                    document.frmComment.txtRndNo.focus();
                    return false;
            }
	else {
		document.frmComment.action="rfirfp.asp"
		document.frmComment.submit();
	}
}








			   function maxLength(field,maxChars)
				 {
					   if(field.value.length >= maxChars) {
						  event.returnValue=false;
						  return false;
					   }
				 }  

				 function maxLengthPaste(field,maxChars)
				 {
					   event.returnValue=false;
					   if((field.value.length +  window.clipboardData.getData("Text").length) > maxChars) {
						 return false;
					   }
					   event.returnValue=true;
				}

				function ResetFilePath(fil)
				{		
					fil.select(); 
					n=fil.createTextRange(); 
					n.execCommand('delete'); 
				}
