<!--@_formJS_@-->

function LoadThis()
{
	var theForm = document.frmInquiry;
	theForm.submit();
}

function checkPA()
{
	var theForm = document.frmInquiry;
	if(theForm.pAId.selectedIndex == 0)
	{
		alert("Please select the Practice Area");
		theForm.pAId.focus();
		return false;
	}
	else
		theForm.submit();
	
}


/*function selectForm()
{
	var theForm = document.frmInquiry;
	//theForm.func.value = 'loadForm';
	theForm.submit();
}
*/
/*function submitForm()
{
	var theForm = document.frmInquiry;
	var allowSubmit = true;

	<!--@_formSubmitJS_@-->

	if (allowSubmit)
	{
		theForm.submitButton.value = 'Processing, please wait ...';
		theForm.submitButton.disabled = true;
		theForm.call.value = 'main';
		theForm.func.value = 'process';
		theForm.target = '_self';			
		theForm.submit();
	}
}
*/			
function abc(obj,count,fieldName) {
	var frm = document.frmInquiry;
	var txt;
	fieldName = fieldName.substring(0,fieldName.length-1);
	if(count!=3) {
		if(strTrim(obj.value).length == 3) {
			var cnt = (count- -1);
			txt = eval("frm."+ fieldName+cnt);
			txt.focus();
		} 
	}
}

function strTrim(str) {
	return str.replace(/^\s+/,'').replace(/\s+$/,'');
}

/*	function actionPA(obj)
{
	var frm = document.frmInquiry;
	frm.pAId.value = obj.value;
frm.pAIdActnField.value = obj.value;
	alert(obj.value);
	frm.submit();
}*/
function checkTest(obj,count) {
	var frm = document.frmInquiry;
	var val = obj.value;
	if(isNaN(val)){
		alert("Not a valid phone number");
		obj.value = "";
		obj.focus();
		return false;
	}
	if(count == 1) {
		if(val.charAt(0)==1) {
			alert("Please enter the three-digit area code without a '1' before it.");
			obj.value = "";
			obj.focus();
			return false;
		}
	} 
	if(count == 3) {
		if(strTrim(obj.value).length != 4) {
			alert("Please enter phone number correctly");
			obj.value = "";
			obj.focus();
			return false;
		}
	} else {
		if(strTrim(obj.value).length != 3) {
			alert("Please enter phone number correctly");
			obj.value = "";
			obj.focus();
			return false;
		}
	}
}


function checkTest_spanish(obj,count) {
	var frm = document.frmInquiry;
	var val = obj.value;
	if(isNaN(val)){
		alert("N\372mero de tel\351fono no es v\341lido");
		obj.value = "";
		obj.focus();
		return false;
	}
	if(count == 1) {
		if(val.charAt(0)==1) {
			alert("Por Favor entre los tres digitos del Prefijo Telef\363nico sin  el '1' antes de.");
			obj.value = "";
			obj.focus();
			return false;
		}
	} 
	if(count == 3) {
		if(strTrim(obj.value).length != 4) {
			alert("Por Favor entre el N\372mero de tel\351fono correctamente");
			obj.value = "";
			obj.focus();
			return false;
		}
	} else {
		if(strTrim(obj.value).length != 3) {
			alert("Por Favor entre el N\372mero de tel\351fono correctamente");
			obj.value = "";
			obj.focus();
			return false;
		}
	}
}