﻿//-----------------------------------------------------------------------------
// validateForm***(theForm)
//
//	theForm - the table name
//
// Note: no.
//-----------------------------------------------------------------------------

function validateEmail(strEmailAddress)
{
   	if(!strEmailAddress.match("^[\._a-zA-Z0-9-]+@([_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$"))
  	{    
		return false;		
  	}
    else
    {
  		return true;
  	}
}

function filtrateScript(textValue,len)
{
	var strlen = textValue.length;
	if(strlen>len)
	textValue = textValue.slice(0,len);
	textValue = textValue.replace("'","*");
	textValue = textValue.replace("<","＜");
	textValue = textValue.replace(">","＞");
	textValue = textValue.replace("/","\\");
	return textValue;
}

//------------------------------------------------------------------------------------

// Begin Download

// **************** for form brochure ****************
function validateForm_brochure(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid contact name.");
		theForm.realname.focus();
		return false;
	}
	else
	{
		try
		{
			if (theForm.lastname.value == "")
			{
				alert("Please enter a valid last name.");
				theForm.lastname.focus();
				return false;
			}
		}
		catch(err){}
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	try
	{
		if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	}catch(err){}
	try
	{
		if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	}catch(err){}
	try
	{
		if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	}catch(err){}
	try
	{
		if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	}catch(err){}
	try{
		theForm.realname.value = theForm.realname.value + " " + theForm.lastname.value;
	//	window.location="../../pdf/Whitepaper.zip";
		theForm.realname.value = filtrateScript(theForm.realname.value,50);
		theForm.username.value = filtrateScript(theForm.username.value,50);
		theForm.city.value = filtrateScript(theForm.city.value,50);
		theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	}
	catch(err){}
	return true;
}
// **************** for form validateForm_intellectual_property ****************
function validateForm_intellectual_property(theForm)
{
	if (theForm.realname.value=="")
	{
//		alert("Please enter First Name.");
		alert("Please enter a valid contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
	{
		alert("Please enter a valid telephone.");
		theForm.city.focus();
		return false;
	}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
//	window.location="../../pdf/Whitepaper.zip";
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form why out *****************
function validateForm_whyout(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter First Name.");
		theForm.realname.focus();
		return false;
	}
	else
	{
		if (theForm.lastname.value == "")
		{
			alert("Please enter Last Name.");
			theForm.lastname.focus();
			return false;
		}
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
	{
		alert("Please enter a valid telephone.");
		theForm.city.focus();
		return false;
	}
	if (theForm.country.value=="")
	{
		alert("Please select a country.");
		theForm.country.focus();
		return false;
	}
	if (theForm.hear.value=="")
	{
		alert("Please select one.");
		theForm.hear.focus();
		return false;
	}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
		
	theForm.realname.value = theForm.realname.value + " " + theForm.lastname.value;
//	window.location="../../pdf/Why_China.zip";
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form validate_caseLoads*****************
function validate_projact_evaluation(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.Company.value=="")
		{
			alert("Please enter a Company.");
			theForm.Company.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please describe your project in more details:.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}
//*******************validate_newsletter*****************************
function validate_newsletter(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Name.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	return true;
}
// **************** for form validate_pricing*****************
function validate_pricing(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.projectdetails.value=="")
		{
			alert("Please enter comments for your pilot project or the developers needed.");
			theForm.projectdetails.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.projectdetails.value = filtrateScript(theForm.projectdetails.value,999999);
	return true;
}

// **************** for form methodology *****************
function validate_method(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter First Name.");
		theForm.realname.focus();
		return false;
	}
	else
	{
		if (theForm.lastname.value == "")
		{
			alert("Please enter Last Name.");
			theForm.lastname.focus();
			return false;
		}
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
	{
		alert("Please enter a valid telephone.");
		theForm.city.focus();
		return false;
	}
	if (theForm.country.value=="")
	{
		alert("Please select a country.");
		theForm.country.focus();
		return false;
	}
	if (theForm.hear.value=="")
	{
		alert("Please select one.");
		theForm.hear.focus();
		return false;
	}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = theForm.realname.value + " " + theForm.lastname.value;
//	window.location="../../pdf/Methodology.zip";
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form white Paper *****************
function validate_whitepaper(theForm)
{
	if (theForm.realname.value=="")
	{
//		alert("Please enter First Name.");
		alert("Enter First Name, please");
		theForm.realname.focus();
		return false;
	}
	else
	{
		if (theForm.lastname.value == "")
		{
			alert("Please enter Last Name.");
			theForm.lastname.focus();
			return false;
		}
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
	{
		alert("Please enter a valid telephone.");
		theForm.city.focus();
		return false;
	}
	if (theForm.country.value=="")
	{
		alert("Please select a country.");
		theForm.country.focus();
		return false;
	}
	if (theForm.hear.value=="")
	{
		alert("Please select one.");
		theForm.hear.focus();
		return false;
	}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = theForm.realname.value + " " + theForm.lastname.value;
//	window.location="../../pdf/Whitepaper.zip";
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}
//End download

// **************** for form validate_localization *****************
function validate_localization(theForm)
{
	if (theForm.realname.value=="")
	{
//		alert("Please enter First Name.");
		alert("Enter First Name, please");
		theForm.realname.focus();
		return false;
	}
	else
	{
		if (theForm.lastname.value == "")
		{
			alert("Please enter Last Name.");
			theForm.lastname.focus();
			return false;
		}
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
	{
		alert("Please enter a valid telephone.");
		theForm.city.focus();
		return false;
	}
	
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = theForm.realname.value + " " + theForm.lastname.value;
//	window.location="../../pdf/Whitepaper.zip";
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}
//End download

//---------------------------------------------------------------------------------------

// Begin Request

// **************** for form request case *****************
function validate_case(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.casestudy.value=="")
		{
			alert("Please select a sample code.");
			theForm.casestudy.focus();
			return false;
		}
	if (theForm.details.value=="")
		{
			alert("Please enter a valid details info.");
			theForm.details.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.details.value = filtrateScript(theForm.details.value,999999);
	return true;
}


// **************** for form odc quote *****************
function validate_odcquote(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}	
	if (theForm.wantTech.value=="")
		{
			alert("Please select one.");
			theForm.wantTech.focus();
			return false;
		}		
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form it *****************
function validate_it(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}	
	if (theForm.wantTech.value=="")
		{
			alert("Please select one.");
			theForm.wantTech.focus();
			return false;
		}	
		
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form validate_evaluation *****************
function validate_evaluation(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
		if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form quote *****************
function validate_quote(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}	
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form product development *****************
function validate_prodev(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.wantTech.value=="")
		{
			alert("Please select one.");
			theForm.wantTech.focus();
			return false;
		}	
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form requote *****************
function validate_requote(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.wantTech.value=="")
		{
			alert("Please select technique.");
			theForm.wantTech.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form validate_requst_team *****************
function validate_requst_team(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form submit *****************
function validate_submit(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.wantTech.value=="")
		{
			alert("Please select a technique.");
			theForm.wantTech.focus();
			return false;
		}
	if (theForm.Budget.value=="")
		{
			alert("Please select a Budget.");
			theForm.Budget.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form validate_request_submit *****************
function validate_request_submit(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.wantTech.value=="")
		{
			alert("Please select a technique.");
			theForm.wantTech.focus();
			return false;
		}
	if (theForm.Budget.value=="")
		{
			alert("Please select a Budget.");
			theForm.Budget.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
			theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

		
		// **************** for form quote *****************
function validate_affshore_staffing(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (theForm.newURL.value=="")
	{
		alert("Please enter a valid company.");
		theForm.newURL.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.wantTech.value=="")
		{
			alert("Please select a technique.");
			theForm.wantTech.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form Reference contact *****************
function validate_refcon(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form sample code *****************
function validate_samplecode(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.SampleCode.value=="")
		{
			alert("Please select a sample code.");
			theForm.SampleCode.focus();
			return false;
		}
	if (theForm.details.value=="")
		{
			alert("Please enter a vailde details info.");
			theForm.details.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.details.value = filtrateScript(theForm.details.value,999999);
	return true;
}

// **************** for form standard document *****************
function validate_doc(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.documentation.value=="")
		{
			alert("Please select a documentation.");
			theForm.documentation.focus();
			return false;
		}
	if (theForm.details.value=="")
		{
			alert("Please enter a valid details info.");
			theForm.details.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.details.value = filtrateScript(theForm.details.value,999999);
	return true;
}

//End request

//-------------------------------------------------------------------------

// Begin Other

// **************** for form pricing and info*****************
function validate_other(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}


//End other

// Begin tech

// **************** for form dot net standard*****************
function validateForm_dotNet(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter First Name.");
		theForm.realname.focus();
		return false;
	}
	if (theForm.lastname.value == "")
	{
		alert("Please enter Last Name.");
		theForm.lastname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
	{
		alert("Please enter a valid telephone.");
		theForm.city.focus();
		return false;
	}
		if (theForm.company.value=="")
	{
		alert("Please enter your company name.");
		theForm.company.focus();
		return false;
	}
		if (theForm.country.value=="")
	{
		alert("Please select a country.");
		theForm.country.focus();
		return false;
	}
	if (theForm.hear.value=="")
	{
		alert("Please select one.");
		theForm.hear.focus();
		return false;
	}
	if (theForm.details.value=="")
		{
			alert("Please enter a valid details info.");
			theForm.details.focus();
			return false;
		}
	theForm.realname.value = theForm.realname.value + " " + theForm.lastname.value;
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.company.value = filtrateScript(theForm.company.value,50);
	theForm.details.value = filtrateScript(theForm.details.value,999999);
	return true;
}

//End other


// Begin tech

// **************** for form validate_caseLoads*****************
function validate_caseLoads(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter your name.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
	{
		alert("Please enter a valid telephone.");
		theForm.city.focus();
		return false;
	}
		if (theForm.country.value=="")
	{
		alert("Please select a country.");
		theForm.country.focus();
		return false;
	}
	if (theForm.hear.value=="")
	{
		alert("Please select one.");
		theForm.hear.focus();
		return false;
	}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.company.value = filtrateScript(theForm.company.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

//End caseLoad

// **************** for form validate_caseLoads*****************
function validate_contactus(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form Reference contact *****************
function validate_SoftwareQualityAssuranceTesting(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
}

// **************** for form Reference contact *****************
function validate_odcrefcon(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form Reference contact *****************
function validate_conrefcon(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	if (theForm.city.value=="")
		{
			alert("Please enter a valid telephone.");
			theForm.city.focus();
			return false;
		}
	if (theForm.country.value=="")
		{
			alert("Please select a country.");
			theForm.country.focus();
			return false;
		}
	if (theForm.hear.value=="")
		{
			alert("Please select one.");
			theForm.hear.focus();
			return false;
		}
	if (theForm.comments.value=="")
		{
			alert("Please enter a valid comments info.");
			theForm.comments.focus();
			return false;
		}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}

// **************** for form add_sites*****************
function validate_add_sites(theForm)
{
	
	if (theForm.Titles.value=="")
		{
			alert("Please enter the title.");
			theForm.Titles.focus();
			return false;
		}
	if (theForm.Description.value=="")
		{
			alert("Please enter a valid Description info.");
			theForm.Description.focus();
			return false;
		}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	

    theForm.Titles.value = filtrateScript(theForm.Titles.value,50);
    theForm.ReciprocalLink.value = filtrateScript(theForm.ReciprocalLink.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.URL.value = filtrateScript(theForm.URL.value,50);
	theForm.Description.value = filtrateScript(theForm.Description.value,999999);
	return true;
}


// *********************** for form QATesting ******************************//

function validate_testonright(theForm)
{
	if (theForm.realname.value=="")
	{
		alert("Please enter a valid Contact person.");
		theForm.realname.focus();
		return false;
	}
	if (!validateEmail(theForm.username.value))
	{
		alert("Please enter a valid email address.");
		theForm.username.focus();
		return false;
	}
	theForm.realname.value = filtrateScript(theForm.realname.value,50);
	theForm.username.value = filtrateScript(theForm.username.value,50);
	theForm.city.value = filtrateScript(theForm.city.value,50);
	theForm.newURL.value = filtrateScript(theForm.newURL.value,50);
	theForm.comments.value = filtrateScript(theForm.comments.value,999999);
	return true;
}
