function contar(texto,e,max) { if (texto.length > max ) { if (navigator.appName == "Netscape") tecla = e.which else tecla = e.keyCode if (tecla != 8) return false } return true } function confirmLink(theLink, text, theLocation) { var confirmMsg = 'Realmente desea '; if (confirmMsg == '' || typeof(window.opera) != 'undefined') { return true; } var is_confirmed = confirm(text); if (is_confirmed) { var myregexp = /void/; var match = myregexp.exec(theLink); if ( theLink == '' || match != null || typeof(theLink) == 'undefined' ) { setTimeout('document.location.href="'+theLocation+'"',0); } else { setTimeout('window.open("'+theLocation+'", "'+theLink+'");',0); } } return is_confirmed; } function confirmLinkAjax(theLink, text, theLocation) { var confirmMsg = 'Realmente desea '; if (confirmMsg == '' || typeof(window.opera) != 'undefined') { return true; } var is_confirmed = confirm(text); if (is_confirmed) { var jqxhr = $.get(theLocation).done(function(dataresult) { //console.log(dataresult); var jsonobj = jQuery.parseJSON(dataresult); if ( jsonobj.status == 'success' ) { alert('Contenido enviado con éxito a Facebook'); } else { alert('Se ha producido un error al enviar') } }); } return is_confirmed; } function checkform(form) { var elements = form.elements; for(i=0; i