		// VALIDACION
		function checkInput(inputName){
			if (document.getElementById(inputName).value == '')
			{	
				document.getElementById(inputName).style.backgroundColor = "#F3F3F3";
				return 1;
			}else{
				document.getElementById(inputName).style.backgroundColor = "#FFFFFF";
				return 0;
			}
		}

		function isEmailAddress(inputName)
		{
			var s = document.getElementById(inputName).value;
			var filter=/^[A-Za-z][A-Za-z0-9_.]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
			if (s.length != 0 ){
				if (filter.test(s)){
					return 0;
				}else{
					document.getElementById(inputName).style.backgroundColor = "#F3F3F3";
					return 1;
				}
			return 1;
			}
		}

		function inputCompare(inputName1,inputName2)
		{
			var s1 = document.getElementById(inputName1);
			var s2 = document.getElementById(inputName2);
			if (s1.value == s2.value){
				return 0;
			}else{
				s1.style.backgroundColor = "#F3F3F3";
				s2.style.backgroundColor = "#F3F3F3";
				return 1;
			}
		}

		function checkInputRadio(inputName){
		  var s = 0;
		  for ( var i = 0; i < document.frmSign.Amount.length; i++ ) {
		    if ( document.frmSign.Amount[i].checked ) {
		    	s = 1;
		    }
		  }
		  if ( s == 0 ){
		  	return 1;
		  }else{
		  	return 0;
		  }
		}		
		function checkInputAgree(inputName){
			if (document.frmSign.checkbox1.checked == false)	{
				return 1;
			}else{
				return 0;
			}
		}
		
		//VALIDACION CUSTOMERS
		function checkform(){
		
			var errorMsj = '';
			var vOk = 0;
			var vOk2 = 0;
			

			vOk += checkInput('nombre');
		  if(vOk > vOk2) {
		  	errorMsj += '- Por favor, ingrese su nombre\n';
		  	vOk2 = vOk;
			}
			vOk += checkInput('empresa');
		  if(vOk > vOk2) {
		  	errorMsj += '- Por favor, ingrese la empresa.\n';
		  	vOk2 = vOk;
			}
			vOk += checkInput('pais');
		  if(vOk > vOk2) {
		  	errorMsj += '- Por favor, ingrese el país.\n';
		  	vOk2 = vOk;
			}
			vOk += checkInput('telefono');
		  if(vOk > vOk2) {
		  	errorMsj += '- Por favor, ingrese su teléfono.\n';
		  	vOk2 = vOk;
			}
			vOk += checkInput('email');
		  if(vOk > vOk2) {
		  	errorMsj += '- Por favor, ingrese su email.\n';
		  	vOk2 = vOk;
			}else{
				vOk += isEmailAddress('email');
			  if(vOk > vOk2) {
			  	errorMsj += '- Por favor, ingrese una direccion de email valida.\n';
			  	vOk2 = vOk;
				}
			}
	
			if (vOk == 0) {	
				document.formcontacto.submit();
			}else{
				if(errorMsj) alert(errorMsj);				
			}
		
		}
