function saveContact(pAction)
{
	var vError = false;
	var vFocus = "";

	var msgError = "Antes de continuar corrija los errores :\n\n"

	if(jQuery.trim($("#CONV_Name").val()) == ""){
		jsShowErrorInputMsg("CONV_Name");
		msgError += "- "+CNT_NoName+"\n";
		if(vFocus=="") vFocus = "CONV_Name";
		vError = true;
	}else{
		jsHideErrorInputMsg("CONV_Name");
		
		if(jQuery.trim($("#CONV_Name").val()).length < "2"){
			jsShowErrorInputMsg("CONV_Name");
			msgError += "- "+CNT_ErrorName+"\n";
			if(vFocus=="") vFocus = "CONV_Name";
			vError = true;
		}else{
			jsHideErrorInputMsg("CONV_Name");
		}
	}
	
	if(jQuery.trim($("#CONV_Lastname").val()) == ""){
		jsShowErrorInputMsg("CONV_Lastname");
		msgError += "- "+CNT_NoLastname+"\n";
		if(vFocus=="") vFocus = "CONV_Lastname";
		vError = true;
	}else{
		jsHideErrorInputMsg("CONV_Lastname");
		
		if(jQuery.trim($("#CONV_Lastname").val()).length < "2"){
			jsShowErrorInputMsg("CONV_Lastname");
			if(vFocus=="") vFocus = "CONV_Lastname";
			msgError += "- "+CNT_ErrorLastname+"\n";
			vError = true;
		}else{
			jsHideErrorInputMsg("CONV_Lastname");
		}
	}
	
	if(jQuery.trim($("#CONV_Email").val()) == ""){
		jsShowErrorInputMsg("CONV_Email");
		msgError += "- "+CNT_NoEmail+"\n";
		if(vFocus=="") vFocus = "CONV_Email";
		vError = true;
	}else{
		jsHideErrorInputMsg("CONV_Email");
		
		if(!isEmail(jQuery.trim($("#CONV_Email").val()))){
			jsShowErrorInputMsg("CONV_Email");
			msgError += "- "+CNT_ErrorEmail+"\n";
			if(vFocus=="") vFocus = "CONV_Email";
			vError = true;
		}else{
			jsHideErrorInputMsg("CONV_Email");
		}
		
	}
	
	if(jQuery.trim($("#CONT_Comment").val()) == ""){
		jsShowErrorInputMsg("CONT_Comment");
		msgError += "- "+CNT_NoMsg+"\n";
		if(vFocus=="") vFocus = "CONT_Comment";
		vError = true;
	}else{
		jsHideErrorInputMsg("CONT_Comment");
	}
	
	if(!vError){
		jsShowGoodMsg('Enviando Data...!');
		document.getElementById('general').action = pAction;
		document.getElementById('general').submit();
	}else{
		jsShowErrorMsg(msgError);
		document.getElementById(vFocus).focus();
	}

	/*if(trim(document.getElementById('CONV_Name').value)=='')
	{
		window.alert('Ingrese su Nombre');
		document.getElementById('CONV_Name').focus();
		return;
	}*/
	/*
	if (mOlnlyAlnumhyphen(document.getElementById('CONV_Name')))
	{
		window.alert('se permite solo caracteres A-Z,a-z,0-9,- y _');
		document.getElementById('CONV_Name').focus();
		return;
	}
	*/
	/*if(trim(document.getElementById('CONV_Lastname').value)=='')
	{
		window.alert('Ingrese su Apellido');
		document.getElementById('CONV_Lastname').focus();
		return;
	}*/
	/*
	if (mOlnlyAlnumhyphen(document.getElementById('CONV_Lastname')))
	{
		window.alert('se permite solo caracteres A-Z,a-z,0-9,- y _');
		document.getElementById('CONV_Lastname').focus();
		return;
	}
	*/
	/*if(trim(document.getElementById('CONV_Email').value)=='')
	{
		window.alert('Ingrese su E-mail');
		document.getElementById('CONV_Email').focus();
		return;
	}
	else
	{
		if(!checkEmail(trim(document.getElementById('CONV_Email').value)))
		{
			window.alert('Ingrese un E-mail valido');
			document.getElementById('CONV_Email').focus();
			return;
		}
	}*/
	
	/*if(document.getElementById('CONI_Area').selectedIndex==0)
	{
		window.alert('Ingrese su Area de Interes');
		document.getElementById('CONI_Area').focus();
		return;
	}*/

	/*if(trim(document.getElementById('CONT_Comment').value)=='')
	{
		window.alert('Ingrese su Mensaje');
		document.getElementById('CONT_Comment').focus();
		return;
	}

	document.getElementById('general').action = pAction;
	document.getElementById('general').submit();*/
}


function saveContactEn(pAction)
{
	if(trim(document.getElementById('CONV_Name').value)=='')
	{
		window.alert('Enter Name');
		document.getElementById('CONV_Name').focus();
		return;
	}
	/*
	if (mOlnlyAlnumhyphen(document.getElementById('CONV_Name')))
	{
		window.alert('haracters allowed are A-Z,a-z,0-9,- and _');
		document.getElementById('CONV_Name').focus();
		return;
	}
	*/
	if(trim(document.getElementById('CONV_Lastname').value)=='')
	{
		window.alert('Enter Lastname');
		document.getElementById('CONV_Lastname').focus();
		return;
	}
	/*
	if (mOlnlyAlnumhyphen(document.getElementById('CONV_Lastname')))
	{
		window.alert('haracters allowed are A-Z,a-z,0-9,- and _');
		document.getElementById('CONV_Lastname').focus();
		return;
	}
	*/
	if(trim(document.getElementById('CONV_Email').value)=='')
	{
		window.alert('Enter Email');
		document.getElementById('CONV_Email').focus();
		return;
	}
	else
	{
		if(!checkEmail(trim(document.getElementById('CONV_Email').value)))
		{
			window.alert('Incorrect Email');
			document.getElementById('CONV_Email').focus();
			return;
		}
	}
	
	if(trim(document.getElementById('CONT_Comment').value)=='')
	{
		window.alert('Enter Comment');
		document.getElementById('CONT_Comment').focus();
		return;
	}	

	document.getElementById('general').action = pAction;
	document.getElementById('general').submit();
}

function cleanContact()
{
	jsHideErrorMsg();

	document.getElementById('CONV_Name').value='';
	jsHideErrorInputMsg('CONV_Name')
	document.getElementById('CONV_Lastname').value='';
	jsHideErrorInputMsg('CONV_Lastname')
	document.getElementById('CONV_Email').value='';
	jsHideErrorInputMsg('CONV_Email')
	document.getElementById('CONI_Area').selectedIndex=0;
	document.getElementById('CONT_Comment').value='';
	jsHideErrorInputMsg('CONT_Comment')
	document.getElementById('CONV_Name').focus();
	
	document.forms[0].reset();
}
