home *** CD-ROM | disk | FTP | other *** search
- function CSGetLayerClip (el) {
- if (el.isIE) return (new CSRect(0,0,el.offsetWidth,el.offsetHeight));
- else return (new CSRect(el.clip.left,el.clip.top,el.clip.width,el.clip.height));
- }
- function CSSetLayerClip (el,clipRect) {
- var l,t,r,b;
- l=clipRect.left; t=clipRect.top; r=l+clipRect.width; b=t+clipRect.height;
- if(el.isIE) { el.style.clip = "rect("+ t + " " + r + " " + b + " " + l + ")"; }
- else {
- el.clip.left=l; el.clip.top=t;
- el.clip.width=clipRect.width; el.clip.height=clipRect.height;
- }
- CSSetStyleVis(el.layer);
- }
- function CSRect (left,top,width,height) {
- this.left=left; this.top=top; this.width=width; this.height=height;
- }
- function CSCreateTransElement (layer, steps) {
- var el;
- if (IsIE()) el=document.all.tags("div")[layer];
- else el=CSNSStyl(layer);
- if (el==null) return null;
- if (el.locked && (el.locked == true)) return null;
- el.isIE=IsIE();
- el.clipRect=CSGetLayerClip(el);
- if (el.clipRect==null) return null;
- el.maxValue=steps;
- if (el.maxValue<=0) el.maxValue=30;
- el.modus=""; el.layer=layer;
- el.width=el.clipRect.width; el.height=el.clipRect.height;
- el.locked = true;
- return el;
- }
- function CSDisposeTransElement (el) { el.locked = false; }