var INPUTCOLOR = "#cccccc"; //colore del bordo dell'input di default var GIORNI = Array("lun","mar","mer","gio","ven","sab","dom"); var REGBR = new RegExp("
","g"); var timeOutId; //Timeout di alertWin var tmplMex ='
'+ '
'+ ''+ ''+ '
'+ '
'+ '
'+ '
##mex##
'+ '
'+ '
'; var tmplLoad ='
'+ '
'+ '
   ##mex##
'+ '
'+ '
'; var tmplSemiModal='
'+ '
'+ '
##tit## 
'+ '
##mex##
'; var tmplModal = '';//'
'; //******************************Biblioteca******************************// var tmplBiblio = ''+ '##titolo## ##durata##'+ ''+ ''; var tmplPageing = '
Mostra n.'+ '
'+ '
'+ ''+ ''+ 'pagina 1 di 5'+ ''+ ''+ '
'+ '
Vai a pag.'+ '
'; //******************************Lezioni******************************// var tmplLezione = '##titoloEnt##'+ ''+ ''; var tmplTitoloTiny=' 

'+ ' '+ ''; var tmplNotaTiny=' 

'+ ' '+ '
 '+ '

'+ ''; var tmplLezWeb=' '+ ' 

'+ ''; //******************************Archivio Lezioni******************************// tmplArchLsn = '##titoloEnt##'+ ' '+ ''; tmplArchFld = '
  • '+ '##titoloEnt##
  • '+ ''; //****************************** Slide ******************************// tmplTwoThirds = '
    ##sx##
    '+ '
    ##dx##
     
    '; tmplSlide = ' 

    '+ ' '+ ''; tmplPickerLsn = '##titoloEnt##'+ ' '+ ''; xtmplPickerSlide = ''+ '

    ##titolo##

    '+ ''+ '
    >'+ '<
    '; tmplPickerQuaderno = '\n'+ '

    ##titolo##

    '+ ''+ '
    '+ '
    ##contenuto##
    '; //******************************Ebook templates******************************// tmplEbookVolumi = '
    '+ '##copertina##
    ##autori##'+ '##titoloO####sottotitoloO##'+ '##titoloV####sottotitoloV##
    '+ ''; tmplEbookCapitoli = '
  • '+ '##titoloC####sottotitoloC##
  • '+ '##contributi##
    '; tmplEbookContributi = ''+ '##titolo##'+ ''; tmplEbookAggiungi = 'Aggiungi contributo al capitolo'; //******************************Social******************************// tmplPostAggiungi=''+ '
    '+ ' '+ ' '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    Invia a:'+ ' '+ '
    '+ '
    '+ '
    seleziona: '+ '
    '+ '
    '+ ' '+ ' '+ ' Invia
    '+ '
    '; tmplPostAggiungiStudOpen=''+ '
    '+ ' '+ ' '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    Invia a:'+ ' '+ '
    '+ '
    '+ '
    seleziona: '+ '
    '+ '
    '+ ' '+ ' '+ ' Invia
    '+ '
    '; tmplPostNewAllegato='##titolo## ##durata## '+ '
    '; tmplPostSocial=''+ '
    '+ '
    '+ ' '+ '
    '+ ' '+ ' '+ '
    '+ '
    '+ ' '+ ' '+ ' ##fotoPoster##'+ ' '+ '
    '+ ' ##data##'+ ' da:'+ ' ##nomePoster##'+ ' ##qualifica## - ##ente##'+ '
    '+ ' a:'+ ' ##destinatari##'+ '
    '+ '
    '+ '

    ##testobr##

    '+ ' '+ ' '+ '
    '+ '
    '+ '

    '+ ' '+ ' Visualizza tutti i ##nCommenti## commenti'+ ' '+ '

    '+ ' '+ //non mettere testo tra i due uso un lastchild '
    '+ '
    '; tmplPostSocialStuOpen=''+ '
    '+ '
    '+ ' '+ '
    '+ ' '+ ' '+ '
    '+ '
    '+ ' '+ ' '+ ' ##fotoPoster##'+ ' '+ '
    '+ ' ##data##'+ ' da:'+ ' ##nomePoster##'+ ' ##qualifica## - ##ente##'+ '
    '+ ' a:'+ ' ##destinatari##'+ '
    '+ '
    '+ '

    ##testobr##

    '+ ' '+ ' '+ '
    '+ '
    '+ '

    '+ ' '+ ' Visualizza tutti i ##nCommenti## commenti'+ ' '+ '

    '+ ' '+ //non mettere testo tra i due uso un lastchild '
    '+ '
    '; tmplPostAllegaSocial=''+ '##testo##
    '; tmplPostCommentoSocial='
    '+ '##fotoPoster##'+ ''+ '
    '+ '

    da:##nomePoster## - ##qualifica## - '+ '##ente##

    '+ '

    ##testobr##

    '+ ' '+ '

    ##data##

    '+ ' ' '
    '; tmplPostTastoConsegnaSocial='Consegna il tuo elaborato'+ '
    Da consegnare entro il: ##scadenza##
    '+ '
    Elaborati consegnati
    '; tmplPostTastoConsegnaSocialStuOpen='Consegna il tuo elaborato'+ '
    Da consegnare entro il: ##scadenza##
    '+ '
    Elaborati consegnati
    '; tmplConsegnaSocial=''+ '

    ##nomePoster##'+ ' - ##qualifica## - ##ente##

    '+ 'Consegnato alle: ##data##'; //******************************FS System racconglitore quaderno slide******************************// tmplRaccoglitoreFsFld = '
  • '+ '##titoloEnt##'+ ' '+ '
  • '+ ''; tmplRaccoglitoreFsLsn = '##titoloEnt##'+ //''+ ''+ ''; tmplChangeFsFld= '
    '+ '
    '+ '

    Seleziona la cartella

    '+ '
    '+ '
    '+ '
      '+ '
    • '+ '
        '+ '
      • '+ '
      '+ '
      '+ '
      '+ '
       
      '+ '
      '+ '
      '; //******************************TinyMce objects******************************// tinyFull = { // General options // mode : "textareas", language : "it", mode : "exact", skin:"lightgray", width : "590", height : "330", body_class: "editing", //invalid_elements : "strong", //valid_elements : "b/strong", plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste textcolor google_tools biblioteca youtube" ], menu: { file: {title: 'File', items: 'newdocument print'}, edit: {title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall | searchreplace'}, insert: {title: 'Insert', items: 'link image google_tools biblioteca youtube | charmap hr insertdatetime template'}, view: {title: 'View', items: 'visualchars visualblocks visualaid | preview fullscreen'}, format: {title: 'Format', items: 'bold italic underline strikethrough superscript subscript | formats | removeformat'}, table: {title: 'Table', items: 'inserttable tableprops deletetable | cell row column'} }, //menubar: "file edit insert view format table", //tools toolbar: "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | code | image template google_tools biblioteca youtube", content_css : "css/tiny.css?" + new Date().getTime(), // Drop lists for link/image/media/template dialogs // template_external_list_url : "lists/template_list.js", // external_link_list_url : "lists/link_list.js", // external_image_list_url : "lists/image_list.js", // media_external_list_url : "lists/media_list.js", templates : [ {title: "Centrato", url: "js/tinymce/templates/tmpl1.htm", description: "Slide con titolo e testo centrati." }, {title: "A sinistra", url: "js/tinymce/templates/tmpl2.htm", description: "Slide con titolo e testo allineati a sinistra." }, {title: "A destra", url: "js/tinymce/templates/tmpl3.htm", description: "Slide con titolo e testo allineati a destra." }, {title: "Immagine grande centrata", url: "js/tinymce/templates/tmpl4.htm", description: "Slide con titolo e immagine grande centrata testo allineato a sinistra." } ], relative_urls:false } tinyNota = { // Lezione nota // General options // mode : "textareas", body_class: "editing", language : "it", mode : "exact", skin:"lightgray", toolbar: "bold italic underline", content_css : "css/tiny.css?" + new Date().getTime(), relative_urls:false, menubar : false //statusbar: false } tinyMini = { language : "it", mode : "exact", skin:"lightgray", //width : "590", menubar : false, toolbar: "bold italic underline | numlist", content_css : "css/tiny.css?" + new Date().getTime(), relative_urls:false } // Eventi nella pagina function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } //------------------------------------------------------------ // ****************** APERTO CHIUSO ********************* // ****************** ON OFF ********************* function switchAccesoSpento(idInput,obj){ idInputOld = document.getElementById(idInput).value; idInputNew = idInputOld=='0'?"1":"0"; document.getElementById(idInput).value = idInputNew; if(idInputNew=='1'){ replaceClass(obj,'spento','acceso'); }else{ replaceClass(obj,'acceso','spento'); } } function switchAccesoSpenti(obj,idHidden,val){ // radio buttons var hid = document.getElementById(idHidden); var lnks = hid.parentNode.getElementsByTagName('A'); for(var l in lnks){ if(lnks[l].nodeType==1){ if(lnks[l].className.indexOf('acceso')>-1){ replaceClass(lnks[l],'acceso','spento'); } } } replaceClass(obj,'spento','acceso'); hid.value = val; } function switchClass(obj,aClass){ obj = document.getElementById(obj); if(hasClass(obj,aClass)){ replaceClass(obj,'aperto','chiuso'); }else{ replaceClass(obj,'chiuso','aperto'); } } // ****************** fine ON OFF ********************* function replaceClass(obj,oldClass,newClass){ objClass = obj.className; objClassAr = objClass.split(" "); newText = new Array(); for(var n=0; n= 0) return true; return false; } } function convDate(data){ dummy2 = data.split("-").reverse().join("-"); return dummy2; } function controlField(nome,id,id2,tipo){ switch(tipo){ case "_": // controlla se il campo = vuoto if(document.getElementById(id).value == false){ alertWinScroll(id, 400, ""+nome+": Campo mancante"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF9900"; return false; }else{ return true; } break; case "__": // controlla se il campo = vuoto con "" if(document.getElementById(id).value == ""){ alertWinScroll(id, 400, ""+nome+": Campo mancante"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } break; case "@": // controlla la validita del campo mail if(!indirizzoEmailValido(document.getElementById(id).value)){ alertWinScroll(id, 400, ""+nome+": ##campo_non_valido##"); document.getElementById(id).style.border = "1px solid #FF9900"; document.getElementById(id).focus(); return false; }else{ return true; } break; case "=": // confronta due campi if(document.getElementById(id).value != document.getElementById(id2).value){ //alertWin("Le "+nome+" non Coincidono"); alertWinScroll(id, 400, ""+nome+": ##non_coincidenti##"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF9900"; document.getElementById(id2).value = ""; return false; }else{ return true; } break; case "h": // controlla se il campo hidden = vuoto if(document.getElementById(id2).value == false){ alertWinScroll(id, 400, ""+nome+": Campo mancante"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } break; case "hS": // controlla se il campo autoSuggest = vuoto if(document.getElementById(id2).value == ""){ if(document.getElementById(id).value == false){ alertWinScroll(id, 400, ""+nome+": Campo mancante"); }else{ alertWin(nome+": non presente tra i dati disponibili"); } document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } break; case "c": // controlla se il campo e' piu' lungo di un tot if(document.getElementById(id).value.length > id2){ alertWin(nome+": il campo deve contenere un massimo di "+id2+" caratteri"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } break; case "c<": // controlla se il campo e' piu' corto di un tot if(document.getElementById(id).value.length < id2){ alertWinScroll(id, 400, ""+nome+": ##campo_lunghezza_minima## " +id2+ " ##caratteri##" ); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } break; case "n=": // controlla se il campo e' lungo n if(document.getElementById(id).value.length != id2){ alertWin(nome+": il campo deve contenere "+id2+" caratteri"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } break; case "n": // controlla se il campo e' un numero if(isNaN(document.getElementById(id).value.replace(',','.'))){ alertWin(nome+": il campo deve contenere solo numeri"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } case "v<": // controlla se il valore del campo e' < di tot if(parseInt(document.getElementById(id).value)>id2){ alertWin(nome+": il valore del campo deve essere inferiore a "+id2); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF0000"; return false; }else{ return true; } case "v>": // controlla se il valore del campo e' > di tot if(parseInt(document.getElementById(id).value)=": // controlla se il valore del campo e' >= di tot if(parseInt(document.getElementById(id).value)= del I if(convDate(document.getElementById(id).value)>convDate(document.getElementById(id2).value)){ alertWin(nome+": il campo deve essere superiore o uguale al precedente"); document.getElementById(id2).focus(); document.getElementById(id2).style.border = "1px solid #FF0000"; return false; }else{ return true; } break; case "doc": // controllo se il file = un doc obj = document.getElementById(id); var extensions = new Array(); extensions[1] = "doc"; extensions[0] = "docx"; extensions[2] = "pdf"; extensions[3] = "rtf"; /*extensions[4] = "bmp";*/ var image_file = obj.value; var image_length = image_file.length; var pos = image_file.lastIndexOf('.') + 1; var ext = image_file.substring(pos, image_length); var final_ext = ext.toLowerCase(); for (i = 0; i < extensions.length; i++){ if(extensions[i] == final_ext){ return true; } } alertWinScroll(id, 400, ""+nome+": ##formato_non_valido##"); document.getElementById(id).focus(); document.getElementById(id).style.border = "1px solid #FF9900"; return false; break; case "img": // controllo se il file = una img obj = document.getElementById(id); var extensions = new Array(); extensions[1] = "jpg"; extensions[0] = "jpeg"; extensions[2] = "gif"; extensions[3] = "png"; /*extensions[4] = "bmp";*/ var image_file = obj.value; var image_length = image_file.length; var pos = image_file.lastIndexOf('.') + 1; var ext = image_file.substring(pos, image_length); var final_ext = ext.toLowerCase(); for (i = 0; i < extensions.length; i++){ if(extensions[i] == final_ext){ return true; } } alertWin("Seleziona un'immagine con una delle seguenti estensioni:\n\n gif, jpeg, jpg"); return false; break; default: alertWin("tipo non riconosciuto"); return false; } } /***** Nuovo ctrlField *****/ function ctrlObjField(tipo,nome,obj,objH){ var val = obj.value; switch(tipo){ case "_": // stringa non vuoto return notEmptyFld(nome,obj); break; case "true": // true if(val=='0' || val=='false') val = 0; val = Boolean(val); if(val==false) alertWin(""+nome+": obbligatorio."); return val; break; case "=": // due campi uguali var r = val != objH.value if(r){ $(window).scrollTop($(obj).offset().top-300); alertWin(""+nome+": non coincidono."); obj.focus(); obj.style.border = "1px solid #FF9900"; objH.value = ""; } return !r; break; case "@": // email valida var r = indirizzoEmailValido(val); if(!r){ $(window).scrollTop($(obj).offset().top-300); alertWin(""+nome+": non valida."); obj.focus(); obj.style.border = "1px solid #FF9900"; } return r; break; case "l<": // controlla se il campo e' piu' corto di un tot var r = val.length < objH; if(r){ $(window).scrollTop($(obj).offset().top-300); alertWin(""+nome+": deve contenere almeno "+objH+" caratteri."); obj.focus(); obj.style.border = "1px solid #FF9900"; } return !r; break; default: alertWin("tipo non riconosciuto"); return false; } } function notEmptyFld(nome,obj){ if(obj.value == false){ $(window).scrollTop($(obj).offset().top-300); alertWin(""+nome+": Campo mancante"); obj.focus(); obj.style.border = "1px solid #FF9900"; return false; }else{ return true; } } function viewLoader(mex){ jQuery('#message').fadeOut(); sc = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset || 0;//document.documentElement.scrollTop; dTop = sc+200; sWidth = document.body.clientWidth; sx = (sWidth-300)/2; if(sx <0) sx = 0; var t = tmplLoad; t = t.replace(/##w##/g, '300'); t = t.replace(/##h##/g, '62'); t = t.replace(/##mex##/g, mex); document.getElementById('loader').innerHTML = t; document.getElementById('loader').style.top = dTop+"px"; document.getElementById('loader').style.left = sx+"px"; document.getElementById('loader').style.display = "block"; } function hideLoader(cont,dbg){ if(dbg){ if(typeof(cont)!='string') cont = JSON.stringify(cont); document.getElementById('loader').innerHTML = cont; document.getElementById('loader').style.display = "block"; }else{ document.getElementById('loader').style.display = "none"; document.getElementById('loader').innerHTML = ""; } } function alertWin(mex){ sc = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset || 0; dTop = sc+200; sWidth = document.body.clientWidth; sx = (sWidth-400)/2; if(sx <0) sx = 0; var t = tmplMex; t = t.replace(/##w##/g, '400'); t = t.replace(/##h##/g, '200'); t = t.replace(/##titolo##/g, 'Avviso!'); t = t.replace(/##mex##/g, mex); document.getElementById('message').innerHTML = t; document.getElementById('message').style.top = dTop+"px"; document.getElementById('message').style.left = sx+"px"; document.getElementById('message').style.display = "block"; if(timeOutId) clearTimeout(timeOutId); timeOutId = setTimeout(hideWin,3000); } function hideWin(){ if(timeOutId) clearTimeout(timeOutId); document.getElementById('message').style.display = "none"; document.getElementById('message').innerHTML = ""; } function alertWinScroll(id, duration, mex){ $(window).scrollTop($('#'+id).offset().top-300); alertWin(mex); } function openSemiModal(w,h,title,type,url,uri,doEvent){ var obj = {}; obj.win = document.getElementById('semiModal'); obj.close = function(){ this.win.style.display = "none"; this.win.innerHTML = ""; } obj.caller = this; if(doEvent=='') doEvent= undefined; obj.doEvent = doEvent; if(uri==undefined) uri = ''; if(url==undefined) url = ''; if(type=='') type = 'text'; if(w=='') w = document.body.clientWidth-20; if(h=='') h = window.screen.availHeight-20; var sc = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset || 0; obj.win.innerHTML=''; var dTop = sc+40; var sx = (document.body.clientWidth-w)/2; if(sx<0) sx = 0; viewLoader("Caricamento in corso..."); obj.endLoad = function(res){ hideLoader(res,0); if(this.win.style.display!="block"){ this.win.style.top= dTop+"px"; this.win.style.left=sx+"px"; } var t = tmplSemiModal; t = t.replace(/##w##/g, w); t = t.replace(/##h##/g, h); if(type=='json'){//Dati JSON if(this.doEvent==undefined) t = t.replace(/##mex##/g, JSON.stringfy(res)); }else{// Text if(this.doEvent==undefined) t = t.replace(/##mex##/g, res); } t = t.replace(/##mex##/g,''); if(title!=''){ t = t.replace(/##tit##/g, Encoder.htmlEncode(title)); }else{ if(res.t!=undefined && res.t!=''){ t = t.replace(/##tit##/g, Encoder.htmlEncode(res.t)); }else{ t = t.replace(/##tit##/g, Encoder.htmlEncode(title)); } } /*if(url=='' || type=='text'){ t = t.replace(/##tit##/g, Encoder.htmlEncode(title)); }else if(res.t!=undefined && res.t!=''){ t = t.replace(/##tit##/g, Encoder.htmlEncode(res.t)); }*/ this.win.innerHTML = t; var oThis = this; $('.mexClose').bind('click',function(){oThis.close()}); if(typeof this.doEvent === 'function') this.doEvent.call(this.caller,res); $(this.win).draggable({ handle: ".mexTitle" }); this.win.style.display="block"; } if(url==''){ obj.endLoad(uri); }else{ $.post('https://prometeo3.palumboeditore.it/'+url,uri,function(){},type) .done(function(r){obj.endLoad(r)}).fail(openSemiModal.bind(obj.caller,w,h,title,type,url,uri,obj.doEvent)); //.fail(function(){openSemiModal(w,h,type,url,uri,doEvent)}); } } function openModal(title,body,footer){ viewLoader("Caricamento in corso..."); var win = document.getElementById('modal-one'); win.style.display = "block"; var t = tmplModal; t = t.replace(/##title##/g, title); t = t.replace(/##body##/g, body); t = t.replace(/##footer##/g, footer); win.innerHTML = t; var links = win.getElementsByTagName('TEXTAREA'); for(var l in links){ if(links[l].nodeType==1){ if(links[l].name=='corpo'){ links[l].id = "editableArea"; tinyMCE.editors=[]; tinyMCE.init(tinyMini); tinyMCE.execCommand('mceAddEditor',false,"editableArea"); }; } } hideLoader('',0); } function closeModal(){ hideLoader('',0); $('video, audio').each(function() { $(this)[0].player.pause(); }); history.pushState(null, null, '#close'); var win = document.getElementById('modal-one'); win.style.display = "none"; win.innerHTML = ""; } function ctrlKey(e,o){ if(e.keyCode==13) document.getElementById(o).click(); } function stopRedirect(ev,lnk){ e = ev || window.event; trg = e.srcElement || e.target; if(trg.nodeName!='INPUT') window.location.href = lnk; } function getPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function getPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } /* function openDivEvent(w,urlAj,corrX,corrY,doEvent){ this.win = document.getElementById('win'); xx = corrX;//getPosX(document.getElementById(idOpen))+corrX; sc = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset || 0;//document.documentElement.scrollTop; yy = corrY+sc;//getPosY(document.getElementById(idOpen))+corrY+document.body.scrollTop; win.style.width = w+"px"; viewLoader("Caricamento in corso..."); myajax.post(urlAj,""); myajax.echoFunction=function(response){ hideLoader(response,0); if(win.style.display !="block"){ win.style.top=yy+"px"; win.style.left=xx+"px"; } win.innerHTML = response; win.style.display="block"; Drag.init(document.getElementById("handle"),document.getElementById('win')); doEvent(); } } function loadDivContent(obj,urlAj,uriAj,doEvent,dbg){ obj = document.getElementById(obj); viewLoader("Caricamento in corso..."); myajax.post(urlAj,uriAj); myajax.echoFunction=function(response){ hideLoader(response,dbg); obj.innerHTML = response; doEvent(); } } */ function openSelect(w,h,idName,idValue,urlAj,corrX,corrY,multi,any){ this.win = document.getElementById('select'); //selIds = ""; selIds = document.getElementById(idValue).value; selNames = document.getElementById(idName).value; if(!multi){ document.onmouseup=function(e){ e = e || window.event; trg = e.srcElement || e.target; if(trg.id!="select"){ document.getElementById('select').style.display='none'; document.onmouseup=''; } } }else { //selIds = document.getElementById(idValue).value; } xx = getPosX(document.getElementById(idName))+corrX; yy = getPosY(document.getElementById(idName))+corrY; win.style.width = w+"px"; win.style.height = h+"px"; win.style.overflow = "auto"; viewLoader("Caricamento in corso..."); myajax.post(urlAj,'idName='+idName+'&idValue='+escape(idValue)+'&multi='+multi+'&any='+any+'&selIds='+selIds+'&selNames='+escape(selNames)); myajax.echoFunction=function(response){ hideLoader(response,0); win.style.top=yy+"px"; win.style.left=xx+"px"; win.style.textAlign = "left"; win.innerHTML = response; win.style.display="block"; } } function openSelectEvent(w,h,idName,idValue,urlAj,corrX,corrY,multi,any,doEvent){ this.win = document.getElementById('select'); selIds = ""; if(!multi){ document.onmouseup=function(){ document.getElementById('select').style.display='none'; document.onmouseup=''; } }else { selIds = document.getElementById(idValue).value; } xx = getPosX(document.getElementById(idName))+corrX; yy = getPosY(document.getElementById(idName))+corrY; win.style.width = w+"px"; win.style.height = h+"px"; win.style.overflow = "auto"; viewLoader("Caricamento in corso..."); myajax.post(urlAj,'idName='+idName+'&idValue='+escape(idValue)+'&multi='+multi+'&any='+any+'&selIds='+selIds); myajax.echoFunction=function(response){ hideLoader(response,0); win.style.top=yy+"px"; win.style.left=xx+"px"; win.style.textAlign = "left"; win.innerHTML = response; win.style.display="block"; doEvent(); } } function xsetControl(val, obj){ var parentObj = obj.parentNode.childNodes; for(i=0; i