1var szNavigator=navigator.userAgent; 2var _isIE=szNavigator.indexOf('MSIE')!=-1; 3var _isIE5=szNavigator.indexOf('MSIE 5.')!=-1; 4var _isIE6=szNavigator.indexOf('MSIE 6.')!=-1; 5var _isIE7=szNavigator.indexOf('MSIE 7.')!=-1; 6var _isIE8=szNavigator.indexOf('MSIE 8.')!=-1; 7var _isFirefox=szNavigator.indexOf('Firefox')!=-1; 8var _isCamino=szNavigator.indexOf('Camino')!=-1; 9var _isSafari=szNavigator.indexOf('Safari')!=-1; 10var _isOpera=szNavigator.indexOf('Opera')!=-1; 11var _isChrome=szNavigator.indexOf('Chrome')!=-1; 12var szDomainList="|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|shop|tel|travel|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|g|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw|"; 13function _gel(sz){ 14 return document.getElementById(sz); 15} 16function _cel(sz){ 17 return document.createElement(sz); 18} 19function sMSG(szIt,szEn){ 20 this.it=szIt; 21 this.en=szEn; 22} 23function alerta(sz){ 24 sz="<div class=\"dAlrt\"><img src=\""+szImgCmsPath+"alert.png\" alt=\""+gestMSG("alrt")+"\" title=\""+gestMSG("alrt")+"\" class=\"imgAlrt\" /><div class=\"msgAlrt\"><div class=\"msgAlrtA\">"+gestMSG("alrt")+"</div><div class=\"msgAlrtB\">"+sz+"</div><div class=\"msgAlrtBtt\"><a href=\"javascript:clAlrt();\" class=\"bttAlrtV\">OK</a></div></div></div>"; 25 window.top.opAlrt(sz); 26} 27function confirm(sz,fn,args,b){ 28 window.top.cnfrmFn=fn; 29 window.top.cnfrmArgs=args; 30 window.top.cnfrmB=b; 31 sz="<div class=\"dAlrt\"><img src=\""+szImgCmsPath+"alert.png\" alt=\""+gestMSG("alrt")+"\" title=\""+gestMSG("alrt")+"\" class=\"imgAlrt\" /><div class=\"msgAlrt\"><div class=\"msgAlrtA\">"+gestMSG("alrt")+"</div><div class=\"msgAlrtB\">"+sz+"</div><div class=\"msgAlrtBtt\"><a href=\"javascript:clCnfrm(false);\" class=\"bttAlrtV\">"+gestMSG("annCncl")+"</a><a href=\"javascript:clCnfrm(true);\" class=\"bttAlrtR\">OK</a></div></div></div>"; 32 window.top.opAlrt(sz); 33} 34function clCnfrm(b){ 35 clAlrt(); 36 if(window.top.cnfrmB) cnfrmFn(window.top.cnfrmArgs,b); 37 else if(b) cnfrmFn(window.top.cnfrmArgs); 38} 39function clAlrt(){ 40 clOsc(); 41 document.body.removeChild(_gel("alert")); 42} 43function opAlrt(sz){ 44 opOsc(function(){}); 45 var obj=_cel("div"); 46 obj.id="alert"; 47 obj.innerHTML=sz; 48 document.body.appendChild(obj); 49 cntrObj(obj,obj.offsetWidth,obj.offsetHeight); 50} 51arMSG=new Array(); 52arMSG["boh"]= new sMSG("",""); 53arMSG["img"]=new sMSG("Immagine","Image"); 54arMSG["OC"]=new sMSG("Apri/chiudi","Open/close"); 55arMSG["chgImg"]=new sMSG("Cambia immagine","Change image"); 56arMSG["delImg"]=new sMSG("Cancella immagine","Delete image"); 57arMSG["url"]=new sMSG("Indirizzo web","Web address"); 58arMSG["aFoto"]= new sMSG("Aggiungi foto","Add photo"); 59arMSG["fErr"]= new sMSG("Compilare il form correttamente","Fill the form correctly"); 60arMSG["fMail"]= new sMSG("Inserire un campo di tipo Email","Add one Email-type field"); 61arMSG["close"]= new sMSG("Chiudi","Close"); 62arMSG["nmSez"]= new sMSG("Sezione","Section"); 63arMSG["nmCat"]= new sMSG("Categoria","Category"); 64arMSG["dRec"]= new sMSG("Sei sicuro di voler eliminare questo record?","Do you really want to delete this record?"); 65arMSG["dSez"]= new sMSG("Sei sicuro di voler eliminare questa sezione?","Do you really want to delete this section?"); 66arMSG["loElim"]= new sMSG("Elimina","Remove"); 67arMSG["loRipr"]= new sMSG("Ripristina","Restore"); 68arMSG["loAdd"]= new sMSG("Aggiungi modulo","Add module"); 69arMSG["loMm"]= new sMSG("Inserire il modulo menu","Add menu module"); 70arMSG["loNoCnfg"]= new sMSG("Sezione non ancora configurata","Section not configured yet"); 71arMSG["mMenu"]= new sMSG("Menu","Menu"); 72arMSG["mMLst"]= new sMSG("Newsletter","Newsletter"); 73arMSG["mBann"]= new sMSG("Banner","Banner"); 74arMSG["mRic"]= new sMSG("Ricerca nel sito","Search site"); 75arMSG["mRim"]= new sMSG("Ricerca immobili","Real estate search"); 76arMSG["mNews"]= new sMSG("News","News"); 77arMSG["mMtop"]= new sMSG("Menu alto","Top menu"); 78arMSG["mMbtm"]= new sMSG("Menu basso","Bottom menu"); 79arMSG["mLang"]=new sMSG("Modulo lingue","Languages module"); 80arMSG["mGmap"]=new sMSG("Modulo Google maps","Google maps module"); 81arMSG["mPriv"]=new sMSG("Modulo privacy","Privacy module"); 82arMSG["mSond"]=new sMSG("Modulo sondaggio","Poll module");
83arMSG["mCat"]=new sMSG("Modulo categorie","Categories module"); 84arMSG["dFlash"]=new sMSG("Cancella filmato","Delete movie"); 85arMSG["cFlash"]=new sMSG("Cambia filmato","Change movie"); 86arMSG["flash"]=new sMSG("Filmato Flash","Flash movie"); 87arMSG["dim"]=new sMSG("Dimensioni","Dimensions"); 88arMSG["tBann"]= new sMSG("Tipo di banner","Banner type"); 89arMSG["ins"]=new sMSG("Inserisci","Insert"); 90arMSG["onw"]=new sMSG("L'indirizzo verra' aperto in una nuova finestra","Address will be opened in a new window"); 91arMSG["aRisp"]=new sMSG("Aggiungi risposta","Add answer"); 92arMSG["risp"]=new sMSG("Risposta","Answer"); 93arMSG["dom"]=new sMSG("Domanda","Question"); 94arMSG["annCncl"]=new sMSG("Annulla","Cancel"); 95arMSG["grphClr"]=new sMSG("Colore del grafico","Graph color"); 96 97arMSG["aSez"]= new sMSG("Aggiungi sezione","Add section"); 98arMSG["aCat"]= new sMSG("Aggiungi categoria","Add category"); 99arMSG["aBan"]= new sMSG("Aggiungi banner","Add banner"); 100arMSG["aCmp"]= new sMSG("Aggiungi campo","Add input field"); 101arMSG["szNm"]= new sMSG("Nome sezione","Section name"); 102arMSG["szDoc"]=new sMSG("Tipo sezione","Section type"); 103arMSG["save"]= new sMSG("Salva","Save"); 104arMSG["2lang"]=new sMSG("Seconda lingua","2nd language"); 105arMSG["sel"]=new sMSG(" --- Seleziona --- "," --- Select --- "); 106arMSG["noAct"]=new sMSG("Operazione non permessa","Action not permitted"); 107arMSG["setAllNoSz"]= new sMSG("Imposta tutte le sezioni NON ANCORA CONFIGURATE come la homepage","Set all NOT YET CONFIGURED sections like homepage"); 108arMSG["setAllSz"]= new sMSG("Imposta TUTTE LE SEZIONI come la homepage","Set ALL SECTIONS like homepage"); 109arMSG["szNotConf"]= new sMSG("Sezione non configurata","Section not configured"); 110arMSG["insBan"]=new sMSG("Scegliere un'immagine","Choose an image"); 111arMSG["insLnk"]=new sMSG("Inserire il collegamento","Insert a link"); 112arMSG["catPrnt"]=new sMSG("Categoria padre","Parent category"); 113arMSG["catOrdr"]=new sMSG("Ordine","Order"); 114arMSG["sicuro"]=new sMSG("Sei sicuro dell'eliminazione?","Are you sure?"); 115//arMSG["nmCat"]=new sMSG("Nome categoria","Category name"); 116//arMSG["nmSez"]=new sMSG("Nome sezione","Section name"); 117arMSG["sezObblI"]=new sMSG("La sezione ",""); 118arMSG["sezObblF"]=new sMSG(" e' obbligatoria"," is mandatory"); 119arMSG["home"]=new sMSG("La sezione homepage non รจ stata definita","Homepage section hasnot been defined"); 120arMSG["alrt"]=new sMSG("Attenzione!","Alert!"); 121arMSG["sggBrws"]=new sMSG("Suggeriamo di utilizzare<br />il browser <a href=\"http://www.mozilla.org/firefox/\" target=\"_blank\" >Mozilla Firefox</a><br />o <a href=\"http://www.google.com/chrome/\" target=\"_blank\" >Google Chrome</a>","We suggest the use<br />of <a href=\"http://www.mozilla.org/firefox/\" target=\"_blank\" >Mozilla Firefox</a><br />or <a href=\"http://www.google.com/chrome/\" target=\"_blank\" >Google Chrome</a> browser"); 122arMSG["noBrws"]=new sMSG("Il tuo browser è obsoleto.","Your browser is obsolete."); 123arMSG["altBrws"]=new sMSG("Se preferisci puoi usare: ","You can also use: "); 124 125arMSG["noCat"]=new sMSG("Nessuna categoria","No category"); 126arMSG["noCntLnk"]=new sMSG("Nessun contenuto per questa sezione e categoria","No contenti in this section and category"); 127 128arMSG["cmpTxt"]=new sMSG("testo","text"); 129arMSG["cmpArea"]=new sMSG("area di testo","text area"); 130arMSG["cmpNm"]=new sMSG("Nome campo","Input field name"); 131arMSG["cmpTipo"]=new sMSG("Tipo del campo","Input field type"); 132arMSG["cmpObb"]=new sMSG("Campo obbligatorio","Compulsory field"); 133arMSG["insCmp"]=new sMSG("Inserire almeno un campo","Insert one field at least"); 134 135arMSG["docArt"]=new sMSG("Articoli","Articles"); 136arMSG["docCont"]=new sMSG("Contatti","Contacts"); 137arMSG["docFgall"]=new sMSG("Galleria foto","Photo gallery"); 138arMSG["docHome"]=new sMSG("Homepage","Homepage"); 139arMSG["docLnk"]=new sMSG("Links","Links"); 140arMSG["docVideo"]=new sMSG("Galleria video","Video gallery"); 141arMSG["docEvnt"]=new sMSG("Eventi","Events"); 142arMSG["docProd"]=new sMSG("Prodotti","Products"); 143arMSG["docImm"]=new sMSG("Immobili","Real estates"); 144arMSG["docMod"]=new sMSG("Modulo","Form"); 145 146arMSG["gstCntCC"]=new sMSG("Impaginazione contenuti colonna centrale","Central column content layout"); 147arMSG["cntLnkClk"]=new sMSG("Seleziona il contenuto:","Select content:"); 148arMSG["aCntLnk"]=new sMSG("Aggiungi contenuto","Add content"); 149 150arMSG["aFoto"]=new sMSG("Aggiungi foto","Add photo"); 151arMSG["aFile"]=new sMSG("Aggiungi file","Add file"); 152arMSG["aTube"]=new sMSG("Aggiungi filmato","Add clip"); 153arMSG["aCmp"]=new sMSG("Aggiungi campo","Add field"); 154arMSG["aRis"]=new sMSG("Accesso riservato","Restricted access"); 155 156arMSG["noRes"]=new sMSG("La ricerca non ha prodotto risultati","No results"); 157 158arMSG["elOpz"]=new sMSG("Elenco opzioni","Options list"); 159arMSG["opt"]=new sMSG("Opzione","Option"); 160arMSG["aOpt"]=new sMSG("Aggiungi opzione","Add option"); 161 162arMSG["chgDoc"]=new sMSG("Cambiando il tipo di sezione verranno cancellati tutti i dati della sezione.\nContinuare?","Changing section type will be deleted all inserted data.\nContinue?"); 163arMSG["docNoCat"]=new sMSG("Questo tipo di documento non puo' avere sottocategorie","This document type cannot have categories"); 164 165//HELP 166arMSG["cnf_sw"]=new sMSG("In questa sezione configurare le impostazioni generali del software.<br /><ul><li>Modifica della password di accesso;</li><li>Impostazione delle visualizzazioni delle date, delle valute e della lingua del gestionale;</li><li>Scelta della prima (e seconda lingua, opzionale) del sito;</li><li>Modello di impaginazione (solo se non sono già state impostate delle sezioni;</li><li>Modello di aspetto grafico.</li></ul>","Not available"); 167arMSG["cnf_web"]=new sMSG("In questa sezione vengono richieste informazioni sul sito.<br /><ul><li>Dominio;</li><li>Nome;</li><li>Breve descrizione dei contenuti del sito;</li><li>Parole chiave (elenco di parole separate da virgole).</li></ul>Tutte queste informazioni hanno grande utilità per l'indicizzazione sui motori di ricerca, compilare con cura.","Not available"); 168arMSG["cnf_sz"]=new sMSG("Impostare qui quelle che saranno le sezioni (aree) del sito.<br /><br />Per ogni sezione indicare:<ul><li>Nome;</li><li>Presenza della sezioni nei menù disponibili;</li><li>Il tipo, a seconda del suo contenuto;</li><li>Ordine di comparsa nei menù.</li></ul>","Not available"); 169arMSG["cnf_cat"]=new sMSG("Impostare qui, per ogni sezione del sito, le eventuali sottosezioni.<br /><br />Per ogni categoria (sottosezione) indicare:<ul><li>Nome;</li><li>Categoria padre, se la categoria fa parte di un'altra già definita;</li><li>Ordine di comparsa nei menù.</li></ul>","Not available"); 170arMSG["cnf_lo"]=new sMSG("Impaginazione delle sezioni del sito.<br /><br />Per ogni sezione potete scegliere se:<ul><li>Visualizzare o nascondere le aree di impaginazione;</li><li>Aggiungere o eliminare moduli di contenuti;</li><li>Scegliere quali colonne visualizzare e la loro larghezza.</li></ul>","Not available"); 171arMSG["cnf_lo_as"]=new sMSG("Impostazioni grafiche generali del sito.","Not available");
172arMSG["cnf_lo_cat"]=new sMSG("Impostazioni grafiche delle categorie del sito.","Not available"); 173arMSG["cnf_lo_hf"]=new sMSG("Impostazioni grafiche e contenuti della testata e del piè di pagina del sito.","Not available"); 174arMSG["cnf_lo_mm"]=new sMSG("Impostazioni grafiche dei menù del sito.","Not available"); 175arMSG["cnf_lo_cc"]=new sMSG("Impostazioni grafiche delle colonne del sito.","Not available"); 176arMSG["cnf_lo_cc"]=new sMSG("Impostazioni grafiche delle colonne del sito.","Not available"); 177arMSG["cnf_lo_fn"]=new sMSG("Impostazioni grafiche e contenuto dell'area delle note di fondo del sito.","Not available"); 178arMSG["cnf_lo_mod"]=new sMSG("Impostazioni grafiche dei moduli del sito e dei loro titoli.","Not available"); 179arMSG["cnf_lo_cmp"]=new sMSG("Impostazioni grafiche dei campi dei moduli. Queste modifiche influiranno sul modulo della sezione tipo \"contatti\", sul modulo newsletter e sul modulo ricerca nel sito.","Not available"); 180arMSG["cnf_lo_nwl"]=new sMSG("Impostazioni grafiche di tutte le E-mail inviate attraverso il sito.","Not available"); 181arMSG["cnf_lo_oth"]=new sMSG("Impostazioni grafiche degli elementi di servizio del sito.","Not available"); 182arMSG["cnt_cntt"]=new sMSG("Impostazioni della sezione tipo \"contatti\".<br /><ul><li>Attraverso voce \"Google Maps\" è possibile inserire nel sito una mappa creata con l'apposito strumento di Google.<br />Se non si è specificata la colonna di inserimento attraverso il \"modulo Google Maps\" nella pagina \"Impaginazione\" verrà posizionata nella colonna principale; è possibile creare un modulo per la richiesta di informazioni<br />Per ogni campo indicare il nome, il tipo e se è obbligatoria la sua compilazione;</li><li>Alla voce \"Messaggio dopo l'invio del modulo\" indicare il messaggio che verrà visualizzato dopo che un utente ha inviato il modulo di richiesta informazioni;</li><li>Alla voce \"Testo email\" indicare il messaggio che verrà inviato nella E-mail all'utente che ha inviato il modulo di richiesta informazioni.</li></ul>","Not available"); 183 184 185 186 187var lang,cmsLang,cmsDec,cmsDate; 188 189function gestMSG(index){ 190 if(!arMSG[index].it) alert(index); 191 return (cmsLang==0) ? arMSG[index].it : arMSG[index].en; 192} 193var arMenu=new Array(); 194arMenu.push(new Array(6,new Array("Alto","Top"))); 195arMenu.push(new Array(1,new Array("Principale","Main"))); 196arMenu.push(new Array(7,new Array("Basso","Bottom"))); 197function sDoc(idSez,szNm,szCode,iVarianti,bCategorie,bObbl,iNMax,iNUsd,szTab){ 198 this.idSez=idSez;//idTipoDoc 199 this.szNm=szNm; 200 this.szCode=szCode; 201 this.iVarianti=iVarianti; 202 this.bCategorie=bCategorie; 203 this.bObbl=bObbl; 204 this.iNMax=iNMax; 205 this.iNUsd=iNUsd; 206 this.szTab=szTab; 207} 208//idTipoDoc, nomeDoc, codDoc, numVarianti, haCategorie?,obbligatorio,numMax,used,accRes 209var arTDoc=new Array(); 210arTDoc.push(new sDoc("1",gestMSG("docArt"),"art",3,1,0,99,0,'tblArticoli',1)); 211arTDoc.push(new sDoc("2",gestMSG("docFgall"),"ftg",2,1,0,99,0,'tblFgall',1)); 212arTDoc.push(new sDoc("3",gestMSG("docLnk"),"lnk",2,1,0,99,0,'tblLink',1)); 213arTDoc.push(new sDoc("4",gestMSG("docCont"),"ctt",1,0,0,1,0,'tblContatti',0)); 214arTDoc.push(new sDoc("5",gestMSG("docHome"),"prs",1,0,1,1,0,'tblHome',0)); 215arTDoc.push(new sDoc("6","Banner","bnn",0,0,0,0,0,'tblBanner',0)); 216arTDoc.push(new sDoc("7","Mailing list","mlt",0,0,0,0,0,'tblMlist',0)); 217arTDoc.push(new sDoc("8","Newsletter","nwl",0,0,0,0,0,'tblNewsletter',0)); 218arTDoc.push(new sDoc("9","Config","cnf",0,0,0,0,0,false,0)); 219arTDoc.push(new sDoc("10","News","nws",0,0,0,0,'tblNews',0)); 220arTDoc.push(new sDoc("11","Aspetto Newsletter","nl",0,0,0,0,'tblNwl',0)); 221arTDoc.push(new sDoc("12",gestMSG("docVideo"),"vdo",1,1,0,99,0,'tblVideo',1)); 222arTDoc.push(new sDoc("13",gestMSG("docEvnt"),"evn",1,1,0,99,0,'tblEvents',1)); 223arTDoc.push(new sDoc("14",gestMSG("docProd"),"prd",1,1,0,99,0,'tblProdotti',1)); 224arTDoc.push(new sDoc("15",gestMSG("docImm"),"imm",1,1,0,99,0,'tblImm',1)); 225arTDoc.push(new sDoc("16",gestMSG("docMod"),"mdl",1,0,0,99,0,'tblMod',1)); 226 227function arGetKey(ar,indexNm,szValue){ 228 for(var i=0;i<ar.length;i++){ if(ar[i][indexNm]==szValue) return i;} 229 return false;
230} 231/* 232function arGetKey2(ar,indexNm1,indexNm2,szValue1,szValue2){ 233 for(var i=0;i<ar.length;i++){ if(ar[i][indexNm1]==szValue1 && ar[i][indexNm2]==szValue2) return i;} 234 return false; 235} 236*/ 237function arRemElem(ar,szValue){ 238 for(var i=0;i<ar.length;i++) if(ar[i]==szValue){ar.splice(i,1);break;} 239} 240function ppString(ar,szSep){ 241 if(!szSep) szSep="|"; 242 return szSep+ar.join(szSep)+szSep; 243} 244function ppArr(sz,szSep){ 245 if(!szSep) szSep="|"; 246 var sz=sz.slice(1,-1); 247 return sz.split(szSep); 248} 249//trim function - rimuove gli spazi bianchi all'inizio e alla fine di una stringa 250function trimAll(szStr){ 251 return szStr.replace(/^\s+|\s+$/g,''); 252} 253function ppSrch(szPp,szSearch){ 254 if(szPp.indexOf("|"+szSearch+"|")==-1) return false; 255 return true; 256} 257function objRollOver(obj){ 258 if(!obj) return; 259 if(obj.className.indexOf("Hvr")==-1) obj.className+="Hvr"; else obj.className=obj.className.slice(0,-3); 260} 261function imgRollOver(obj){ 262 if(!obj) return; 263 var id=obj.id; 264 if(obj.src.indexOf(id+"Hvr")==-1) obj.src=obj.src.replace(id,id+"Hvr"); else obj.src=obj.src.replace(id+"Hvr",id); 265} 266/* 267function objPos(obj){ 268 if(!obj) return; 269 var x=0; 270 var y=0; 271 if(obj.offsetParent){ 272 while(1){ 273 x+=obj.offsetLeft; 274 y+=obj.offsetTop; 275 if(!obj.offsetParent) break; 276 obj=obj.offsetParent; 277 } 278 }else if(obj.x){ 279 x+=obj.x; 280 y+=obj.y; 281 } 282 return new Array(x,y); 283} 284*/ 285 286function objPos(obj){ 287 if(!obj) return; 288 var x=0; 289 var y=0; 290 while(obj.offsetParent){ 291 x+=obj.offsetLeft; 292 y+=obj.offsetTop; 293 obj=obj.offsetParent; 294 } 295 return new Array(x,y); 296} 297function objPosPage(obj,newObjW,newObjH){ 298 var areaDisp=areaDoc(); 299 var areaScroll=scrollDoc(); 300 var objPosiz=objPos(obj); 301 var newObjPosX=objPosiz[0]+obj.offsetWidth+2; 302 var newObjPosY=objPosiz[1]; 303 if(newObjW>areaDisp[0]+areaScroll[0]-newObjPosX) newObjPosX=objPosiz[0]-newObjW-2; 304 if(newObjH>areaDisp[1]+areaScroll[1]-newObjPosY) newObjPosY=newObjPosY-(newObjH-((areaDisp[1]+areaScroll[1])-newObjPosY)); 305 if(newObjW>areaDisp[0]-areaScroll[0]-objPosiz[0]) newObjPosX=newObjPosX-(newObjW-((areaDisp[0]+areaScroll[0])-newObjPosX)); 306 return new Array(newObjPosX,newObjPosY); 307} 308function objHasChild(obj,regEx,szChildNm){ 309 for(var i=0;i<obj.childNodes.length;i++) if(regEx.test(obj.childNodes[i].id)){ return true; break;} 310 return false; 311} 312function rmvChildNodes(idObj){ 313 var obj=_gel(idObj); 314 while(obj.childNodes.length>0) obj.removeChild(obj.firstChild); 315} 316/* 317function objNxt(obj){ 318 var objPrnt=obj.parentNode; 319 for(var i=0;i<objPrnt.childNodes.length;i++) if(objPrnt.childNodes[i]==obj && objPrnt.childNodes[i+1]) return objPrnt.childNodes[i+1]; 320 return false; 321} 322*/ 323function objNxt(obj){ 324 var obj=obj.nextSibling; 325 if(!obj) return false; 326 if(obj.nodeType!=1) objNxt(obj); 327 else return obj; 328} 329 330function objPrv(obj){ 331 var obj=obj.previousSibling; 332 if(!obj) return false; 333 if(obj.nodeType!=1) objPrv(obj); 334 else return obj; 335} 336function popolaCmb(objCmb,arOpt,optSel,bSel){ 337 if(bSel){ 338 var objOpt=_cel('option'); 339 objOpt.text=gestMSG("sel"); 340 objOpt.value=""; 341 try{ objCmb.add(objOpt,null);} // standards compliant 342 catch(ex){ objCmb.add(objOpt);} // IE only 343 } 344 for(var i=0;i<arOpt.length;i++){ 345 var objOpt=_cel('option'); 346 //objOpt.text=(!scndLang)?arOpt[i][1]:arOpt[i][2]; 347 objOpt.text=arOpt[i][1]; 348 objOpt.value=arOpt[i][0]; 349 if(parseInt(arOpt[i][0])==optSel) objOpt.selected="selected"; 350 try{ objCmb.add(objOpt,null);} // standards compliant 351 catch(ex){ objCmb.add(objOpt);} // IE only 352 } 353 stCmbSel(objCmb); 354 return objCmb; 355} 356function ripopolaCmb(idObj,arOpt,optSel,bSel){ 357 var objCmb=_gel(idObj); 358 if(!objCmb) return; 359 rmvChildNodes(idObj); 360 return popolaCmb(objCmb,arOpt,optSel,bSel); 361} 362function creaCmb(idPrnt,idObj,arOpt,optSel,bSel,szFunc){ 363 var objPrnt=_gel(idPrnt); 364 if(!objPrnt) return; 365 var objSpan=_cel("span"); 366 objSpan.id="slct_"+idObj; 367 objSpan.className="slct"; 368 objPrnt.appendChild(objSpan); 369 var objCmb=_cel("select"); 370 objCmb.name=objCmb.id=idObj; 371 objCmb.className="inpCmb"; 372 if(szFunc) addEvent(objCmb,'change',szFunc,false); 373 objPrnt.appendChild(objCmb); 374 return popolaCmb(objCmb,arOpt,optSel,bSel); 375} 376function disCmb(idCmb){ 377 _gel(idCmb).disabled=true; 378 _gel("slct_"+idCmb).className="slctDis"; 379} 380function enCmb(idCmb){ 381 _gel(idCmb).disabled=false; 382 _gel("slct_"+idCmb).className="slct"; 383} 384function stCmbSel(obj){ 385 if(!obj.id) obj=getElem(obj); 386 if(!obj) return; 387 if(obj.selectedIndex>=0) _gel("slct_"+obj.id).innerHTML=obj.options[obj.selectedIndex].text; 388} 389 390function crChk(idPrnt,idObj,bSel,szFunc){ 391 var objPrnt=_gel(idPrnt); 392 if(!objPrnt) return; 393 var objSpan=_cel("span"); 394 objSpan.id="chckbx_"+idObj;
395 objSpan.className="chckbx"; 396 objPrnt.appendChild(objSpan); 397 var objCmb=_cel("input"); 398 objCmb.type="checkbox"; 399 objCmb.name=objCmb.id=idObj; 400 objCmb.className="dIC"; 401 if(szFunc) addEvent(objCmb,'change',szFunc,false); 402 objPrnt.appendChild(objCmb); 403 //return popolaCmb(objCmb,arOpt,optSel,bSel); 404 //<div class="dIC"><input class="cbx" id="chck_txtCampi_0" name="chck_txtCampi_0" value="1" onclick="stChkSel(this);" type="checkbox"><span class="chckbx" id="chck_chck_txtCampi_0"></span></div> 405} 406 407function stChkSel(obj,b){ 408 if(b) obj.checked=(obj.checked)?false:true; 409 var obj=_gel("chck_"+obj.id); 410 if(obj.className.indexOf("Sel")==-1) obj.className+="Sel"; else obj.className=obj.className.slice(0,-3); 411} 412function stRdoSel(obj){ 413 var szId=obj.id.slice(0,-1); 414 var objFrm=_gel("f"); 415 for(var i=0;i<objFrm.length;i++){ 416 if(objFrm.elements[i].id.indexOf(szId)>-1){ 417 for(var j=0;j<10;j++){ 418 var objRdo=_gel("rdo_"+szId+j); 419 if(objRdo) if(objRdo.className.indexOf("Sel")!=-1) objRdo.className=objRdo.className.slice(0,-3); 420 } 421 } 422 } 423 var obj=_gel("rdo_"+obj.id); 424 if(obj.className.indexOf("Sel")==-1) obj.className+="Sel"; else obj.className=obj.className.slice(0,-3); 425} 426 427function areaDoc(){ 428 return ar=new Array(document.documentElement.clientWidth,document.documentElement.clientHeight); 429} 430function scrollDoc(){ 431 return ar=new Array(document.documentElement.scrollLeft,document.documentElement.scrollTop); 432} 433var expdate = new Date(); expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); 434/* 435function getCookieVal(offset){ 436 var endstr=document.cookie.indexOf(";",offset); 437 if(endstr==-1) endstr=document.cookie.length; 438 return unescape(document.cookie.substring(offset,endstr)); 439} 440function getCookie(name){ 441 var arg=name+"="; 442 var alen=arg.length; 443 var clen=document.cookie.length; 444 var i=0; 445 while(i<clen){ 446 var j=i+alen; 447 if(document.cookie.substring(i,j)==arg) return getCookieVal(j); 448 i=document.cookie.indexOf(" ",i)+1; 449 if(i==0)break; 450 } 451 return null; 452} 453function setCookie(name,value){ 454 var argv=setCookie.arguments; 455 var argc=setCookie.arguments.length; 456 var expires=(2<argc) ? parseInt(argv[2]):null; 457 var path=(3<argc) ? argv[3]:null; 458 var domain=(4<argc) ? argv[4]:null; 459 var secure=(5<argc) ? argv[5]:false; 460 461 if(!expires) expires=1000*60*60*24; 462 463 //var today=new Date(); 464 //expires=new Date(today.getTime()+nDays*1000*60*60*24);//1000 giorni 465 466 alert(name+"___"+value+"___"+escape(value)); 467 document.cookie=name+"="+escape(value)+ 468 ((expires==null) ? "" : ("; expires="+expires.toString()))+ 469 ((path==null) ? "" : ("; path="+path))+ 470 ((domain==null) ? "" : ("; domain="+domain))+ 471 ((secure==true) ? "; secure" : ""); 472} 473*/ 474function setCookie(name,value){ 475 var argv=setCookie.arguments; 476 var argc=setCookie.arguments.length; 477 var nHours=(2<argc) ? parseInt(argv[2]):null; 478 var path=(3<argc) ? argv[3]:null; 479 var domain=(4<argc) ? argv[4]:null; 480 var secure=(5<argc) ? argv[5]:false; 481 var today=new Date(); 482 expires=new Date(today.getTime()+3600000*nHours); 483 document.cookie=name+"="+escape(value)+ 484 ((expires==null) ? "" : ("; expires="+expires.toGMTString()))+ 485 ((path==null) ? "" : ("; path="+path))+ 486 ((domain==null) ? "" : ("; domain="+domain))+ 487 ((secure==true) ? "; secure" : ""); 488} 489function noPropag(e){ 490 e=e?e:window.event; 491 if(e.stopPropagation) e.stopPropagation(); 492 if(e.preventDefault) e.preventDefault(); 493 e.cancelBubble=true; 494} 495function addEvent(obj,e,fn,useCapture){ 496 if(obj.addEventListener){ 497 obj.addEventListener(e,fn,useCapture); 498 return true; 499 }else if(obj.attachEvent) return obj.attachEvent("on"+e,fn); 500 else alert("evento non attaccato"); 501} 502function rmvEvent(obj,e,fn,useCapture){ 503 if(obj.removeEventListener){ 504 obj.removeEventListener(e,fn,useCapture); 505 return true; 506 }else if(obj.detachEvent) return obj.detachEvent("on"+e,fn); 507 else alert("evento non staccato"); 508} 509function getElem(e){ 510 var obj; 511 //if(!e) var e=window.event; 512 e=e?e:window.event; 513 if(e.target) obj=e.target; 514 else if(e.srcElement) obj=e.srcElement; 515 if(obj.nodeType==3) obj=obj.parentNode; 516 return obj; 517} 518var arResized=new Array(); 519function gestResize(obj,wF,hF){ 520 if(!ppSrch(ppString(arResized),obj.id)){ 521 arResized.push(obj.id); 522 new divResize(obj,wF,hF); 523 } 524} 525/* 526function divResize(obj,wF,hF){ 527 this.obj=obj; 528 this.wI=parseInt(obj.offsetWidth); 529 this.hI=parseInt(obj.offsetHeight); 530 this.wF=wF; 531 this.hF=hF; 532 this.xDir=this.wF-this.wI; 533 this.yDir=this.hF-this.hI; 534 var thi=this; 535 this.funcResize=function(){ 536 if(thi.xDir==0 && thi.yDir==0) return; 537 alert(arResized+"___"+thi.obj.id+"___"+1); 538 if(thi.hF!=null){ 539 var jmp=(thi.hF-thi.hI)/4; 540 thi.hI+=jmp; 541 thi.obj.style.height=thi.hI+"px"; 542 } 543 alert(2); 544 if(thi.wF!=null) { 545 var jmp=(thi.wF-thi.wI)/4; 546 thi.wI+=jmp; 547 thi.obj.style.width=thi.wI+"px"; 548 } 549 alert(3); 550 if((thi.xDir>0&&thi.wI>=thi.wF-1)||(thi.xDir<0&&thi.wI<=thi.wF+1)){ 551 thi.obj.style.width=thi.wF+"px"; 552 thi.wF=null; 553 } 554 alert(4); 555 if((thi.yDir>0&&thi.hI>=thi.hF-1)||(thi.yDir<0&&thi.hI<=thi.hF+1)){ 556 thi.obj.style.height=thi.hF+"px"; 557 thi.hF=null; 558 } 559 alert(thi.wI+"___"+thi.hI+"\n"+thi.wF+"___"+thi.hF); 560 if(thi.wF!=null || thi.hF!=null){ alert(5); setTimeout(thi.funcResize,41); }else{ alert(thi.obj.id); arRemElem(arResized,thi.obj.id);} 561 }; 562 this.funcResize(); 563} 564*/ 565function divResize(obj,wF,hF){ 566 this.obj=obj; 567 this.wI=parseInt(obj.offsetWidth); 568 this.hI=parseInt(obj.offsetHeight); 569 this.wF=wF; 570 this.hF=hF; 571 this.xDir=this.wF-this.wI; 572 this.yDir=this.hF-this.hI; 573 var thi=this; 574 this.funcResize=function(){ 575 if(thi.xDir==0 && thi.yDir==0){ arRemElem(arResized,thi.obj.id); return;} 576 if(thi.hF!=null){ 577 var jmp=(thi.hF-thi.hI)/4; 578 thi.hI+=jmp; 579 thi.obj.style.height=thi.hI+"px"; 580 if((thi.yDir>0&&thi.hI>=thi.hF-1)||(thi.yDir<0&&thi.hI<=thi.hF+1)){ 581 thi.obj.style.height=thi.hF+"px"; 582 thi.hF=null; 583 } 584 } 585 if(thi.wF!=null){ 586 var jmp=(thi.wF-thi.wI)/4; 587 thi.wI+=jmp; 588 thi.obj.style.width=thi.wI+"px"; 589 if((thi.xDir>0&&thi.wI>=thi.wF-1)||(thi.xDir<0&&thi.wI<=thi.wF+1)){ 590 thi.obj.style.width=thi.wF+"px"; 591 thi.wF=null; 592 } 593 } 594 if(thi.wF!=null || thi.hF!=null) setTimeout(thi.funcResize,41); else arRemElem(arResized,thi.obj.id); 595 }; 596 this.funcResize(); 597} 598var xmlHttp=null; 599function ajaxCall(ppArgs,func){ 600 isAjax(); 601 /* 602 ppArgs 603 3idUser3szTab321cmp1vlcmp121cmp1vlcmp121cmp1vlcmp123 604 */ 605 var url="php/ajax.php?_ppArgs="+ppArgs+"&_nc="+Math.random(); 606 xmlHttp.onreadystatechange=func; 607 xmlHttp.open("GET",url,true); 608 xmlHttp.send(null); 609} 610function ajaxAr(rspTxt){ 611 var arRec=new Array(); 612 var ar2=ppArr(rspTxt,"\2"); 613 for(var i=0;i<ar2.length;i++) arRec[i]=ppArr(ar2[i],"\1"); 614 return arRec; 615} 616 617function isAjax(){//GetXmlHttpObject 618 try{xmlHttp=new XMLHttpRequest();} 619 catch(e){ 620 try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");} 621 catch(e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");} 622 } 623 if(xmlHttp==null) return false;//no ajax 624 return true; 625} 626function vlSv(valore){ 627 if(valore.length-valore.indexOf(",")==3){ 628 valore=valore.replace(/\./g,""); 629 valore=valore.replace(/\,/g,"."); 630 } 631 var val=new Number(valore); 632 return val.toFixed(2); 633} 634function vlPrnt(valore){ 635 var ar=valore.split("."); 636 var arCifre=ar[0].split("").reverse(); 637 var sz=""; 638 for(var i=0;i<arCifre.length;i++){ 639 if(i%3==0 && i!=0) sz=(!cmsDec) ? "."+sz : ","+sz; 640 sz=arCifre[i].toString()+sz; 641 } 642 var sep=(!cmsDec)?",":"."; 643 if(parseFloat(sz)==0 && parseFloat(ar[1])==0) return ""; 644 return sz+sep+ar[1]; 645} 646function setOnLoad(func){ 647 addEvent(window,"load",func,false); 648} 649function objFade(obj,time,iDir){ 650 this.obj=obj; 651 this.time=time; 652 this.iAlpha=(iDir<0)?100:0; 653 this.iTime=35; 654 this.iDir=100/(time/this.iTime); 655 if(this.iDir<1) this.iDir=1; 656 if(iDir<0) this.iDir*=-1; 657 var thi=this; 658 stAlph(this.obj,this.iAlpha); 659 this.fader=function(){ 660 thi.iAlpha+=thi.iDir; 661 if(thi.iAlpha<0) thi.iAlpha=0; 662 if(thi.iAlpha>100) thi.iAlpha=100; 663 stAlph(thi.obj,thi.iAlpha); 664 if((thi.iAlpha>0&&thi.iDir<0)||(thi.iAlpha<100&&thi.iDir>0)) setTimeout(thi.fader,thi.iTime); 665 }; 666 this.fader(); 667} 668function stAlph(obj,iAlpha){ 669 if(_isIE) obj.style.filter="alpha(opacity="+iAlpha+")"; 670 else obj.style.opacity=iAlpha/100; 671} 672function opOsc(func){ 673 var objOscura=_cel("div"); 674 objOscura.id="divOscura"; 675 objOscura.className="dOsc"; 676 addEvent(objOscura,'click',func,false); 677 var h=(document.documentElement.clientHeight>document.body.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight; 678 objOscura.style.height=h+"px"; 679 document.body.appendChild(objOscura); 680 if(!_isIE){ 681 stAlph(objOscura,0); 682 new objFade(objOscura,100,100); 683 } 684} 685function clOsc(){ 686 if(_gel("divOscura")) document.body.removeChild(_gel("divOscura")); 687} 688function cntrObj(obj,objW,objH){ 689 var arD=areaDoc(); 690 var arS=scrollDoc(); 691 obj.style.left=Math.floor(parseInt(arD[0]/2-objW/2))+"px"; 692 var iTop=(arD[1]-objH)/2+arS[1]; 693 obj.style.top=Math.floor(parseInt(iTop))+"px"; 694} 695 696/////per creare i combo delle cat nelle liste e nell'edit 697 698var arCat=new Array();
699function sCat(idCat,idSez,szNome){this.idCat=idCat;this.idSez=idSez;this.szNome=szNome;} 700 701function cmbCat(vlSez,vlCat){ 702 var arOpt=new Array(); 703 if(vlCat=="undefined") vlCat=0; 704 for(var i=0;i<arCat.length;i++){ 705 //if(arCat[i].idSez==vlSez) arOpt.push(new Array(arCat[i].idCat,arCat[i].szNome)); 706 arOpt.push(new Array(arCat[i].idCat,arCat[i].szNome)); 707 } 708 if(_a=="") ripopolaCmb(szNmCmp,arOpt,vlCat,true); 709 else{ 710 if(arOpt.length>0) ripopolaCmbCat(szNmCmp,arOpt,vlCat,true); 711 else delCmbCat(szNmCmp); 712 } 713 stCmbSel(_gel(szNmCmp)); 714} 715////////////// 716 717 718 719 720 721function isUrl(szUrl){ 722 var regExpression=new RegExp("^((http[s]?|ftp)\:\/\/)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9\-\._\?\,\'\/\\\+&%\$#\=~])*$"); 723 var arStr=szUrl.split("."); 724 return (regExpression.test(szUrl)); 725} 726function isEmail(szMail){ 727 var regExpression=/^(([^<>()[\]\\.,\\?;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ 728 var arStr=szMail.split("."); 729 return (regExpression.test(szMail) && ppSrch(szDomainList,arStr.pop())); 730}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.