function findObj(theObj, theDoc) { var p, i, foundObj; if(!theDoc) theDoc = document; if( (p = theObj.indexOf("?")) > 0 && parent.frames.length) { theDoc = parent.frames[theObj.substring(p+1)].document; theObj = theObj.substring(0,p); } if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj]; for (i=0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj]; for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj,theDoc.layers[i].document); if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj); return foundObj; }// Example: // writeCookie("myCookie", "my name", 24); // Stores the string "my name" in the cookie "myCookie" which expires after 24 hours. function writeCookie(name, value, hours) { var expire = ""; if(hours != null) { expire = new Date((new Date()).getTime() + hours * 3600000); expire = "; expires=" + expire.toGMTString(); } document.cookie = name + "=" + escape(value) + expire; } function multi_select(selObj) { selectedArray =new Array; count=0; for (i=0; i0) return selectedArray.join(","); } function deseleziona(selObj) { s=findObj(selObj); if(s.length) for (var i=0;i < s.length; i++) s.options[i].selected = false; } function openDiv(id,px1,px2,formfield,overf) { //if(! div=findObj(id)) return; //alert(id); div=findObj(id).style; px = div.height; //alert(px); if(parseInt(px)==px2) { newpx = px1; }else{ newpx=px2; } //alert(newpx); if(newpx && parseInt(newpx)>0) newpx=parseInt(newpx); //alert(newpx); div.height=newpx+"px"; if(overf) { div.overflow = overf; }else{ div.overflow = 'hidden'; } if(formfield && findObj(formfield)) findObj(formfield).value = newpx+'px' ; }