/* data modifica: 07/04/2011 funzioni: detect_duplicate_ids */ function detect_duplicate_ids(){ (function(){var ids=[];jQuery('*').each(function(){if(this.id&&this.id!==''){if(ids[this.id]){console.log('duplicate id found: '+this.id,this,ids[this.id])}else{ids[this.id]=this}}});})(); } /* data modifica: 26/03/2010 funzioni: checkForPaste */ function checkForPaste(event) { var e = event.element(); if ((e.previousValue && e.value.length > e.previousValue.length + 1) || (!e.previousValue && e.value.length > 1)) { if (e.onpaste) { e.onpaste(e) } else if (e.readAttribute("onpaste")) { eval(e.readAttribute("onpaste")); } } e.previousValue = e.value; } /* data modifica: 28/09/2011 funzioni: rcwd_generatepwd */ rcwd_generatepwd = function(length, special){ var iteration = 0; var password = ""; var randomNumber; if(special == undefined){ var special = false; } while(iteration < length){ randomNumber = (Math.floor((Math.random() * 100)) % 94) + 33; if(!special){ if ((randomNumber >=33) && (randomNumber <=47)) { continue; } if ((randomNumber >=58) && (randomNumber <=64)) { continue; } if ((randomNumber >=91) && (randomNumber <=96)) { continue; } if ((randomNumber >=123) && (randomNumber <=126)) { continue; } } iteration++; password += String.fromCharCode(randomNumber); } return password; } /* data modifica: 04/11/2009 funzioni: noCache */ function noCache(uri){return uri.concat(/\?/.test(uri)?"&":"?","noCache=",(new Date).getTime(),".",Math.random()*1234567)};