var messaggio="tasto destro disabilitato"; var finestrazoom=null; function aggiungiAiPreferiti() { var title = document.title; var url = document.location.href; if(window.sidebar){ /* Mozilla Firefox Bookmark */ alert("mozilla"); var elem = document.createElement('a'); elem.setAttribute('href',url); elem.setAttribute('title',title); elem.setAttribute('rel','sidebar'); elem.click(); }else if(window.external){ /* IE Favorite */ window.external.AddFavorite(url, title); }else if(window.opera && window.print) { /* Opera Hotlist */ alert("Press Control + D to bookmark"); return true; }else{ /* Other */ alert("Press Control + D to bookmark"); } } function solo_cifre_0_9(evento) { key = evento.keyCode ? evento.keyCode : evento.which ? evento.which : evento.charCode; if ( key==8 || key==9 || key==37 || key==38 || key==39 || key==40 || key==46 || (key >=48 && key <= 57) ) return true; else { alert ('Carattere non consentito. Sono permessi solo numeri'); return (false); } } function solo_float(evento) { key = evento.keyCode ? evento.keyCode : evento.which ? evento.which : evento.charCode; if ( key==8 || key==9 || key==37 || key==38 || key==39 || key==40 || key==44 || key==46 || (key >=48 && key <= 57) ) return true; else { alert ('Carattere non consentito. Sono permessi solo numeri'); return (false); } } function modificaProprioAnnuncio(idannuncio) { document.location.href=("?pag=modificaproprioannuncio&idannuncio="+idannuncio); } function mostraModuloRispondia() { //mostra("div_modulorispondi"); $('html, body').animate({ scrollTop: $("#finemodulo").offset().top }, 800); $("#div_modulorispondi").show(900) $('#rispondia_mittente_nome').focus(); //document.getElementById("rispondia_mittente_nome").focus(); } function checkClick(e) { if (document.all) { if (event.button==2||event.button==3) { alert(messaggio); return false; } } else if (document.layers||document.getElementById) { if (e.which == 3) { alert(messaggio); return false; } } } function cerca() { var url=""; zona=$("#zona").val(); provincia=$("#provincia").val(); cerca_categoria=$("#cerca_categoria").val(); cercatesto=$("#cercatesto").val(); cerca_parolechiave=$("#cerca_parolechiave").val(); url="https://www.annunciamiciziaincontri.com"; if(zona=="%") url=url+"/annunci-italia"; else url=url+"/annunci-"+zona; if(cerca_categoria!="%") url=url+"/"+encodeURIComponent(cerca_categoria); if(cercatesto=="si") url=url+"?cerca_parolechiave="+encodeURIComponent(cerca_parolechiave); // alert (url); window.location=url; } function orderby(orderby , orderversus) { var url=""; zona=$("#zona").val(); provincia=$("#provincia").val(); cerca_categoria=$("#cerca_categoria").val(); cercatesto=$("#cercatesto").val(); cerca_parolechiave=$("#cerca_parolechiave").val(); url="https://www.annunciamiciziaincontri.com"; if(zona=="%") url=url+"/annunci-italia"; else url=url+"/annunci-"+zona; if(cerca_categoria!="%") url=url+"/"+encodeURIComponent(cerca_categoria); if(cercatesto=="si") url=url+"?cerca_parolechiave="+encodeURIComponent(cerca_parolechiave); url=url+"&orderby="+orderby; url=url+"&orderversus="+orderversus; // alert (url); window.location=url; } function textCounter(field,counter,maxlimit,linecounter) { // text width// var fieldWidth = parseInt(field.offsetWidth); var charcnt = field.value.length; // trim the extra text if (charcnt > maxlimit) { field.value = field.value.substring(0, maxlimit); } else { // progress bar percentage var percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ; document.getElementById(counter).style.width = parseInt((fieldWidth*percentage)/100)+"px"; document.getElementById(counter).innerHTML=""+percentage+"%"; // color correction on style from CCFFF -> CC0000 setcolor(document.getElementById(counter),percentage,"background-color"); } } function limitaCaratteriTextarea (field,maxlimit) { // text width// var fieldWidth = parseInt(field.offsetWidth); var charcnt = field.value.length; // trim the extra text if (charcnt > maxlimit) { field.value = field.value.substring(0, maxlimit); } } function setcolor(obj,percentage,prop) { obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)"; } function visualizzaBarreProgresso(lunghezzamaxannuncio) { n=document.forms[0].elements.length; for (i=0;i 0) return; campo.style.color = '#ACA899'; campo.style.fontStyle = 'italic'; campo.value = "Cosa cerchi ?"; $("#cercatesto").val(""); } function trim(str) { return str.replace(/^\s+|\s+$/g,""); } function condividi_facebook() { width=630; height=440; LeftPosition = (screen.width) ? (screen.width-width)/2 : 0; TopPosition = (screen.height) ? (screen.height-height)/2 : 0; settings="width="+width+", height="+height+",top="+TopPosition+",left="+LeftPosition+", toolbar=0,status=0,"; u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'facebooksharer',settings);return false; }