This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Source: http://www.portugal-a-programar.pt/topic/58852-algoritmo-de-validacao-de-nif-pt/ | |
*/ | |
function validaContribuinte(contribuinte){ | |
// algoritmo de validação do NIF de acordo com | |
// http://pt.wikipedia.org/wiki/N%C3%BAmero_de_identifica%C3%A7%C3%A3o_fiscal | |
var temErro=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sign(num) { | |
// IE does not support method sign here | |
if (typeof Math.sign === 'undefined') { | |
if (num > 0) { | |
return 1; | |
} | |
if (num < 0) { | |
return -1; | |
} | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="c_cookie_alert_div" style="color:red;background-color: rgba(216, 209, 209, 0.63);color: white;/* width: 100%; */margin: -8px 20%;/* padding: 9px; */font-size: small; cursor:default; text-align: center;font-family: tahoma, verdana;"> | |
By using our website you are accepting to store cookies information which help us to deliver you a better experience. You can clear this website cookies on your browser settings <span style="cursor:pointer;" onclick="c_cookie_alert_div_r()">[X]</span> | |
</div> | |
<script>function c_cookie_alert_div_r(){document.getElementById("c_cookie_alert_div").innerHTML="";}</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Miguel Queiroz - 2013 | |
// A call to the jQuery lib is required. | |
//Converts a img element into a gallery, transitioning between pictures when loaded. Based on a string src. | |
/// Like: $("#img_div").pic_slide("img1.jpg, img2.png, img3..."); | |
(function($){ | |
$.fn.pic_slide=function(src,path){ | |
return this.each(function(){ | |
var span_go=""; | |
if(src.split(",").length<2){ $(this).attr("src",""); $(this).attr("src",src).load(function(e){$(this).fadeTo(1200,1);}); return;} //case single item |