String.prototype.trim=function() { return this.replace(/^\s+|\s+$/g,'') ; } ; String.prototype.setChar=function(pos,c) { return this.substring(0,pos)+c+this.substr(pos+1) ; } ; Array.prototype.find=function(element) { for(var i=0 ; i=0) return 'sp2' ; if(navigator.appMinorVersion.indexOf('SP3')>=0) return 'sp3' ; return navigator.userAgent.substr(pos+5,3) ; }catch(e){return false} })() ; function hasPropertySet(objId,propertySet) { var obj=gebid(objId), propVal ; mainFor: for(var i in propertySet) { propVal=propertySet[i] ; if((attrVal=obj[i])==undefined || attrVal==null) if(obj.getAttribute) attrVal=obj.getAttribute(i) ; if(propVal instanceof RegExp) { if(!propVal.test(attrVal/*?attrVal:''*/)) return false ; } else if(propVal!=attrVal) return false ; //if(!valueMatch(propertySet[i],attrVal)) // return false ; } return true ; } function getAncestor(propertySet,objId) { var obj=gebid(objId) ; do { if(hasPropertySet(obj,propertySet)) return obj ; } while(obj=obj.parentNode) ; return null ; } function getFirstElementChild(obj){ var child=obj.firstChild ; if(child && child.nodeType!=1) child=getNextElementSibling(child) ; return child ; } function getNextElementSibling(obj){ do obj=obj.nextSibling ; while(obj && obj.nodeType!=1); return obj ; } function setPropertySet(objId,propertySet){ var obj=gebid(objId) ; for(var i in propertySet){ var valType=typeof propertySet[i] ; if(i=='style') obj.style.cssText=propertySet[i] ; else if(obj[i]==undefined && (valType=='string' || valType=='integer' || valType=='boolean')) obj.setAttribute(i,propertySet[i]) ; else obj[i]=propertySet[i] ; } } function setPropertySetToCollection(collection,propertySet){ for(var i=0 ; icerrar x" ; innerHtml += "" ; // codigo del formulario propiamente tal: lo mejor sería sacarlo de aqui innerHtml += "" ; popUp.innerHTML = innerHtml ; } var mousePos = getMousePos(E) ; popUp.style.top = mousePos.y ; popUp.style.left = mousePos.x ; popUp.style.display = 'block' ; } function adjustInnerWindowSize(){ frameElement.height=document.body.scrollHeight+10 ; frameElement.height=document.body.offsetHeight+10 ; } function replaceTagsForText(tagName,text){ var elemList = document.getElementsByTagName(tagName) ; while(elemList.length){ var textNode = document.createTextNode(text) ; elemList[0].parentNode.replaceChild(textNode,elemList[0]) ; } } var JSON=function(){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"',"'":"\\'",'\\':'\\\\'},s={'boolean':function(x){return String(x);},number:function(x){return isFinite(x)?String(x):'null';},string:function(x,quote){if(/['"\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\'"])/g,function(a,b){var c=m[b];if(c){return c;} c=b.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);});} if(quote==undefined)quote="'";return quote+x+quote;},object:function(x,quote){if(x){var a=[],b,f,i,l,v;if(x instanceof Array){a[0]='[';l=x.length;for(i=0;i