/***************************************************************************** * ITSBrowserLibrary.js * ***************************************************************************** * Release 4.0 (Lotus Domino 5/6) * * Created by Dwight Egerton * * Last modified 22 January 2003 by Dwight Egerton * * * * Description: * * Code for multi-browser support for all Web applications * * * ***************************************************************************** * IT Software Series * * (c)Copyright 2002, Xybanetx Consulting * ***************************************************************************** ***************************************************************************** * Browser Compatibility Check * *****************************************************************************/ function browserOBJ(){ this.agent=navigator.userAgent.toLowerCase(); this.doc=document; this.ver=navigator.appVersion; path=this.doc.URL.substring(7,this.doc.URL.indexOf("?")==-1?this.doc.URL.length:this.doc.URL.indexOf("?")).split("/"); this.svr=path[0]; this.db=""; for(x=1;x-1&&!this.op)?1:0; this.ns=(this.agent.indexOf("gecko")>-1||window.sidebar)?1:0; if(this.op){ this.op5=(this.agent.indexOf("opera 5")>-1||this.agent.indexOf("opera/5")>-1)?1:0; this.op6=(this.agent.indexOf("opera 6")>-1||this.agent.indexOf("opera/6")>-1)?1:0; this.op7=(this.dom&&!this.op5&&!this.op6)?1:0; this.op8=(this.dom&&!this.op5&&!this.op6)?1:0; } else if(this.ie){ this.ie4 = !this.dom && document.all?1:0; this.ie5 = this.dom&&(this.agent.indexOf("msie 5")>-1)?1:0; this.ie55 = this.dom&&(this.agent.indexOf("msie 5.5")>-1)?1:0; this.ie6 = this.dom&&(this.agent.indexOf("msie 6")>-1)?1:0; this.ie7 = this.dom&&(this.agent.indexOf("msie 7")>-1)?1:0; this.ie8 = this.dom&&(this.agent.indexOf("msie 8")>-1)?1:0; } else if(this.ns) { this.ns4=(!this.dom && document.layers)?1:0; this.ns6=this.dom&&(this.agent.indexOf("netscape 6")>-1||this.agent.indexOf("netscape/6")>-1)?1:0; this.ns7=this.dom&&(this.agent.indexOf("netscape 7")>-1||this.agent.indexOf("netscape/7")>-1)?1:0; } this.mac=(this.agent.indexOf("mac")>-1); this.check=this.ie4||this.ie5||this.ie6||this.ie7||this.ie8||this.ns4|| this.ns6||this.ns7||this.op5||this.op6||this.op7; this.usedom=this.ns6||this.ns7||this.op7; this.reuse=this.ie||this.usedom; this.px=this.dom&&!this.op5?"px":"" return this } /***************************************************************************** * Document Page Object * *****************************************************************************/ function pageOBJ(frame){ this.x=0; this.y=0; if(frame) { this.x2 =bc.ie && frame.documentElement.offsetWidth-22||frame.innerWidth-22||0; this.orgy=this.y2=bc.ie && frame.documentElement.offsetHeight-6||frame.innerHeight-6||0; } else { this.x2 =bc.ie && document.documentElement.offsetWidth-22||innerWidth-22||0; this.orgy=this.y2=bc.ie && document.documentElement.offsetHeight-6||innerHeight-6||0; } if(!this.x2||!this.y2) return debugMSG('Document has no width or height'); this.x50=this.x2/2; this.y50=this.y2/2; return this } /***************************************************************************** * Create Libary Object * *****************************************************************************/ function libraryOBJ(obj,nest,o){ if(!bc.check) return debugMSG('You are using an older browser! Please upgrade to a new version to be able to access this site.'); if(bc.usedom&&o) this.evnt=o; else{ nest=(!nest) ? "document.":'document.layers.'+nest+'.'; this.evnt=bc.dom?document.getElementById(obj):bc.ie4?document.all[obj]:bc.ns4?eval(nest+"document.layers."+obj):0; } if(!this.evnt) return debugMSG('The layer does not exist ('+obj+')-\nIf your are using Netscape please check the nesting of your tags!'); this.css=bc.dom||bc.ie4?this.evnt.style:this.evnt; this.ref=bc.dom||bc.ie4?document:this.css.document; this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0; this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0 this.w=this.evnt.offsetWidth||this.css.clip.width||this.ref.width||this.css.pixelWidth||0; this.h=this.evnt.offsetHeight||this.css.clip.height||this.ref.height||this.css.pixelHeight||0; this.c=0; if((bc.dom||bc.ie4)&&this.css.clip){ this.c=this.css.clip; this.c=this.c.slice(5,this.c.length-1); this.c=this.c.split(''); for(var i=0;i<4;i++){ this.c[i]=parseInt(this.c[i]) } } this.ct=this.css.clip.top||this.c[0]||0; this.cr=this.css.clip.right||this.c[1]||this.w||0 this.cb=this.css.clip.bottom||this.c[2]||this.h||0; this.cl=this.css.clip.left||this.c[3]||0; this.obj=obj+"Object"; eval(this.obj+"=this"); return this } /***************************************************************************** * Libary Object Methods * *****************************************************************************/ libraryOBJ.prototype.moveIt=function(x,y){ this.x=x; this.y=y; this.css.left=x; this.css.top=y; } libraryOBJ.prototype.moveBy=function(x,y){ this.css.left=this.x+=x; this.css.top=this.y+=y; } libraryOBJ.prototype.showIt=function(){ this.css.visibility="visible"; } libraryOBJ.prototype.hideIt=function(){ this.css.visibility="hidden"; } libraryOBJ.prototype.bg=function(color){ if(bc.opera) this.css.background=color; else if(bc.dom||bc.ie4) this.css.backgroundColor=color; else if(bc.ns4) this.css.bgColor=color; } libraryOBJ.prototype.writeIt=function(text,startHTML,endHTML){ if(bc.ns4){ if(!startHTML){ startHTML=""; endHTML=""; } this.ref.open("text/html"); this.ref.write(startHTML+text+endHTML); this.ref.close(); } else this.evnt.innerHTML=text; } libraryOBJ.prototype.clipTo=function(t,r,b,l,setwidth){ this.ct=t; this.cr=r; this.cb=b; this.cl=l; if(bc.ns4){ this.css.clip.top=t; this.css.clip.right=r this.css.clip.bottom=b; this.css.clip.left=l; } else{ if(t<0) t=0; if(r<0) r=0; if(b<0) b=0; this.css.clip="rect("+t+","+r+","+b+","+l+")"; if(setwidth){ this.css.pixelWidth=this.css.width=r; this.css.pixelHeight=this.css.height=b; } } } libraryOBJ.prototype.clipBy=function(t,r,b,l,setwidth){ this.clipTo(this.ct+t,this.cr+r,this.cb+b,this.cl+l,setwidth); } libraryOBJ.prototype.clipIt=function(t,r,b,l,step,fn,wh){ tstep=Math.max(Math.max(Math.abs((t-this.ct)/step),Math.abs((r-this.cr)/step)),Math.max(Math.abs((b-this.cb)/step),Math.abs((l-this.cl)/step))); if(!this.clipactive){ this.clipactive=true; if(!wh) wh=0; if(!fn) fn=0; this.clip(t,r,b,l,(t-this.ct)/tstep,(r-this.cr)/tstep,(b-this.cb)/tstep,(l-this.cl)/tstep,tstep,0,fn,wh); } } libraryOBJ.prototype.clip=function(t,r,b,l,ts,rs,bs,ls,tstep,astep,fn,wh){ if(astep