	function ValidateDoc()
	{
		
   		var ErrorMsg = "";
			ErrorMsg =  "_________________________________________________\n\n";
			ErrorMsg += Localize("The form was not submitted because the following error(s).") + "\n";
			ErrorMsg += Localize("Please correct these error(s) and resubmit.") + "\n";
			ErrorMsg += "_________________________________________________\n\n";
			ErrorMsg += Localize("The following required field(s) were left empty or invalid:") + "\n\n";
		
		var InitLen   = ErrorMsg.length;
		var TheForm   = document.inquiry;
		

		if (trim(TheForm.contact_name.value).length < 1){
			ErrorMsg =  ErrorMsg + Localize("- Contact Name") + "\n";
		}else{
			if (!GetPersonalNameExt(TheForm.contact_name.value)){
				ErrorMsg = ErrorMsg + Localize("- Contact Name") + "\n";
			}
		}
		//email - required field & format validation	
		if ((trim(TheForm.email.value).length < 1)||(!CheckEmailFormat(TheForm.email.value)))
			ErrorMsg =  ErrorMsg + Localize("- Email") + "\n" + Localize("  For example: yourname@domain.com") + "\n";
		
		if ((trim(TheForm.emailconfirm.value).length < 1)||(!CheckEmailFormat(TheForm.emailconfirm.value)))
			ErrorMsg =  ErrorMsg + Localize("- Email confirmation") + "\n" + Localize("  For example: yourname@domain.com") + "\n";


		//confirm email addresses match
		if(TheForm.emailconfirm.value !="" && TheForm.email.value!=TheForm.emailconfirm.value){
			ErrorMsg =  ErrorMsg + Localize("- Please enter your Email Address twice for verification. Please type it the exact same way both times.") + "\n";
			}

		
		//company - required field validation
		if (trim(TheForm.companyname.value).length < 1)
			ErrorMsg =  ErrorMsg + Localize("- Company Name") + "\n";

		//companywebsite - required field validation
		if (trim(TheForm.companywebsite .value).length < 1)
			ErrorMsg =  ErrorMsg + Localize("- Company Website") + "\n";
		//product - required field validation
		if (TheForm.prodver.selectedIndex < 1)
			ErrorMsg = ErrorMsg + Localize("- Product Name") + "\n";


			
		//engver - required field validation	
		if (TheForm.engver.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("- Engine Version") + "\n";
		//datver - required field validation	
		if (TheForm.datver.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("- Dat Version") + "\n";


		//othdetails- required field validation	
		if (TheForm.othdetails.value.length > 1000)
			ErrorMsg = ErrorMsg + Localize("- Other details required for installation") + "\n"  + Localize("  Should be less than 1000 characters.") + "\n";
		//dessoft - required field validation	
		if (TheForm.dessoft.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("- Description of your software") + "\n";
		if (TheForm.dessoft.value.length >2000)
			ErrorMsg = ErrorMsg + Localize("- Description of your software") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";

		//resforsub- required field validation	
		if (TheForm.resforsub.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("- Reason/s for submitting the dispute") + "\n";
		if (TheForm.resforsub.value.length >3000)
			ErrorMsg = ErrorMsg + Localize("- Reason/s for submitting the dispute") + "\n"+ Localize("  Should be less than 3000 characters.") + "\n";

		//recissue- required field validation	
		if (TheForm.recissue.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("- Exact instructions for recreating issue") + "\n";
		if (TheForm.recissue.value.length > 3000)
			ErrorMsg = ErrorMsg + Localize("- Exact instructions for recreating issue") + "\n"+ Localize("  Should be less than 3000 characters.") + "\n";


		//detectname - required field validation	
		if (TheForm.detectname.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("- Detection name as given by McAfee") + "\n";

		//webbrowser
		 if (TheForm.webbrowseyes.checked == true)
		  {
			if ( TheForm.ie.checked == false && TheForm.netscape.checked == false && TheForm.firefox.checked == false && 
				TheForm.safari.checked == false && TheForm.opera.checked == false && TheForm.otherbrowser.checked == false )
				ErrorMsg = ErrorMsg + Localize("- Please Select a browser type") + "\n";
			
			if ( TheForm.otherbrowser.checked == true ) {
				if (TheForm.otherbrowserboxdesc.value.length < 1  )
				ErrorMsg = ErrorMsg + Localize("- Mention other browser details") + "\n";
				if (TheForm.otherbrowserboxdesc.value.length > 2000  )
				ErrorMsg = ErrorMsg + Localize("- Mention other browser details") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";
			}

		  }

		 

		//opsys- required field validation	
		if (TheForm.opsysyes.checked == true )
		  {
			if (TheForm.integrateos.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- Does your software integrate with the operating system") + "\n";
			if (TheForm.integrateos.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- Does your software integrate with the operating system") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";
			
		  }
		//compsetting- required field validation	
		if (TheForm.compsettingsyes.checked == true )
		  {
			if (TheForm.compsettingsaffect.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- Does your software affect any other computer settings") + "\n";
			if (TheForm.compsettingsaffect.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- Does your software affect any other computer settings") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";
			
		  }

		if (TheForm.collectinfoyes.checked == true )
		  {
			if (TheForm.infocollected.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- Describe all the information collected ") + "\n";
			if (TheForm.infocollected.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- Describe all the information collected ") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";

			if (TheForm.infoused.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- Describe how this information is used ") + "\n";
			if (TheForm.infoused.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- Describe how this information is used ") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";
		  }
		else
		  {
			TheForm.personidentifyno.checked= true;
		  }

		 if (TheForm.shareinfoyes.checked == true )
		  {
			if (TheForm.whatinfo.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- What information is shared") + "\n";
			if (TheForm.whatinfo.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- What information is shared") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";

			if (TheForm.sharewhom.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- With whom is it shared ") + "\n";
			if (TheForm.sharewhom.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- With whom is it shared") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";

			
			if (TheForm.explaininfo.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- Explain how you protect this information  ") + "\n";
			if (TheForm.explaininfo.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- Explain how you protect this information  ") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";

		  }

		  if (TheForm.directtocustomer.checked == false && TheForm.thirdpartybundled.checked == false && TheForm.thirdpartynotbundled.checked == false && TheForm.otherdistribution.checked == false )
		  {
			
			ErrorMsg = ErrorMsg + Localize("- Please select how is your software distributed") + "\n";
			
		  }
		
		  if (TheForm.otherdistribution.checked == true )
		  {
			if (TheForm.otherdetail.value.length < 1  )
			ErrorMsg = ErrorMsg + Localize("- Please Explain how is your software distributed") + "\n";
			if (TheForm.otherdetail.value.length > 2000  )
			ErrorMsg = ErrorMsg + Localize("- Please Explain how is your software distributed  ") + "\n"+ Localize("  Should be less than 2000 characters.") + "\n";


		  }

		  



		//infosent - required field validation	
		if (trim(TheForm.infosent.value).length < 1)
			ErrorMsg = ErrorMsg + Localize("- If your software connects to the Internet, explain what information is sent, where and when:") + "\n";
		if (TheForm.infosent.value.length > 2000)
			ErrorMsg =  ErrorMsg + Localize("- If your software connects to the Internet, explain what information is sent, where and when:") + "\n" + Localize("  Should be less than 2000 characters.") + "\n";

		//eula - required field validation	
		if (trim(TheForm.eula.value).length < 1)
			ErrorMsg = ErrorMsg + Localize("- Include your End User License Agreement (EULA) or provide the URL where it is located") + "\n";
		if (TheForm.eula.value.length > 2000)
			ErrorMsg =  ErrorMsg + Localize("- Include your End User License Agreement (EULA) or provide the URL where it is located") + "\n" + Localize("  Should be less than 2000 characters.") + "\n";

		//privacy- required field validation	
		if (trim(TheForm.privacy.value).length < 1)
			ErrorMsg = ErrorMsg + Localize("- Include your privacy policy or provide the URL where it is located:") + "\n";
		if (TheForm.privacy.value.length > 2000)
			ErrorMsg =  ErrorMsg + Localize("- Include your privacy policy or provide the URL where it is located:") + "\n" + Localize("  Should be less than 2000 characters.") + "\n";


		//addinfo - required field validation	
		if (TheForm.addinfo.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("- Do you have additional information you would like McAfee to consider when evaluating your submission") + "\n";
		if (TheForm.addinfo.value.length > 3000)
			ErrorMsg = ErrorMsg + Localize("- Do you have additional information you would like McAfee to consider when evaluating your submission") + "\n"+ Localize("  Should be less than 3000 characters.") + "\n";

		//softwarebundled - required field validation	
		if (TheForm.softwarebundled.value.length < 1)
			ErrorMsg = ErrorMsg + Localize("-Is your software bundled") + "\n";
		



		if ( ErrorMsg.length > InitLen )
		{
			alert( ErrorMsg );
			return (false);
		}
		return true;
	}

/*---------*/



/*TC - Dispute Form*/
function checksoftwaredisrtibution(obj, eDiv){
	//alert('unexpected');
	var box = document.getElementById(eDiv);
	var state = document.getElementById(obj)
	if(state.checked == true && obj == 'otherdistribution'){
		document.inquiry.otherdetail.value="";

		box.style.display = 'block';
		document.getElementById('directtocustomer').checked=false;
		document.getElementById('thirdpartybundled').checked=false;	
		document.getElementById('thirdpartynotbundled').checked=false;	
		document.inquiry.otherdetail.focus();

	}
	else
	{
		document.getElementById('otherdistribution').checked=false;
		document.inquiry.otherdetail.value="";
		box.style.display = 'none';
		
	}
	

}

function checkbrowserstate(obj, eDiv){

	var box = document.getElementById(eDiv);
	var state = document.getElementById(obj)
	if(state.checked == true && obj == 'otherbrowser'){
		box.style.display = 'block';
		document.inquiry.otherbrowserboxdesc.value="";
		document.inquiry.otherbrowserboxdesc.focus();
		
	}
	
	if(state.checked == false && obj == 'otherbrowser'){

	
		document.getElementById('otherbrowser').checked=false;
		document.inquiry.otherbrowserboxdesc.value="";
		box.style.display = 'none';
		

		
	}
}


function showbox(eDiv){
	
	var dt = document.getElementById(eDiv);
	if ((dt.style.display == '')||(dt.style.display == 'none'))
	{
		dt.style.display = 'block';
		
	}
	if(document.inquiry.webbrowseyes.checked == true ){
	hidebox('otherbrowserbox');
	}
}
function hidebox(eDiv){
	var dt = document.getElementById(eDiv);
	if ((dt.style.display == '')||(dt.style.display == 'block'))
	{
		dt.style.display = 'none';
		
	}

	if(document.inquiry.webbrowseno.checked == true ){
		document.getElementById('ie').checked=false;
		document.getElementById('netscape').checked=false;
		document.getElementById('safari').checked=false;
		document.getElementById('firefox').checked=false;
		document.getElementById('opera').checked=false;
		document.getElementById('otherbrowser').checked=false;
		

		
	}
	
}
function hidebox2(eDiv,txtarea){
	var dt = document.getElementById(eDiv);
	if ((dt.style.display == '')||(dt.style.display == 'block'))
	{
		dt.style.display = 'none';
		
	}

	
document.inquiry.elements[txtarea].value="";

	
	
}
