window.addEvent('domready',function(){var alertbox=new SAlertBox();check=new FormCheck('frm_contacto',{display:{errorsLocation:1,indicateErrors:1,showErrors:2},alerts:{required:'Este campo es obligatorio',length_str:'El largo es incorrecto, debe tener entre %0 y %1 caracteres',alpha:'Este campo solo acepta caracteres alfabeticos',phone:'Ingrese un numero válido',email:'Ingrese un correo válido',select:'Seleccione una opción'},regexp:{alpha:/^[\D ._-]+$/i,phone:/\d{7,}/},submitByAjax:true,onAjaxRequest:function(){$('input_buttons').fade(0);},onAjaxSuccess:function(response){$('input_buttons').fade(1);var json=$H(JSON.decode(response,true));if(json.get('flag')){alertbox.alert(json.get('msg'),{onComplete:function(r){if(r){$('frm_contacto').reset();}}});}else{alertbox.error(json.get('msg'));}},onAjaxFailure:function(){alertbox.error('Ha sucedido un error inesperado, por favor intente mas tarde');}});});