function onlyInteger(numero) { numero=numero.toString().replace(/[\D]/g,""); return numero; } function DoDots(numero) { numero=numero.toString().replace(/[^,\d]/g,""); if(numero[0]=="0") numero=numero.toString().replace(/0([0-9]+)/g,"0"); number_part = numero.split(","); /*for (i=number_part[0].length;i>0;i-=3) number_part[0]=number_part[0].substring(0,i)+"."+number_part[0].substr(i)*/ if(number_part[1]==undefined) return number_part[0].replace(/\.+$/,""); else { number_part[1] = number_part[1].substring(0,2); return number_part[0].replace(/\.+$/,"")+","+number_part[1]; } } function loadContent(url_s, div_s) { $.ajax({ url: url_s, type: 'GET', timeout: 5000, error: function(){ alert('Error loading XML document: '+url_s); }, success: function(msg){ $("#"+div_s).html(msg); funcLoad(); } }); } function funcLoad() { ; } function wait() { $("#waiting").css({position:"absolute", top:$(document).scrollTop()+"px", left:($(document).width()-130)+"px"}); $("#waiting").show(); } function getChangeValues(fieldRif, value, fieldChange, start, type, selectValue) { if(!selectValue) selectValue = ""; $.ajax({ url: "/getValuesSelect.php?type="+type+"&value="+value, type: 'GET', timeout: 1000, error: function(){ alert('Error loading XML document'+url); }, success: function(msg){ var fieldSelect = document.getElementById(fieldRif); var fieldSelectChange = document.getElementById(fieldChange); if(msg.indexOf('|' != -1)) { var update = msg.split('|'); //var formCampo = update[0].split('^'); var l=fieldSelectChange.length; for(var j=start; j' + typeof data + ''); if (typeof data == 'object' && data.nodeType) data = elementToString(data.documentElement, true); else if (typeof data == 'object') data = objToString(data); if(data=="_OK_") { //loadContent($(form).attr("action"), 'content'); window.location = $(form).attr("action"); } else if(data=="_CONTACT_") { loadContent("contact-OK.php", 'content'); } else { if(data.substr(0,7)=='_ERROR_') { $out.html(data.substr(7,data.length-14)); $('#SubmitPlsAct').attr("disabled",false); } else { $out.html('
'+ data +'
'); $('#SubmitPlsAct').attr("disabled",false); } } } }); } }); } function otherFile(id) { if(($("#file"+id).html()==null) && id<6) { var stradd = '
' + '
' + '' + '
(.pdf, .doc, .xls, .rtf, .jpg, .jpeg, .gif, .png, bmp)' + '
' + '
' + '
'; $("#fileAdd").append(stradd); $('.frmAct').validate(); } } $(document).ready(function(){ formUP(); jQuery('#mycarousel').jcarousel({ wrap: 'last', scroll: 3, visible: 3 }); //tb_init('a.thickbox');//pass where to apply thickbox var imgLoader = new Image();// preload image imgLoader.src = "../img/loading-thickbox.gif"; });