First commit 25/04/2002

This commit is contained in:
2021-09-12 22:38:30 +02:00
commit 7b299e206d
46 changed files with 1358 additions and 0 deletions

39
addons/BasicImages.js Normal file
View File

@ -0,0 +1,39 @@
//<script language="javascript"><!--
//function Init()
//{
// imgNames = new Array( "bt-list", "bt-fich" );
// imgSuffixes = new Array( "0", "1" );
// imgBaseURL = "skins/<? echo $skin ?>/";
// preloadImg();
//}
//--></script>
imgNames = new Array();
imgSuffixes = new Array( "0", "1" );
imgBaseURL = "./";
imgLoaded = false;
function preloadImg()
{
for (var i=0; i<imgNames.length; i++) {
for (var j=0; j<imgSuffixes.length; j++) {
var thisCombo=imgNames[i]+imgSuffixes[j]
eval(thisCombo + ' = new Image()')
eval(thisCombo + '.src = "' + imgBaseURL + thisCombo + '.gif"')
}
}
imgLoaded = true;
}
function changeImg(mode,cImg) {
if (imgLoaded && document.images != null) {
mode=mode.toLowerCase()
if (mode=="over") {
document.images[cImg].src = eval(cImg+"1.src")
} else if (mode=="out" || mode=="up") {
document.images[cImg].src = eval(cImg+"0.src")
}
}
}

248
addons/dynlayer.js Normal file
View File

@ -0,0 +1,248 @@
// Dynamic Layer Object
// sophisticated layer/element targeting and animation object which provides the core functionality needed in most DHTML applications
// 19990604
// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/
function DynLayer(id,nestref,frame) {
if (!is.ns5 && !DynLayer.set && !frame) DynLayerInit()
this.frame = frame || self
if (is.ns) {
if (is.ns4) {
if (!frame) {
if (!nestref) var nestref = DynLayer.nestRefArray[id]
if (!DynLayerTest(id,nestref)) return
this.css = (nestref)? eval("document."+nestref+".document."+id) : document.layers[id]
}
else this.css = (nestref)? eval("frame.document."+nestref+".document."+id) : frame.document.layers[id]
this.elm = this.event = this.css
this.doc = this.css.document
}
else if (is.ns5) {
this.elm = document.getElementById(id)
this.css = this.elm.style
this.doc = document
}
this.x = this.css.left
this.y = this.css.top
this.w = this.css.clip.width
this.h = this.css.clip.height
}
else if (is.ie) {
this.elm = this.event = this.frame.document.all[id]
this.css = this.frame.document.all[id].style
this.doc = document
this.x = this.elm.offsetLeft
this.y = this.elm.offsetTop
this.w = (is.ie4)? this.css.pixelWidth : this.elm.offsetWidth
this.h = (is.ie4)? this.css.pixelHeight : this.elm.offsetHeight
}
this.id = id
this.nestref = nestref
this.obj = id + "DynLayer"
eval(this.obj + "=this")
}
function DynLayerMoveTo(x,y) {
if (x!=null) {
this.x = x
if (is.ns) this.css.left = this.x
else this.css.pixelLeft = this.x
}
if (y!=null) {
this.y = y
if (is.ns) this.css.top = this.y
else this.css.pixelTop = this.y
}
}
function DynLayerMoveBy(x,y) {
this.moveTo(this.x+x,this.y+y)
}
function DynLayerShow() {
this.css.visibility = (is.ns4)? "show" : "visible"
}
function DynLayerHide() {
this.css.visibility = (is.ns4)? "hide" : "hidden"
}
DynLayer.prototype.moveTo = DynLayerMoveTo
DynLayer.prototype.moveBy = DynLayerMoveBy
DynLayer.prototype.show = DynLayerShow
DynLayer.prototype.hide = DynLayerHide
DynLayerTest = new Function('return true')
// DynLayerInit Function
function DynLayerInit(nestref) {
if (!DynLayer.set) DynLayer.set = true
if (is.ns) {
if (nestref) ref = eval('document.'+nestref+'.document')
else {nestref = ''; ref = document;}
for (var i=0; i<ref.layers.length; i++) {
var divname = ref.layers[i].name
DynLayer.nestRefArray[divname] = nestref
var index = divname.indexOf("Div")
if (index > 0) {
eval(divname.substr(0,index)+' = new DynLayer("'+divname+'","'+nestref+'")')
}
if (ref.layers[i].document.layers.length > 0) {
DynLayer.refArray[DynLayer.refArray.length] = (nestref=='')? ref.layers[i].name : nestref+'.document.'+ref.layers[i].name
}
}
if (DynLayer.refArray.i < DynLayer.refArray.length) {
DynLayerInit(DynLayer.refArray[DynLayer.refArray.i++])
}
}
else if (is.ie) {
for (var i=0; i<document.all.tags("DIV").length; i++) {
var divname = document.all.tags("DIV")[i].id
var index = divname.indexOf("Div")
if (index > 0) {
eval(divname.substr(0,index)+' = new DynLayer("'+divname+'")')
}
}
}
return true
}
DynLayer.nestRefArray = new Array()
DynLayer.refArray = new Array()
DynLayer.refArray.i = 0
DynLayer.set = false
// Slide Methods
function DynLayerSlideTo(endx,endy,inc,speed,fn) {
if (endx==null) endx = this.x
if (endy==null) endy = this.y
var distx = endx-this.x
var disty = endy-this.y
this.slideStart(endx,endy,distx,disty,inc,speed,fn)
}
function DynLayerSlideBy(distx,disty,inc,speed,fn) {
var endx = this.x + distx
var endy = this.y + disty
this.slideStart(endx,endy,distx,disty,inc,speed,fn)
}
function DynLayerSlideStart(endx,endy,distx,disty,inc,speed,fn) {
if (this.slideActive) return
if (!inc) inc = 10
if (!speed) speed = 20
var num = Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc
if (num==0) return
var dx = distx/num
var dy = disty/num
if (!fn) fn = null
this.slideActive = true
this.slide(dx,dy,endx,endy,num,1,speed,fn)
}
function DynLayerSlide(dx,dy,endx,endy,num,i,speed,fn) {
if (!this.slideActive) return
if (i++ < num) {
this.moveBy(dx,dy)
this.onSlide()
if (this.slideActive) setTimeout(this.obj+".slide("+dx+","+dy+","+endx+","+endy+","+num+","+i+","+speed+",\""+fn+"\")",speed)
else this.onSlideEnd()
}
else {
this.slideActive = false
this.moveTo(endx,endy)
this.onSlide()
this.onSlideEnd()
eval(fn)
}
}
function DynLayerSlideInit() {}
DynLayer.prototype.slideInit = DynLayerSlideInit
DynLayer.prototype.slideTo = DynLayerSlideTo
DynLayer.prototype.slideBy = DynLayerSlideBy
DynLayer.prototype.slideStart = DynLayerSlideStart
DynLayer.prototype.slide = DynLayerSlide
DynLayer.prototype.onSlide = new Function()
DynLayer.prototype.onSlideEnd = new Function()
// Clip Methods
function DynLayerClipInit(clipTop,clipRight,clipBottom,clipLeft) {
if (is.ie) {
if (arguments.length==4) this.clipTo(clipTop,clipRight,clipBottom,clipLeft)
else if (is.ie4) this.clipTo(0,this.css.pixelWidth,this.css.pixelHeight,0)
}
}
function DynLayerClipTo(t,r,b,l) {
if (t==null) t = this.clipValues('t')
if (r==null) r = this.clipValues('r')
if (b==null) b = this.clipValues('b')
if (l==null) l = this.clipValues('l')
if (is.ns) {
this.css.clip.top = t
this.css.clip.right = r
this.css.clip.bottom = b
this.css.clip.left = l
}
else if (is.ie) this.css.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)"
}
function DynLayerClipBy(t,r,b,l) {
this.clipTo(this.clipValues('t')+t,this.clipValues('r')+r,this.clipValues('b')+b,this.clipValues('l')+l)
}
function DynLayerClipValues(which) {
if (is.ie) var clipv = this.css.clip.split("rect(")[1].split(")")[0].split("px")
if (which=="t") return (is.ns)? this.css.clip.top : Number(clipv[0])
if (which=="r") return (is.ns)? this.css.clip.right : Number(clipv[1])
if (which=="b") return (is.ns)? this.css.clip.bottom : Number(clipv[2])
if (which=="l") return (is.ns)? this.css.clip.left : Number(clipv[3])
}
DynLayer.prototype.clipInit = DynLayerClipInit
DynLayer.prototype.clipTo = DynLayerClipTo
DynLayer.prototype.clipBy = DynLayerClipBy
DynLayer.prototype.clipValues = DynLayerClipValues
// Write Method
function DynLayerWrite(html) {
if (is.ns) {
this.doc.open()
this.doc.write(html)
this.doc.close()
}
else if (is.ie) {
this.event.innerHTML = html
}
}
DynLayer.prototype.write = DynLayerWrite
// BrowserCheck Object
function BrowserCheck() {
var b = navigator.appName
if (b=="Netscape") this.b = "ns"
else if (b=="Microsoft Internet Explorer") this.b = "ie"
else this.b = b
this.version = navigator.appVersion
this.v = parseInt(this.version)
this.ns = (this.b=="ns" && this.v>=4)
this.ns4 = (this.b=="ns" && this.v==4)
this.ns5 = (this.b=="ns" && this.v==5)
this.ie = (this.b=="ie" && this.v>=4)
this.ie4 = (this.version.indexOf('MSIE 4')>0)
this.ie5 = (this.version.indexOf('MSIE 5')>0)
this.min = (this.ns||this.ie)
}
is = new BrowserCheck()
// CSS Function
function css(id,left,top,width,height,color,vis,z,other) {
if (id=="START") return '<STYLE TYPE="text/css">\n'
else if (id=="END") return '</STYLE>'
var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'
if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;'
if (arguments.length>=5 && height!=null) {
str += ' height:'+height+'px;'
if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'
}
if (arguments.length>=6 && color!=null) str += (is.ns)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'
if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';'
if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';'
if (arguments.length==9 && other!=null) str += ' '+other
str += '}\n'
return str
}
function writeCSS(str,showAlert) {
str = css('START')+str+css('END')
document.write(str)
if (showAlert) alert(str)
}

53
addons/jd.css Normal file
View File

@ -0,0 +1,53 @@
/* Enlaces */
a {
color: #FFFFBB;
font-size: 9pt;
text-decoration: none;
}
A:hover {color: #FFFF00;}
.oscuro {
color: #000040;
text-decoration: none;
}
BODY {
scrollbar-3dlight-color: rgb(255,255,255);
scrollbar-arrow-color: rgb(253,255,141);
scrollbar-base-color: rgb(153,209,0);
scrollbar-darkshadow-color: rgb(0,24,70);
scrollbar-face-color: #1F65AC;
scrollbar-highlight-color: rgb(0,16,93);
scrollbar-shadow-color: rgb(255,255,255);
scrollbar-track-color: rgb(82,135,189);
font-family: Courier New, Courier;
font-size: 10pt;
color: #95CAFF;
}
/* Tablas */
td, th {
font-size: 10pt;
}
/* formularios */
input {
background-color: #242424;
border-width: 0;
border-color: #646464;
border-style: solid;
color: #CC3333;
font-size: 10pt;
}
select {
background-color: #242424;
border-width: 1;
border-color: #646464;
border-style: solid;
color: #CC3333;
font-size: 10pt;
}

185
addons/scrollwindow.js Normal file
View File

@ -0,0 +1,185 @@
// ScrollWindow Object
// a widget that draws layers that are to be scrolled, being built for a new Scroll Object
// 19991011
// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/
function ScrollWindow(x,y,width,height,frame,name) {
this.name=(name!=null)? name : "ScrollWindow"+(ScrollWindow.count++)
this.w=width
this.h=height
this.frame=(is.ie && frame!=null)? window.top.frames[frame] : parent
this.obj=this.name+"Object"
eval(this.obj+"=this")
this.setMargins=ScrollWindowSetMargins
this.setMargins(0,0,0,0)
}
{var p=ScrollWindow.prototype
p.usebuffer=true
p.inlineBlocks=0
p.inc=10
p.speed=20
p.border=1
p.borderColor='black'
p.bgColor=null
p.build=ScrollWindowBuild
p.activate=ScrollWindowActivate
p.up=ScrollWindowUp
p.down=ScrollWindowDown
p.left=ScrollWindowLeft
p.right=ScrollWindowRight
p.stop=ScrollWindowStop
p.getXfactor=ScrollWindowGetXfactor
p.getYfactor=ScrollWindowGetYfactor
p.load=ScrollWindowLoad
p.reload=ScrollWindowReload
p.back=ScrollWindowBack
p.forward=ScrollWindowForward
p.writeContent=ScrollWindowWriteContent
p.showBlock=ScrollWindowShowBlock
p.jumpTo=ScrollWindowJumpTo
p.history=new Array()
p.historyLoc=-1
p.historyLen=-1
p.onScroll=new Function()
p.onLoad=new Function()
}
function ScrollWindowSetMargins(l,r,t,b) {
this.marginL=l
this.marginR=r
this.marginT=t
this.marginB=b
}
function ScrollWindowBuild() {
var w=this.w
var h=this.h
var b=this.border
var bc=this.borderColor
var ml=this.marginL
var mr=this.marginR
var mt=this.marginT
var mb=this.marginB
this.css=css(this.name,this.x,this.y,w,h,null,null,null,'overflow:hidden')+
css(this.name+'Screen',b,b,w-2*b,h-2*b,this.bgColor)
if (this.border>0) this.css+=css(this.name+'BorderT',0,0,w,b,bc)+css(this.name+'BorderB',0,h-b,w,b,bc)+css(this.name+'BorderL',0,0,b,h,bc)+css(this.name+'BorderR',w-b,0,b,h,bc)
if (this.inlineBlocks) {
this.css+=css(this.name+'Content',0,0,w-2*b,null)
this.css+=css(this.name+'Block0',ml,mt,w-2*b-ml-mr,null,this.bgColor)
for (var i=1;i<this.inlineBlocks;i++) {
this.css+=css(this.name+'Block'+i,ml,mt,w-2*b-ml-mr,null,this.bgColor,'hidden')
}
}
else this.css+=css(this.name+'Content',ml,mt,w-2*b-ml-mr)
this.divStart=(is.ie && this.usebuffer)? '<iframe name="'+this.name+'Frame" width=0 height=0 style="position:absolute; left:0; top:0; visibility:none"></iframe>\n':''
this.divStart+='<div id="'+this.name+'">'+
'<div id="'+this.name+'Screen">'
if (is.ie && !this.usebuffer) this.divStart+='<iframe name="'+this.name+'Frame" width='+(this.w-2*b-ml-mr)+' height='+(this.h-2*b)+' marginwidth=0 marginheight=0 scrolling="no" frameborder="no"></iframe>\n'
else this.divStart+='<div id="'+this.name+'Content">'
this.divEnd='</div>'
if (is.ns || this.usebuffer) this.divEnd+='</div>'
if (this.border>0) this.divEnd+='<div id="'+this.name+'BorderT"></div><div id="'+this.name+'BorderB"></div><div id="'+this.name+'BorderL"></div><div id="'+this.name+'BorderR"></div>\n'
this.divEnd+='</div>'
this.div=this.divStart+this.divEnd
}
function ScrollWindowActivate(w,h) {
if (!this.activated) {
this.lyr=new DynLayer(this.name)
this.screenlyr=new DynLayer(this.name+'Screen')
this.blocklyr=new Array()
this.blockActive=0
}
if (this.inlineBlocks) {
DynLayerInit()
for (var i=0;i<this.inlineBlocks;i++) this.blocklyr[i]=new DynLayer(this.name+'Block'+i)
}
if (is.ie && this.usebuffer && this.frame.frames[this.name+'Frame'].document.body.innerHTML) document.all[this.name+'Content'].innerHTML=this.frame.frames[this.name+'Frame'].document.body.innerHTML
if (this.inlineBlocks) {
this.contentlyr=this.blocklyr[this.blockActive]
}
else if (is.ie && !this.usebuffer) this.contentlyr=new DynLayer('content',null,this.frame.frames[this.name+'Frame'])
else this.contentlyr=new DynLayer(this.name+'Content')
var c=this.contentlyr
c.onSlide=new Function(this.obj+'.onScroll()')
this.contentHeight=h||((is.ns)?c.doc.height:c.elm.scrollHeight)
this.contentWidth=w||((is.ns)?c.doc.width:c.elm.scrollWidth)
if (is.ns) {
c.css.clip.bottom=Math.max(this.contentHeight,this.h)
c.css.clip.right=Math.max(this.contentWidth,this.w)
}
this.offsetHeight=this.contentHeight+this.marginT+this.marginB-this.screenlyr.h
this.offsetWidth=this.contentWidth+this.marginL+this.marginR-this.screenlyr.w
this.enableVScroll=(this.offsetHeight>0)
this.enableHScroll=(this.offsetWidth>0)
this.onScroll()
this.onLoad()
this.activated=true
}
function ScrollWindowLoad(url) {
if (url != this.url) {
this.historyLoc+=1
this.historyLen=this.historyLoc
this.history[this.historyLen]=url
}
this.reload(0)
}
function ScrollWindowBack() {
if (this.historyLoc>0) this.reload(-1)
}
function ScrollWindowForward() {
if (this.historyLoc<this.historyLen) this.reload(1)
}
function ScrollWindowReload(i) {
this.historyLoc+=i
this.url=this.history[this.historyLoc]
this.refresh=true
this.contentlyr=new DynLayer(this.name+'Content')
this.contentlyr.moveTo(this.marginL,this.marginT)
if (is.ns) {
if (this.inlineBlocks) this.contentlyr.elm.load(this.url,this.w-2*this.border)
else this.contentlyr.elm.load(this.url,this.w-2*this.border-this.marginL-this.marginR)
}
else this.frame.frames[this.name+'Frame'].document.location=this.url
}
function ScrollWindowUp() {
if (this.enableVScroll) this.contentlyr.slideTo(null,this.marginT,this.inc,this.speed)
}
function ScrollWindowDown() {
if (this.enableVScroll) this.contentlyr.slideTo(null,-this.offsetHeight+this.marginT,this.inc,this.speed)
}
function ScrollWindowLeft() {
if (this.enableHScroll) this.contentlyr.slideTo(this.marginL,null,this.inc,this.speed)
}
function ScrollWindowRight() {
if (this.enableHScroll) this.contentlyr.slideTo(-this.offsetWidth+this.marginL,null,this.inc,this.speed)
}
function ScrollWindowStop() {
if (this.activated) this.contentlyr.slideActive=false
}
function ScrollWindowGetXfactor() {
if (this.offsetWidth==0) return 0
return Math.min((this.offsetWidth-this.contentlyr.x+this.marginL)/this.offsetWidth-1,1)
}
function ScrollWindowGetYfactor() {
if (this.offsetHeight==0) return 0
return Math.min((this.offsetHeight-this.contentlyr.y+this.marginT)/this.offsetHeight-1,1)
}
function ScrollWindowWriteContent(doc) {
if (is.ie) doc.write(css('content',0,0,this.w-2*this.window.border))
}
function ScrollWindowShowBlock(i,fn) {
if (this.blockActive!=i) {
this.blockActive=i
this.contentlyr.moveTo(this.marginL,this.marginT)
this.contentlyr.hide()
this.blocklyr[i].css.visibility='inherit'
this.activate()
eval(fn)
}
}
function ScrollWindowJumpTo(x,y) {
this.contentlyr.moveTo((x!=null)?Math.max(-x,-this.offsetWidth):null,(y!=null)?Math.max(-y,-this.offsetHeight):null)
this.onScroll()
}
ScrollWindow.count=0